From simon.rit at creatis.insa-lyon.fr Thu Oct 1 02:18:53 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 08:18:53 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng wrote: > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: From cyril.mory at uclouvain.be Thu Oct 1 04:02:23 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Thu, 01 Oct 2015 10:02:23 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> Message-ID: <560CE88F.5030807@uclouvain.be> Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I'm using windows system (windows7 64 with VS 2013) and > I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with "ITK + FFTW" in > windows system? > > I'm just trying to use *rtkextractshroudsignal* and it seems to > require FFTW library externally. > > When I tried to use FFTW 3.3.4, I've encountered link errors as shown > below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > I'm running on Ubuntu 14.04 LTS and used the distribution library > (FFTW 3.3.3). If you're running on a Debian-based linux system, you > can also install the full development library set using the following > command: */sudo apt-get install libfftw3-3 libfftw3-dev/*. Then just > make sure that these libraries are being used by rerunning CCMake. > > I'm not quite sure about the error being thrown in your build, but > perhaps one of the main developers would be able to provide some more > insight into the issue. > > Hope this helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK > with those options on as you suggested. > > I've tried to use the up-to-date version of FFTW (3.3.4), but it > seems that it doesn't work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved external > symbol __imp_fftw_execute referenced in function "protected: > virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully using in > which system(Windows or Linux)? > > Thanks. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 6:56 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the inclusion of the > Fast Fourier Transform components. This requires compilation with > the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn't compile that way > initially, and it took a little bit of time to figure out. > > Hope that helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I'm now compiling itk-4.8 to use that feature since I've found > my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 4:31 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success since my > initial posting -- in fact I'm currently working on a new > method for accomplishing this task in certain challenging cases. > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase > signal output when called using the '-p' flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA/* > > From what I've experienced, this generally provides a good > signal [0,1) characterizing the respiratory phase using the > default settings. Occasionally, I've run into issues where > the default 'unsharpness' parameter needs to be adjusted to > give a clear signal (by appending the*--unsharp ##*flag to the > command). On more challenging shroud images -- notably, those > with little detectable signal from background -- additional > contrast-enhancement by pre-processing of the shroud has > assisted in signal extraction. > > I hope that helps -- and please let me know how it works out > for you. > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I've encountered exactly same issue and it would > be highly appreciated if you can share with me your > updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:*Rtk-users > [mailto:rtk-users-bounces at public.kitware.com]*On Behalf > Of*Joel Beaudry > *Sent:*Tuesday, March 17, 2015 5:25 PM > *To:*Matthew J. Riblett > > *Cc:*rtk-users at public.kitware.com > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but > I've had good success with using a Hilbert function in > python (scipy). I'm sure that Matlab has an equivalent > function, and maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett > > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a straightforward method > of going from the results of the rtkamsterdamshroud > and rtkextractshroudsignal applications to a [0,1) > phase signal for performing motion-compensated > reconstruction. I've been following along with the > MC-CBCT Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is used to > process the should signal prior to feeding it back > into the reconstruction application, but there is no > mention of how this is accomplished. I'm trying to > implement this into an automated workflow and I'd love > to know how this was accomplished. > > Thanks! > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > _______________________________________________ > 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 WEICHENG.SHEN at leidos.com Thu Oct 1 10:57:56 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Thu, 1 Oct 2015 14:57:56 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: image004.png Type: image/png Size: 15591 bytes Desc: image004.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 15591 bytes Desc: image001.png URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 1 11:23:48 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 17:23:48 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng wrote: > Hello Simon, > > > > Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside > RTK, the following error message appears: > > > > > ================================================================================================ > > > > CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): > By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project > has asked CMake to find a package configuration file provided by > "Gengetopt", but CMake did not find one. > > Could not find a package configuration file provided by "Gengetopt" with > any of the following names: > > GengetoptConfig.cmake > gengetopt-config.cmake > > Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set > "Gengetopt_DIR" to a directory containing one of the above files. If > "Gengetopt" provides a separate development package or SDK, be sure it has > been installed. > > > > > ================================================================================================ > > > > It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake > or gengetopt-config.cmake. I did a manual search for these files in the RTK > directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH > in the cmake GUI when performing configuration. The value of > CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln > file can now be successfully generated. > > > > Next I need to build the project using Visual Studio 2013. > > > > Thanks you very much for your help! > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Thursday, October 01, 2015 2:19 AM > *To:* Shen, Weicheng > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Unknown CMake command "WRAP_GGO" > > > > Hi, > > WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use > WRAP_GGO in an external project you need to do the same as in > applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the > easiest, to start with, is to build the rtktutorialapplication in the RTK > project. > > Let us know if that answered your problem, > > Simon > > > > On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: > > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 15591 bytes Desc: not available URL: From theday79 at gmail.com Thu Oct 1 17:33:51 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 1 Oct 2015 17:33:51 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <560CE88F.5030807@uclouvain.be> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> Message-ID: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park ; 'Matthew J. Riblett' ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I'm using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with "ITK + FFTW" in windows system? I'm just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I've encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I'm running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you're running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I'm not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I've tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn't work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn't compile that way initially, and it took a little bit of time to figure out. Hope that helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I'm now compiling itk-4.8 to use that feature since I've found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting - in fact I'm currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the '-p' flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I've experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I've run into issues where the default 'unsharpness' parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images - notably, those with little detectable signal from background - additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps - and please let me know how it works out for you. - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I've encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I've been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I'm trying to implement this into an automated workflow and I'd love to know how this was accomplished. Thanks! - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 joelbeaudry at gmail.com Thu Oct 1 17:40:30 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Thu, 1 Oct 2015 14:40:30 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Cyril, After trying out a few attempts, it seems like some values play nicer than others. Could it be an issue with floating point comparisons with the spacing and/or origins? It might explain why certain values seem to work (1.5) and others do not (0.88). I'll look at what values are being compared and get back to you. Thanks, Joel On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry wrote: > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 > spacing) and re-creating a mask off of that. So the motion mask should have > the same dimensions, spacing, and origin as the intended 4D image since I'm > using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating > my mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I created for > 160 (2), worked but not the case of 512 (0.88), and let you know what I > find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > wrote: > >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the small paragraph after >> the cuda command line : >> >> Note that the reconstructed volume in this example does not fully contain >> the attenuating object, causing hyper-attenuation artifacts on the borders >> of the result. To avoid these artifacts, reconstruct a larger volume >> (--dimension 256) should be fine. *Note that you will have to resize >> your motion mask as well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and allow any motion mask, >> but until I do, you can resize your motion mask using the CLITK tools ( >> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other datasets and it >> seems to be working. I need to increase the resolution and play around with >> the parameters now. >> >> I haven't had time to test it too much, but I do get an error when >> attempting to reconstruct with different dimensions. I'm using Cuda, and >> haven't tried it with just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >> AverageOutOfROIImageFilter: information of ROI image does not match input >> image" >> >> I'll be able to test some other things later and list more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line parameters AND data). Can >>> you restart it from scratch and let me know if you still have problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>> coordinates >>> - the regularization parameters (gamma space and gamma time) were way >>> too high. The regularization with a high gamma-time caused frames to be >>> identical, while it should only discourage variations >>> >>> I hope it works, now. If it doesn't work for you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and indeed, there are >>> several mistakes in it. I am working on correcting them. I'll keep you >>> posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>> >>> Hi RTK-users, >>> >>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>> example. The 5 frames should show some differences pertaining to patient >>> motion but the ones that I'm producing are identical, so no motion is >>> visible. >>> >>> Has anyone been able to follow the example and the provided dataset to >>> create a 4D image? >>> >>> Thanks, >>> Joel >>> >>> >>> _______________________________________________ >>> 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 Fri Oct 2 02:44:21 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 2 Oct 2015 08:44:21 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Joel, Can you explain how you created your mask? Looking at the code, it seems to me that if you create a 4D image with RTK, create a mask from this image with exactly the same meta info and pass it to ROOSTER, that should work in all cases. If I were you, I would compare the two mhd files (of the mask and the 4D image you used to create it) and verify that the meta info is exactly the same. For ROOSTER, I suggest to add an interpolation when the information is not inconsistent, e.g., in the main() function. I can do it if you agree Cyril. Simon On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry wrote: > Hi Cyril, > > After trying out a few attempts, it seems like some values play nicer than > others. Could it be an issue with floating point comparisons with the > spacing and/or origins? It might explain why certain values seem to work > (1.5) and others do not (0.88). I'll look at what values are being compared > and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >> spacing) and re-creating a mask off of that. So the motion mask should have >> the same dimensions, spacing, and origin as the intended 4D image since I'm >> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >> my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the mask I created >> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >> find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> Good to hear it's working now. >>> The error you get is explained on the wiki in the small paragraph after >>> the cuda command line : >>> >>> Note that the reconstructed volume in this example does not fully >>> contain the attenuating object, causing hyper-attenuation artifacts on the >>> borders of the result. To avoid these artifacts, reconstruct a larger >>> volume (--dimension 256) should be fine. *Note that you will have to >>> resize your motion mask as well, as 3D the motion mask is expected to have >>> the same size, spacing and origin as the first 3 dimensions of the 4D >>> output. * >>> >>> I guess I should take some time to fix that, and allow any motion mask, >>> but until I do, you can resize your motion mask using the CLITK tools ( >>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>> >>> Cyril >>> >>> >>> >>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other datasets and it >>> seems to be working. I need to increase the resolution and play around with >>> the parameters now. >>> >>> I haven't had time to test it too much, but I do get an error when >>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>> haven't tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>> AverageOutOfROIImageFilter: information of ROI image does not match input >>> image" >>> >>> I'll be able to test some other things later and list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> I have fixed the wiki example (command line parameters AND data). Can >>>> you restart it from scratch and let me know if you still have problems ? >>>> >>>> Roughly, the problems were the following: >>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>> coordinates >>>> - the regularization parameters (gamma space and gamma time) were way >>>> too high. The regularization with a high gamma-time caused frames to be >>>> identical, while it should only discourage variations >>>> >>>> I hope it works, now. If it doesn't work for you, please keep asking >>>> Cyril >>>> >>>> >>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki example, and indeed, there are >>>> several mistakes in it. I am working on correcting them. I'll keep you >>>> posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>> example. The 5 frames should show some differences pertaining to patient >>>> motion but the ones that I'm producing are identical, so no motion is >>>> visible. >>>> >>>> Has anyone been able to follow the example and the provided dataset to >>>> create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 cyril.mory at uclouvain.be Fri Oct 2 03:53:14 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 02 Oct 2015 09:53:14 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: <560E37EA.1060702@uclouvain.be> Indeed, resampling the mask if needed, to the correct size, spacing, origin and direction, seems the simplest way to deal with this issue. But I would do it in the filter rather than in the application, so that anything built on top of ROOSTER (i.e. incremental ROOSTER, or the rtkfourdroostertest) also benefits from it. Feel free to do it if you want, otherwise I'll take care of it next week :) On 10/02/2015 08:44 AM, Simon Rit wrote: > Hi Joel, > Can you explain how you created your mask? Looking at the code, it > seems to me that if you create a 4D image with RTK, create a mask from > this image with exactly the same meta info and pass it to ROOSTER, > that should work in all cases. If I were you, I would compare the two > mhd files (of the mask and the 4D image you used to create it) and > verify that the meta info is exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is > not inconsistent, e.g., in the main() function. I can do it if you > agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > > Hi Cyril, > > After trying out a few attempts, it seems like some values play > nicer than others. Could it be an issue with floating point > comparisons with the spacing and/or origins? It might explain why > certain values seem to work (1.5) and others do not (0.88). I'll > look at what values are being compared and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > > wrote: > > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions > 512 (0.88 spacing) and re-creating a mask off of that. So the > motion mask should have the same dimensions, spacing, and > origin as the intended 4D image since I'm using 4D rooster > with --dimension 512 --spacing 0.88. Perhaps I'm creating my > mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I > created for 160 (2), worked but not the case of 512 (0.88), > and let you know what I find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > > wrote: > > Hi Joel, > > Good to hear it's working now. > The error you get is explained on the wiki in the small > paragraph after the cuda command line : > > Note that the reconstructed volume in this example does > not fully contain the attenuating object, causing > hyper-attenuation artifacts on the borders of the result. > To avoid these artifacts, reconstruct a larger volume > (--dimension 256) should be fine. *Note that you will have > to resize your motion mask as well, as 3D the motion mask > is expected to have the same size, spacing and origin as > the first 3 dimensions of the 4D output. * > > I guess I should take some time to fix that, and allow any > motion mask, but until I do, you can resize your motion > mask using the CLITK tools > (http://www.creatis.insa-lyon.fr/rio/vv) or any method > that suits you. > > Cyril > > > > On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other >> datasets and it seems to be working. I need to increase >> the resolution and play around with the parameters now. >> >> I haven't had time to test it too much, but I do get an >> error when attempting to reconstruct with different >> dimensions. I'm using Cuda, and haven't tried it with >> just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws >> "In AverageOutOfROIImageFilter: information of ROI image >> does not match input image" >> >> I'll be able to test some other things later and list >> more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> I have fixed the wiki example (command line >> parameters AND data). Can you restart it from scratch >> and let me know if you still have problems ? >> >> Roughly, the problems were the following: >> - the "mm_50.mha" motion mask file was not aligned >> with the CBCT coordinates >> - the regularization parameters (gamma space and >> gamma time) were way too high. The regularization >> with a high gamma-time caused frames to be identical, >> while it should only discourage variations >> >> I hope it works, now. If it doesn't work for you, >> please keep asking >> Cyril >> >> >> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and >>> indeed, there are several mistakes in it. I am >>> working on correcting them. I'll keep you posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the >>>> 4DROOSTERReconstruction example. The 5 frames >>>> should show some differences pertaining to patient >>>> motion but the ones that I'm producing are >>>> identical, so no motion is visible. >>>> >>>> Has anyone been able to follow the example and the >>>> provided dataset to create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 joelbeaudry at gmail.com Fri Oct 2 12:31:38 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Fri, 2 Oct 2015 09:31:38 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: <560E37EA.1060702@uclouvain.be> References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: Hi Simon and Cyril, @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) and then use itkSnap to create a mask from that 3D image. I then use that mask as the input for ROOSTER, to which I again use the same spacing/dimensions. For some values it seems to work and other it doesn't. I'm wondering if itkSnap is truncating the spacing/dimension/origins when I save my mask, and perhaps why something like (160,2,-159) works but (511,0.88,-224.84). I'll take a look at the metadata. I'll try resampling my masks and like you said that should probably fix my issues. Thanks for the help, Joel On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory wrote: > Indeed, resampling the mask if needed, to the correct size, spacing, > origin and direction, seems the simplest way to deal with this issue. > But I would do it in the filter rather than in the application, so that > anything built on top of ROOSTER (i.e. incremental ROOSTER, or the > rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: > > Hi Joel, > Can you explain how you created your mask? Looking at the code, it seems > to me that if you create a 4D image with RTK, create a mask from this image > with exactly the same meta info and pass it to ROOSTER, that should work in > all cases. If I were you, I would compare the two mhd files (of the mask > and the 4D image you used to create it) and verify that the meta info is > exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is not > inconsistent, e.g., in the main() function. I can do it if you agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values play nicer >> than others. Could it be an issue with floating point comparisons with the >> spacing and/or origins? It might explain why certain values seem to work >> (1.5) and others do not (0.88). I'll look at what values are being compared >> and get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> wrote: >> >>> Hi Cyril, >>> >>> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >>> spacing) and re-creating a mask off of that. So the motion mask should have >>> the same dimensions, spacing, and origin as the intended 4D image since I'm >>> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >>> my mask incorrectly? >>> >>> I'll try and fiddle with it a bit later and see why the mask I created >>> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >>> find. >>> >>> Thanks again, >>> Joel >>> >>> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> Good to hear it's working now. >>>> The error you get is explained on the wiki in the small paragraph after >>>> the cuda command line : >>>> >>>> Note that the reconstructed volume in this example does not fully >>>> contain the attenuating object, causing hyper-attenuation artifacts on the >>>> borders of the result. To avoid these artifacts, reconstruct a larger >>>> volume (--dimension 256) should be fine. *Note that you will have to >>>> resize your motion mask as well, as 3D the motion mask is expected to have >>>> the same size, spacing and origin as the first 3 dimensions of the 4D >>>> output. * >>>> >>>> I guess I should take some time to fix that, and allow any motion mask, >>>> but until I do, you can resize your motion mask using the CLITK tools ( >>>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>>> >>>> Cyril >>>> >>>> >>>> >>>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>>> >>>> Hi Cyril, >>>> >>>> Works like a charm, thanks! I tried it on some other datasets and it >>>> seems to be working. I need to increase the resolution and play around with >>>> the parameters now. >>>> >>>> I haven't had time to test it too much, but I do get an error when >>>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>>> haven't tried it with just cpu reconstruction yet. >>>> >>>> i.e.) >>>> --dimension 160 --spacing 2 -> works >>>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>>> AverageOutOfROIImageFilter: information of ROI image does not match input >>>> image" >>>> >>>> I'll be able to test some other things later and list more details. >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> >>>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>>> wrote: >>>> >>>>> Hi Joel, >>>>> >>>>> I have fixed the wiki example (command line parameters AND data). Can >>>>> you restart it from scratch and let me know if you still have problems ? >>>>> >>>>> Roughly, the problems were the following: >>>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>>> coordinates >>>>> - the regularization parameters (gamma space and gamma time) were way >>>>> too high. The regularization with a high gamma-time caused frames to be >>>>> identical, while it should only discourage variations >>>>> >>>>> I hope it works, now. If it doesn't work for you, please keep asking >>>>> Cyril >>>>> >>>>> >>>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>>> >>>>> Hi Joel, >>>>> >>>>> I have just tried to reproduce the wiki example, and indeed, there are >>>>> several mistakes in it. I am working on correcting them. I'll keep you >>>>> posted. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>>> example. The 5 frames should show some differences pertaining to patient >>>>> motion but the ones that I'm producing are identical, so no motion is >>>>> visible. >>>>> >>>>> Has anyone been able to follow the example and the provided dataset to >>>>> create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 WEICHENG.SHEN at leidos.com Fri Oct 2 22:11:05 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Sat, 3 Oct 2015 02:11:05 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977222@EMP-EXMR104.corp.leidos.com> Hi Simon, Yes, if I run the CMake at the root of RTK, the example builds successfully. Thanks you very much! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 11:24 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng > wrote: Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: 15587 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 15591 bytes Desc: image002.png URL: From simon.rit at creatis.insa-lyon.fr Mon Oct 5 01:45:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 5 Oct 2015 07:45:06 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Oct 5 13:53:11 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 5 Oct 2015 13:53:11 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error1_using_ITK_FFT.png Type: image/png Size: 17214 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error in code.png Type: image/png Size: 21974 bytes Desc: not available URL: From cyril.mory at uclouvain.be Tue Oct 6 08:08:35 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Tue, 06 Oct 2015 14:08:35 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: <5613B9C3.4070309@uclouvain.be> Hi Joel, I have just pushed a fix for this issue: in the 4DROOSTER filter, I have added a resample filter between the ROI input and the AverageOutOfROIImageFilter. On my side, it runs fine. Let me know if it fixes the issue on your side. Thanks for pointing this out, Cyril On 10/02/2015 06:31 PM, Joel Beaudry wrote: > Hi Simon and Cyril, > > @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) > and then use itkSnap to create a mask from that 3D image. I then use > that mask as the input for ROOSTER, to which I again use the same > spacing/dimensions. For some values it seems to work and other it > doesn't. I'm wondering if itkSnap is truncating the > spacing/dimension/origins when I save my mask, and perhaps why > something like (160,2,-159) works but (511,0.88,-224.84). I'll take a > look at the metadata. > > I'll try resampling my masks and like you said that should probably > fix my issues. > > Thanks for the help, > Joel > > On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory > wrote: > > Indeed, resampling the mask if needed, to the correct size, > spacing, origin and direction, seems the simplest way to deal with > this issue. > But I would do it in the filter rather than in the application, so > that anything built on top of ROOSTER (i.e. incremental ROOSTER, > or the rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it > next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: >> Hi Joel, >> Can you explain how you created your mask? Looking at the code, >> it seems to me that if you create a 4D image with RTK, create a >> mask from this image with exactly the same meta info and pass it >> to ROOSTER, that should work in all cases. If I were you, I would >> compare the two mhd files (of the mask and the 4D image you used >> to create it) and verify that the meta info is exactly the same. >> For ROOSTER, I suggest to add an interpolation when the >> information is not inconsistent, e.g., in the main() function. I >> can do it if you agree Cyril. >> Simon >> >> On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values >> play nicer than others. Could it be an issue with floating >> point comparisons with the spacing and/or origins? It might >> explain why certain values seem to work (1.5) and others do >> not (0.88). I'll look at what values are being compared and >> get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with >> dimensions 512 (0.88 spacing) and re-creating a mask off >> of that. So the motion mask should have the same >> dimensions, spacing, and origin as the intended 4D image >> since I'm using 4D rooster with --dimension 512 --spacing >> 0.88. Perhaps I'm creating my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the >> mask I created for 160 (2), worked but not the case of >> 512 (0.88), and let you know what I find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the >> small paragraph after the cuda command line : >> >> Note that the reconstructed volume in this example >> does not fully contain the attenuating object, >> causing hyper-attenuation artifacts on the borders of >> the result. To avoid these artifacts, reconstruct a >> larger volume (--dimension 256) should be fine. *Note >> that you will have to resize your motion mask as >> well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 >> dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and >> allow any motion mask, but until I do, you can resize >> your motion mask using the CLITK tools >> (http://www.creatis.insa-lyon.fr/rio/vv) or any >> method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other >>> datasets and it seems to be working. I need to >>> increase the resolution and play around with the >>> parameters now. >>> >>> I haven't had time to test it too much, but I do get >>> an error when attempting to reconstruct with >>> different dimensions. I'm using Cuda, and haven't >>> tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> >>> throws "In AverageOutOfROIImageFilter: information >>> of ROI image does not match input image" >>> >>> I'll be able to test some other things later and >>> list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> >> > wrote: >>> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line >>> parameters AND data). Can you restart it from >>> scratch and let me know if you still have >>> problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not >>> aligned with the CBCT coordinates >>> - the regularization parameters (gamma space and >>> gamma time) were way too high. The >>> regularization with a high gamma-time caused >>> frames to be identical, while it should only >>> discourage variations >>> >>> I hope it works, now. If it doesn't work for >>> you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki >>>> example, and indeed, there are several mistakes >>>> in it. I am working on correcting them. I'll >>>> keep you posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the >>>>> 4DROOSTERReconstruction example. The 5 frames >>>>> should show some differences pertaining to >>>>> patient motion but the ones that I'm producing >>>>> are identical, so no motion is visible. >>>>> >>>>> Has anyone been able to follow the example and >>>>> the provided dataset to create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 Oct 6 09:11:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 6 Oct 2015 15:11:27 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park wrote: > Hi Simon, > > > > I?ve just tried to build it without FFTW library, as you have asked. > > > > I have encountered an error as shown in the attached pictures in running > ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, making > FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > > > Hope it helps. > > > > Yang > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Thanks a lot Yang for the detailed report, I'm sure that will be helpful > to many people. For my personal information, did you try to compile FFTW > from ITK as well? If it didn't work, could you let us know what was the > problem? > > Simon > > > > > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Tue Oct 6 10:49:55 2015 From: theday79 at gmail.com (Yang K Park) Date: Tue, 6 Oct 2015 10:49:55 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: <001c01d10046$44941080$cdbc3180$@gmail.com> Hi Simon, It seems that I misunderstood before. This time, I?ve followed your suggestion and encountered an error as follows: H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): fatal error C1083: Cannot open include file: 'fftw3.h': No such file or directory I?ve tested this with itk4.8.1, which is the most up-to-date release version. It seems that I need to specify the external fftw header file (fftw3.h), but the user interface for input does not appear in CMake unless I set ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. I hope this report can help itk developers resolve the issue. Thanks. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Tuesday, October 06, 2015 9:11 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com ] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park > Cc: Cyril Mory >; Matthew J. Riblett >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Tue Oct 6 11:00:16 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Tue, 6 Oct 2015 17:00:16 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <001c01d10046$44941080$cdbc3180$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> <001c01d10046$44941080$cdbc3180$@gmail.com> Message-ID: <5613E200.4050001@kitware.com> Yang, Simon, As I mentioned previously, you cannot build ITK with FFTW on Windows without setting ITK_USE_SYSTEM_FFTW=ON. You should get a warning in CMake specifying this. So the only solution to build ITK with FFTW on Windows is to use an externally compiled version of FFTW. Julien On 06/10/2015 16:49, Yang K Park wrote: > Hi Simon, > > It seems that I misunderstood before. This time, I?ve followed your > suggestion and encountered an error as follows: > > H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): > fatal error C1083: Cannot open include file: 'fftw3.h': No such file or > directory > > I?ve tested this with itk4.8.1, which is the most up-to-date release > version. > > It seems that I need to specify the external fftw header file (fftw3.h), > but the user interface for input does not appear in CMake unless I set > ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. > > I hope this report can help itk developers resolve the issue. > > Thanks. > > Yang > > *From:*simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of > *Simon Rit > *Sent:* Tuesday, October 06, 2015 9:11 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett > ; rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks Yang. I think I wasn't clear but what I meant was not to disable > FFTW but to compile and use FFTW in ITK by using > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=OFF > > instead of what I think you used > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=ON > > Julien Jomier from Kitware told me that both configurations worked for > him but your initial message suggests that the first did not work for > you. If you can confirm and explain your config (ITK version, compiler, > etc.). > > Simon > > PS: your test is useful anyway, I'll try to make the error message > clearer when FFTW is not used. > > On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: > > Hi Simon, > > I?ve just tried to build it without FFTW library, as you have asked. > > I have encountered an error as shown in the attached pictures in > running ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, > making FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > Hope it helps. > > Yang > > *From:*simon.rit at gmail.com > [mailto:simon.rit at gmail.com ] *On Behalf > Of *Simon Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > > *Cc:* Cyril Mory >; Matthew J. Riblett > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks a lot Yang for the detailed report, I'm sure that will be > helpful to many people. For my personal information, did you try to > compile FFTW from ITK as well? If it didn't work, could you let us > know what was the problem? > > Simon > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: > > Hi Cyril, > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally > succeeded. > > Following is the final version of my instruction. > > Thanks. > > Yang > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very > convenient! I really like it. Thanks for your hard works on this. > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > 1.Prepare fftw library files > > a.Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b.Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c.Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command > Prompt) > > d.Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e.Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > 2.Cmake for ITK > > a.Configure > > b.Turn on the following and reconfigure > > i.ITK_USE_SYSTEM_FFTW (mandatory to make the following options > appear) > > c.Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i.FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 > > ii.FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii.FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv.FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. > > d."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e.Reconfigure, Generate > > 3.Build ITK with Visual Studio > > a.In both Debug and Release > > 4.Cmake for RTK > > a.Default settings were used. > > b."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > 5.Build RTK using Visual Studio > > 6.Copy dll files to RTK bin folders > > a.Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b.To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7.Build RTK with Visual Studio > > *From:*Cyril Mory [mailto:cyril.mory at uclouvain.be > ] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park >; 'Matthew J. Riblett' > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam > Shroud > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just > have to activate it in the CMake options. On Windows, you cannot > do that. I do not have a clue why, but you cannot. You have to > install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled > DLLs from http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the > .lib files (that is absolutely necessary). You may have to run > the "lib.exe" program from the VS developer prompt instead of > the standard windows cmd.exe prompt. Specify you CPU > architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, > and you should be fine. I have successfully compiled this with > BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it > matters. > > If it works for you, then you might want to play around with the > other FFTW .lib files, and send on this mailing list a more > complete set of CMAKE options that works. I have tried some > other combinations without success, so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS > 2013) and I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with ?ITK + > FFTW? in windows system? > > I?m just trying to use *rtkextractshroudsignal* and it seems > to require FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors > as shown below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > I?m running on Ubuntu 14.04 LTS and used the distribution > library (FFTW 3.3.3). If you?re running on a Debian-based > linux system, you can also install the full development > library set using the following command: */sudo apt-get > install libfftw3-3 libfftw3-dev/*. Then just make sure that > these libraries are being used by rerunning CCMake. > > I?m not quite sure about the error being thrown in your > build, but perhaps one of the main developers would be able > to provide some more insight into the issue. > > Hope this helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to > compile ITK with those options on as you suggested. > > I?ve tried to use the up-to-date version of FFTW > (3.3.4), but it seems that it doesn?t work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved > external symbol __imp_fftw_execute referenced in > function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully > using in which system(Windows or Linux)? > > Thanks. > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the > inclusion of the Fast Fourier Transform components. > This requires compilation with the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that > way initially, and it took a little bit of time to > figure out. > > Hope that helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since > I?ve found my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data > from Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success > since my initial posting ? in fact I?m currently > working on a new method for accomplishing this task > in certain challenging cases. > > The most recent version of RTK provides an update to > the rtkextractshroudsignal application which > provides a phase signal output when called using the > ?-p? flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o > raw_signal.txt -p phase_signal.txt --method > LINEAR_BETWEEN_MINIMA/* > > From what I?ve experienced, this generally provides > a good signal [0,1) characterizing the respiratory > phase using the default settings. Occasionally, > I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear > signal (by appending the *--unsharp ##* flag to the > command). On more challenging shroud images ? > notably, those with little detectable signal from > background ? additional contrast-enhancement by > pre-processing of the shroud has assisted in signal > extraction. > > I hope that helps ? and please let me know how it > works out for you. > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue > and it would be highly appreciated if you can > share with me your updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical > School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:* Rtk-users > [mailto:rtk-users-bounces at public.kitware.com] > *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > > > *Cc:* rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal > data from Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab > script, but I've had good success with using a > Hilbert function in python (scipy). I'm sure > that Matlab has an equivalent function, and > maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. > Riblett > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a > straightforward method of going from the > results of the rtkamsterdamshroud and > rtkextractshroudsignal applications to a > [0,1) phase signal for performing > motion-compensated reconstruction. I?ve > been following along with the MC-CBCT > Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is > used to process the should signal prior to > feeding it back into the reconstruction > application, but there is no mention of how > this is accomplished. I?m trying to > implement this into an automated workflow > and I?d love to know how this was accomplished. > > Thanks! > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > > MCV Office Phone: +1.804.628.4858 > > > > _______________________________________________ > 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 > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From bottiger at gmail.com Mon Oct 12 05:42:20 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 11:42:20 +0200 Subject: [Rtk-users] Reconstruction problems Message-ID: Hi there I hope someone can help me me get started with RTK. First of all I should mention that I have compiled RTK on Windows 7 using Visual Studio 2013. Everything seems to compile and run just fine. Secondly: I tried to reproduce this example: http://wiki.openrtk.org/index.php/RTK/Scripts/FDK This was somewhat successful - I think. I could generate some projections, and reconstruct them. However, it just looks like an egg and not like a Shepp Logan phantom. See attachment. However, I'm unsure if this is expected or not. I took some homemade projections (of a small cylinder) and converted them into a MHA file (using rtkprojections.exe). The file looks correct in ImageJ. The dimensions are 370 pixels * 195 pixels * 361 projections You can get the file here: https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 The problem is that the reconstruction is wrong (see cylinder_recon). It looks like the dimensions are not read correctly, but I am unsure how I fix that? The rtkfdk.exe has a single --dimension parameter, but I am unsure which dimension that is suppose to be, but neither 195, 370 or any other value I could think of works for me. I hope someone can help me in the right direction. best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: SheppLogan.PNG Type: image/png Size: 150153 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cylinder_recon.PNG Type: image/png Size: 128472 bytes Desc: not available URL: From ghostcz at hotmail.com Mon Oct 12 05:54:44 2015 From: ghostcz at hotmail.com (louie L) Date: Mon, 12 Oct 2015 11:54:44 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Hi, You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? Cheers, Louie Sent from my iOS > On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 05:59:38 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 11:59:38 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: References: Message-ID: <561B848A.9090406@uclouvain.be> Hi Arvid, Well, you're on the right track :-) Your Shepp Logan reconstruction looks fine, I guess it is just a visualization problem: you can use vv http://www.creatis.insa-lyon.fr/rio/vv to open it and you will be able to change the "window" and "level" settings in visualization. Regarding the cylinder, can you send your geometry file too ? Regards Cyril Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Mon Oct 12 06:35:27 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:35:27 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: <561B848A.9090406@uclouvain.be> References: <561B848A.9090406@uclouvain.be> Message-ID: Hey Cyril I just wrote another e-mail about how I generated the geometry file (it's just simulated). But just in case I'll attach it here: best Arvid On Mon, Oct 12, 2015 at 11:59 AM, Cyril Mory wrote: > Hi Arvid, > > Well, you're on the right track :-) > Your Shepp Logan reconstruction looks fine, I guess it is just a > visualization problem: you can use vv > http://www.creatis.insa-lyon.fr/rio/vv > to open it and you will be able to change the "window" and "level" > settings in visualization. > > Regarding the cylinder, can you send your geometry file too ? > > Regards > Cyril > > Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example:http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here:https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > > > ------------------------------ > [image: Avast logo] > > L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le > logiciel antivirus Avast. > www.avast.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry360.xml Type: text/xml Size: 134495 bytes Desc: not available URL: From bottiger at gmail.com Mon Oct 12 06:36:03 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:36:03 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Sure. I'll admit I have yet to understand the specifics of the geometry file. Currently I just used a simulated one because that was what the SheppLogan example used, and the input projections looked similar. Here is a complete list of the commands I executed: rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 I did not do anything to the contrast and that is most likely the issue. I downloaded and installed vv and I can see some (very unclear) features inside the SheppLogan reconstruction - so that's nice. However, currently I'm mostly interested in getting the geometry right :) best On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: > Hi, > > You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? > > Cheers, > Louie > > Sent from my iOS > >> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >> >> Hi there >> >> I hope someone can help me me get started with RTK. >> >> First of all I should mention that I have compiled RTK on Windows 7 >> using Visual Studio 2013. Everything seems to compile and run just >> fine. >> >> Secondly: I tried to reproduce this example: >> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >> >> This was somewhat successful - I think. I could generate some >> projections, and reconstruct them. However, it just looks like an egg >> and not like a Shepp Logan phantom. See attachment. >> >> However, I'm unsure if this is expected or not. I took some homemade >> projections (of a small cylinder) and converted them into a MHA file >> (using rtkprojections.exe). The file looks correct in ImageJ. The >> dimensions are 370 pixels * 195 pixels * 361 projections >> >> You can get the file here: >> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >> >> The problem is that the reconstruction is wrong (see cylinder_recon). >> It looks like the dimensions are not read correctly, but I am unsure >> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >> I am unsure which dimension that is suppose to be, but neither 195, >> 370 or any other value I could think of works for me. >> >> I hope someone can help me in the right direction. >> >> best >> >> Arvid >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 15:52:10 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 21:52:10 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: <561C0F6A.6080602@uclouvain.be> Hi Arvid, Unfortunately, you cannot do that. You have to obtain the exact geometry of this particular acquisition from the cone beam device you used. If you need help to convert it to the RTK format, well, that's something you can ask for on this mailing list. Can you get the geometry data ? Regards, Cyril Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : > Sure. > > I'll admit I have yet to understand the specifics of the geometry > file. Currently I just used a simulated one because that was what the > SheppLogan example used, and the input projections looked similar. > > Here is a complete list of the commands I executed: > > rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml > > rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ > --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif > > rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o > c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g > c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 > > I did not do anything to the contrast and that is most likely the > issue. I downloaded and installed vv and I can see some (very unclear) > features inside the SheppLogan reconstruction - so that's nice. > However, currently I'm mostly interested in getting the geometry right :) > > best > > On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >> Hi, >> >> You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? >> >> Cheers, >> Louie >> >> Sent from my iOS >> >>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >>> >>> Hi there >>> >>> I hope someone can help me me get started with RTK. >>> >>> First of all I should mention that I have compiled RTK on Windows 7 >>> using Visual Studio 2013. Everything seems to compile and run just >>> fine. >>> >>> Secondly: I tried to reproduce this example: >>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>> >>> This was somewhat successful - I think. I could generate some >>> projections, and reconstruct them. However, it just looks like an egg >>> and not like a Shepp Logan phantom. See attachment. >>> >>> However, I'm unsure if this is expected or not. I took some homemade >>> projections (of a small cylinder) and converted them into a MHA file >>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>> dimensions are 370 pixels * 195 pixels * 361 projections >>> >>> You can get the file here: >>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>> >>> The problem is that the reconstruction is wrong (see cylinder_recon). >>> It looks like the dimensions are not read correctly, but I am unsure >>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>> I am unsure which dimension that is suppose to be, but neither 195, >>> 370 or any other value I could think of works for me. >>> >>> I hope someone can help me in the right direction. >>> >>> best >>> >>> Arvid >>> >>> >>> _______________________________________________ >>> 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 --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From cyril.mory at uclouvain.be Mon Oct 12 16:36:24 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 22:36:24 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: <561C1984.9030509@uclouvain.be> References: <561C1984.9030509@uclouvain.be> Message-ID: <561C19C8.5050304@uclouvain.be> Arvid, You can find a description of the geometry here : http://www.creatis.insa-lyon.fr/~srit/geometry.pdf In rtk/applications, several applications are simple converters from the cone beam manufacturer's raw geometry format to RTK geometry format, so you can also have a look at the code of these apps. If you know that you have an almost parallel beam, you can indeed try to use a dummy geometry file, but be careful: rtksimulatedgeometry generates a cone beam geometry, with large fan and cone angles if you leave the default parameters. You can adjust the 'sdd' and 'sid' options to simulate a very distant source, making rays almost parallel to each other (be careful with numerical precision, though). Hope it helps, Cyril Le 12/10/2015 21:59, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hello Cyril > > Thank you for getting back to me. I do have the geometry (albeit not > right here next to me). > However, my problem was that when I looked in the geometry file, I > didn't find it obvious how to define declare it - is it documented > somewhere? > > That said - the measurements I played around with is measured with an > almost parallel beam. I hoped I could reconstruct it (with minor > artifacts) using a dummy geometry file. > > best > > Arvid > > On Mon, Oct 12, 2015 at 9:52 PM, Cyril Mory wrote: >> Hi Arvid, >> >> Unfortunately, you cannot do that. You have to obtain the exact geometry of >> this particular acquisition from the cone beam device you used. >> If you need help to convert it to the RTK format, well, that's something you >> can ask for on this mailing list. >> Can you get the geometry data ? >> >> Regards, >> Cyril >> >> >> Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : >>> Sure. >>> >>> I'll admit I have yet to understand the specifics of the geometry >>> file. Currently I just used a simulated one because that was what the >>> SheppLogan example used, and the input projections looked similar. >>> >>> Here is a complete list of the commands I executed: >>> >>> rtksimulatedgeometry.exe -n 361 -o >>> c:\Users\aplb\Work\out_dir\geometry360.xml >>> >>> rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ >>> --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif >>> >>> rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o >>> c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g >>> c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 >>> >>> I did not do anything to the contrast and that is most likely the >>> issue. I downloaded and installed vv and I can see some (very unclear) >>> features inside the SheppLogan reconstruction - so that's nice. >>> However, currently I'm mostly interested in getting the geometry right :) >>> >>> best >>> >>> On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >>>> Hi, >>>> >>>> You can specify the size in each dimension. Can you post the arguments >>>> you used for the projections and reconstruction? Did you try to adjust the >>>> contrast of the output? >>>> >>>> Cheers, >>>> Louie >>>> >>>> Sent from my iOS >>>> >>>>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger >>>>> wrote: >>>>> >>>>> Hi there >>>>> >>>>> I hope someone can help me me get started with RTK. >>>>> >>>>> First of all I should mention that I have compiled RTK on Windows 7 >>>>> using Visual Studio 2013. Everything seems to compile and run just >>>>> fine. >>>>> >>>>> Secondly: I tried to reproduce this example: >>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>>>> >>>>> This was somewhat successful - I think. I could generate some >>>>> projections, and reconstruct them. However, it just looks like an egg >>>>> and not like a Shepp Logan phantom. See attachment. >>>>> >>>>> However, I'm unsure if this is expected or not. I took some homemade >>>>> projections (of a small cylinder) and converted them into a MHA file >>>>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>>>> dimensions are 370 pixels * 195 pixels * 361 projections >>>>> >>>>> You can get the file here: >>>>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>>>> >>>>> The problem is that the reconstruction is wrong (see cylinder_recon). >>>>> It looks like the dimensions are not read correctly, but I am unsure >>>>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>>>> I am unsure which dimension that is suppose to be, but neither 195, >>>>> 370 or any other value I could think of works for me. >>>>> >>>>> I hope someone can help me in the right direction. >>>>> >>>>> best >>>>> >>>>> Arvid >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >> >> >> --- >> L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le >> logiciel antivirus Avast. >> https://www.avast.com/antivirus >> --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From gnthibault at gmail.com Wed Oct 14 05:38:46 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Wed, 14 Oct 2015 11:38:46 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter Message-ID: Dear all, I recently had troubles while trying to rewrite my code, linked with libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite well, to using fdk reconstruction method. My first question: is there a general way to enable maximum debug log level at runtime in rtk ? My second question, is more specific: is it normal that I see such error message coming from itk when using FDKConeBeamReconstructionFilter : ExceptionObject caught with fdk->Update() in file [...] itk::ExceptionObject (0x7f377c020cb0) Location: "unknown" File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx Line: 416 Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred during SingleMethodExecute /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): Cannot compute FFT of image with size [2048, 1024, 11]. VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose size in each dimension has a prime factorization consisting of only 2s, 3s, or 5s. I suppose that this error arise while performing ramp filtering, but I see no relation between FFT configuration stated in the error log ( [2048, 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 projections. I also tried with 200 projection and I had the same problem, but with [2048, 1024, 34] Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to the total number of projection in my dataset every time. The revision I am currently using: commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 Merge: 578cf89 09d820c Thank you in advance for your help. Regards Thibault Notargiacomo -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 14 12:58:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 14 Oct 2015 18:58:06 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Hi Thibault, No, there is not really a log system that would allow you debugging at run time. You can compile a debug version that would enable a lot of messages related to the pipeline. For this, I think you need to use NDEBUG at compilation (it's an ITK mechanism that I never use). No, it's not normal that you see an error message. There are two things: - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it only handles power of 2/3/5 dimensions and it's slow. I always advise people to use FFTW by turning on ITK_USE_FFTW options during ITK's compilation. - I don't fully understand why vnl doesn't work either. I understand the first two dimensions, for vnl (which I strongly suggest to not use), I pad to the next power of 2 so 780 * 2 (for zero padding) -> 2048 780 -> 1024 but then, if you use 64 projections, why 11? Are you sure the second input image to FDKConeBeamReconstructionImageFilter has the dimension you want? I would try to connect input 2 to an itk::ImageFileWriter and check what are the dimensions of this image. If you're absolutely sure, then I'll try to reproduce and fix the issue. Simon On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < gnthibault at gmail.com> wrote: > Dear all, > > I recently had troubles while trying to rewrite my code, linked with > libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite > well, to using fdk reconstruction method. > > My first question: is there a general way to enable maximum debug log > level at runtime in rtk ? > > My second question, is more specific: is it normal that I see such error > message coming from itk when using FDKConeBeamReconstructionFilter : > > ExceptionObject caught with fdk->Update() in file [...] > > itk::ExceptionObject (0x7f377c020cb0) > Location: "unknown" > File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx > Line: 416 > Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred > during SingleMethodExecute > > /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: > itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): > Cannot compute FFT of image with size [2048, 1024, 11]. > VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose > size in each dimension has a prime factorization consisting of only 2s, 3s, > or 5s. > > I suppose that this error arise while performing ramp filtering, but I see > no relation between FFT configuration stated in the error log ( [2048, > 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 > projections. > > I also tried with 200 projection and I had the same problem, but with > [2048, 1024, 34] > > Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to > the total number of projection in my dataset every time. > > The revision I am currently using: > commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 > Merge: 578cf89 09d820c > > > Thank you in advance for your help. > > Regards > > Thibault Notargiacomo > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scouser27 at gmail.com Wed Oct 14 16:27:48 2015 From: scouser27 at gmail.com (sco user) Date: Wed, 14 Oct 2015 21:27:48 +0100 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi I'm a new user to RTK. I've been able to perform reconstructions of the Catphan and my own copies of Varian CBCT images with some success. I enabled the CUDA flags when making RTK so as to take advantage of the capabilities of my GPU. When I use --hardware="cuda" with the rtkfdk application, I have found that I must specify the lowmem option in order to get the reconstruction to run successfully. If I don't use lowmem, I get the following error: #### Reconstructing and writing... /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ unknown : Cuda Error : out of memory ExceptionObject caught with writer->Update() in file /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 itk::ExceptionObject (0x18e3460) Location: "unknown" File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h Line: 55 Description: Cuda Error : out of memory #### I take from this that I'm out of memory on the GPU. Is that correct? The GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be in order to get a typical Varian reconstruction to run without the lowmem option. On a side note, I know that the cuda option is working because it's a lot quicker than hardware="cpu", despite only having 96 cuda cores. Another question I'd like to ask is if anyone can shed some light on useful values for I-zero, wpc, scatter etc. With thanks in advance, Dave. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Oct 15 03:09:05 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 15 Oct 2015 09:09:05 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Without the lowmem flag all projection images may be loaded into graphics memory at once causing an out-of-memory issues. You can also check this thread: http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html Regards, Chao 2015-10-14 22:27 GMT+02:00 sco user : > Hi > > I'm a new user to RTK. > I've been able to perform reconstructions of the Catphan and my own copies > of Varian CBCT images with some success. I enabled the CUDA flags when > making RTK so as to take advantage of the capabilities of my GPU. > > When I use --hardware="cuda" with the rtkfdk application, I have found > that I must specify the lowmem option in order to get the reconstruction to > run successfully. If I don't use lowmem, I get the following error: > > #### > Reconstructing and writing... > /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ > unknown : Cuda Error : out of memory > > ExceptionObject caught with writer->Update() in file > /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 > > itk::ExceptionObject (0x18e3460) > Location: "unknown" > File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h > Line: 55 > Description: Cuda Error : out of memory > #### > > I take from this that I'm out of memory on the GPU. Is that correct? The > GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be > in order to get a typical Varian reconstruction to run without the lowmem > option. > > On a side note, I know that the cuda option is working because it's a lot > quicker than hardware="cpu", despite only having 96 cuda cores. > > > Another question I'd like to ask is if anyone can shed some light on > useful values for I-zero, wpc, scatter etc. > > With thanks in advance, > Dave. > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Thu Oct 15 03:52:25 2015 From: itkhelpacc at gmail.com (vishal k) Date: Thu, 15 Oct 2015 13:22:25 +0530 Subject: [Rtk-users] Need some help with Projection of 3D CT data Message-ID: hi, Im working on a CT data set using ITK.. Im trying to come up with a registration algorithm for fluoroscopy image obtained from C-Arm taken at some angle wrt to the patient and the projection of CT data taken at the same angle as that of the C-arm.. i need to change the angles of projection and the focal length of the source from time to time for my study.. I was wondering if i could do that using RTK? If yes, could you tell me where I find information that is relevant to my problem..Thank you Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 15 05:11:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:11:00 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Regarding the parameters (I-zero, wpc, scatter etc), we still need to create wiki pages to describe this (as agreed on during the Jul 31 meeting ). In the meantime, you'll find some info in each filter documentation. You can go to the projection pre-processing filter , look at the (complex) clickable graph and try to navigate in it. For example, I0 is for the LUTbasedVariableI0RawToAttenuationImageFilter and (therefore), inapplicable to Varian data as is. I'll keep the mailing list posted when we add info to the wiki. Good luck, Simon On Thu, Oct 15, 2015 at 9:09 AM, Chao Wu wrote: > Hi Dave, > > Without the lowmem flag all projection images may be loaded into graphics > memory at once causing an out-of-memory issues. > You can also check this thread: > http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html > > Regards, > Chao > > 2015-10-14 22:27 GMT+02:00 sco user : > >> Hi >> >> I'm a new user to RTK. >> I've been able to perform reconstructions of the Catphan and my own >> copies of Varian CBCT images with some success. I enabled the CUDA flags >> when making RTK so as to take advantage of the capabilities of my GPU. >> >> When I use --hardware="cuda" with the rtkfdk application, I have found >> that I must specify the lowmem option in order to get the reconstruction to >> run successfully. If I don't use lowmem, I get the following error: >> >> #### >> Reconstructing and writing... >> /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ >> unknown : Cuda Error : out of memory >> >> ExceptionObject caught with writer->Update() in file >> /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 >> >> itk::ExceptionObject (0x18e3460) >> Location: "unknown" >> File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h >> Line: 55 >> Description: Cuda Error : out of memory >> #### >> >> I take from this that I'm out of memory on the GPU. Is that correct? The >> GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be >> in order to get a typical Varian reconstruction to run without the lowmem >> option. >> >> On a side note, I know that the cuda option is working because it's a lot >> quicker than hardware="cpu", despite only having 96 cuda cores. >> >> >> Another question I'd like to ask is if anyone can shed some light on >> useful values for I-zero, wpc, scatter etc. >> >> With thanks in advance, >> Dave. >> >> >> _______________________________________________ >> 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 Thu Oct 15 05:33:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:33:42 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Yes, RTK can certainly do things like that. Start with a simple geometry following the example Forward projection of the wiki and maybe come back to us with more precise questions? Good luck, Simon On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: > hi, > Im working on a CT data set using ITK.. Im trying to come up with a > registration algorithm for fluoroscopy image obtained from C-Arm taken at > some angle wrt to the patient and the projection of CT data taken at the > same angle as that of the C-arm.. i need to change the angles of projection > and the focal length of the source from time to time for my study.. I was > wondering if i could do that using RTK? If yes, could you tell me where I > find information that is relevant to my problem..Thank you > Regards > > _______________________________________________ > Rtk-users mailing 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 Oct 15 05:49:16 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:49:16 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Hi, Please stick to the mailing list. That's exactly what I understood and my previous answer is still valid. Simon On Thu, Oct 15, 2015 at 11:47 AM, vishal k wrote: > hi Simon, > Thanks for ur advice..sorry i couldn't explain it properly...here my > problem explained in detail.. I have to register 3D ct data with > Fluoroscopy image obtained during surgery.. the problem is that they use > different co-ordinate systems.. I thought since i can obtained the C arm > position using the DICOM tags (source to patient distance etc), i could use > these positions values to obtain forward projection of the CT data.. after > doing this I feel my registering the forward projection image and the > actual fluoroscopy image(obtained during the surgery) would be easier...Please > advice me if there is any better way to deal this problem.. > Regards > Vishal > > On Thu, Oct 15, 2015 at 3:03 PM, Simon Rit > wrote: > >> Yes, RTK can certainly do things like that. Start with a simple geometry >> following the example Forward projection >> of the >> wiki and maybe come back to us with more >> precise questions? >> Good luck, >> Simon >> >> On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: >> >>> hi, >>> Im working on a CT data set using ITK.. Im trying to come up with a >>> registration algorithm for fluoroscopy image obtained from C-Arm taken at >>> some angle wrt to the patient and the projection of CT data taken at the >>> same angle as that of the C-arm.. i need to change the angles of projection >>> and the focal length of the source from time to time for my study.. I was >>> wondering if i could do that using RTK? If yes, could you tell me where I >>> find information that is relevant to my problem..Thank you >>> Regards >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnthibault at gmail.com Thu Oct 15 07:55:17 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Thu, 15 Oct 2015 13:55:17 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Thank you very much Simon for this advice, I should have read more carefully the recent posts about FFTWF / FFTWD. Now that Itk has been rebuilt using these flags, I no longer experience the previous problem. Unfortunately, when reconstructing with the CPU version of FDK, it seems that, although Ramp filtering and backprojection now do work very well, I still have issues with the weighting filter of FDK. As I am not familiar with analytic reconstruction methods, I don't know if the geometric parameters that are generated by the import method of Reg23ProjectionGeometry are consistant with the high variability of the gain factor applied to my projection by FDKWeightProjectionFilter: Just a short example: When using the following geometric parameters: SrcToCenter -1045.84 SrcToDet -1261.02 srcOffX 6.56918 srcOffY 6.56918 ProjOffX -151.44 ProjOffY -151.44 => FDKWeighting filter outputs an image that has a mean of -1.518 with a standard deviation of 2.056 with minimum value of -6.130 and maximum value of 1.871 On a frame where the source offset seems to be a little bit lower, I have the following gemetric parameters: SrcToCenter -1042.66 SrcToDet -1257.4 srcOffX 1.25469 srcOffY 1.25469 ProjOffX -150.321 ProjOffY -150.321 => FDKWeighting filter outputs an image that has a mean of -4.279E-4 with a standard deviation of 5.786E-4 with minimum value of -0.005 and maximum value of 5.268E-4 For comparison, our attenuation images in input of FDK have a mean of 0.8 with a standard deviation of 1.09 with minimum value of -1 and maximum value of 3.262. Here the negative values of attenuation arise from a problem while approximating the I0 in our images, although we should work on that problem, it was not that critical in SART reconstruction. I am surprised by such an important difference in gain applied to projection, given that, when disabling manually this weighting filter in RTK code, RampFiltering and BackProjection alone provided visually good reconstruction results. If you have any idea of what could have gone wrong in the process of importing geometry and/or applying weighting filter, I would be glad to hear it. Thank you in advance. Kind regards Thibault Notargiacomo 2015-10-14 18:58 GMT+02:00 Simon Rit : > Hi Thibault, > No, there is not really a log system that would allow you debugging at run > time. You can compile a debug version that would enable a lot of messages > related to the pipeline. For this, I think you need to use NDEBUG at > compilation (it's an ITK mechanism that I never use). > No, it's not normal that you see an error message. There are two things: > - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it > only handles power of 2/3/5 dimensions and it's slow. I always advise > people to use FFTW by turning on ITK_USE_FFTW options during ITK's > compilation. > - I don't fully understand why vnl doesn't work either. I understand the > first two dimensions, for vnl (which I strongly suggest to not use), I pad > to the next power of 2 so > 780 * 2 (for zero padding) -> 2048 > 780 -> 1024 > but then, if you use 64 projections, why 11? Are you sure the second input > image to FDKConeBeamReconstructionImageFilter has the dimension you want? I > would try to connect input 2 to an itk::ImageFileWriter and check what are > the dimensions of this image. If you're absolutely sure, then I'll try to > reproduce and fix the issue. > Simon > > On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < > gnthibault at gmail.com> wrote: > >> Dear all, >> >> I recently had troubles while trying to rewrite my code, linked with >> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >> well, to using fdk reconstruction method. >> >> My first question: is there a general way to enable maximum debug log >> level at runtime in rtk ? >> >> My second question, is more specific: is it normal that I see such error >> message coming from itk when using FDKConeBeamReconstructionFilter : >> >> ExceptionObject caught with fdk->Update() in file [...] >> >> itk::ExceptionObject (0x7f377c020cb0) >> Location: "unknown" >> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >> Line: 416 >> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >> during SingleMethodExecute >> >> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >> Cannot compute FFT of image with size [2048, 1024, 11]. >> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >> size in each dimension has a prime factorization consisting of only 2s, 3s, >> or 5s. >> >> I suppose that this error arise while performing ramp filtering, but I >> see no relation between FFT configuration stated in the error log ( [2048, >> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >> projections. >> >> I also tried with 200 projection and I had the same problem, but with >> [2048, 1024, 34] >> >> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >> to the total number of projection in my dataset every time. >> >> The revision I am currently using: >> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >> Merge: 578cf89 09d820c >> >> >> Thank you in advance for your help. >> >> Regards >> >> Thibault Notargiacomo >> >> _______________________________________________ >> Rtk-users mailing 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 Oct 15 10:50:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 16:50:30 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Interesting... I never used a geometry with negative sdd and sid but that's the issue here in my opinion. I did a quick test with positive and negative sdd/sid and that does not work for me either. Can you make them positive somehow? BTW, do you still use a modified version of the reg23 and can you share it? Thanks, Simon PS: the script I used for the test: rtksimulatedgeometry \ -o g \ -n 360 \ --sdd 1500 \ --sid 1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o pos.mha -g g rtksimulatedgeometry \ -o g \ -n 360 \ --sdd -1500 \ --sid -1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o neg.mha -g g On Thu, Oct 15, 2015 at 1:55 PM, Notargiacomo Thibault wrote: > Thank you very much Simon for this advice, I should have read more > carefully the recent posts about FFTWF / FFTWD. > > Now that Itk has been rebuilt using these flags, I no longer experience > the previous problem. > Unfortunately, when reconstructing with the CPU version of FDK, it seems > that, although Ramp filtering and backprojection now do work very well, I > still have issues with the weighting filter of FDK. > > As I am not familiar with analytic reconstruction methods, I don't know if > the geometric parameters that are generated by the import method of > Reg23ProjectionGeometry are consistant with the high variability of the > gain factor applied to my projection by FDKWeightProjectionFilter: > > Just a short example: > When using the following geometric parameters: > > SrcToCenter -1045.84 > SrcToDet -1261.02 > srcOffX 6.56918 > srcOffY 6.56918 > ProjOffX -151.44 > ProjOffY -151.44 > > => FDKWeighting filter outputs an image that has a mean of -1.518 with a > standard deviation of 2.056 with minimum value of -6.130 and maximum > value of 1.871 > > > On a frame where the source offset seems to be a little bit lower, I have > the following gemetric parameters: > > SrcToCenter -1042.66 > SrcToDet -1257.4 > srcOffX 1.25469 > srcOffY 1.25469 > ProjOffX -150.321 > ProjOffY -150.321 > > => FDKWeighting filter outputs an image that has a mean of -4.279E-4 > with a standard deviation of 5.786E-4 with minimum value of -0.005 and > maximum value of 5.268E-4 > > For comparison, our attenuation images in input of FDK have a mean of 0.8 > with a standard deviation of 1.09 with minimum value of -1 and maximum > value of 3.262. > > Here the negative values of attenuation arise from a problem while > approximating the I0 in our images, although we should work on that > problem, it was not that critical in SART reconstruction. > > I am surprised by such an important difference in gain applied to > projection, given that, when disabling manually this weighting filter in > RTK code, RampFiltering and BackProjection alone provided visually good > reconstruction results. > > If you have any idea of what could have gone wrong in the process of > importing geometry and/or applying weighting filter, I would be glad to > hear it. > > Thank you in advance. > > Kind regards > > Thibault Notargiacomo > > > > > > > > > 2015-10-14 18:58 GMT+02:00 Simon Rit : > >> Hi Thibault, >> No, there is not really a log system that would allow you debugging at >> run time. You can compile a debug version that would enable a lot of >> messages related to the pipeline. For this, I think you need to use NDEBUG >> at compilation (it's an ITK mechanism that I never use). >> No, it's not normal that you see an error message. There are two things: >> - the FFT of itk (compiled by default, based on vnl) is really bad IMO: >> it only handles power of 2/3/5 dimensions and it's slow. I always advise >> people to use FFTW by turning on ITK_USE_FFTW options during ITK's >> compilation. >> - I don't fully understand why vnl doesn't work either. I understand the >> first two dimensions, for vnl (which I strongly suggest to not use), I pad >> to the next power of 2 so >> 780 * 2 (for zero padding) -> 2048 >> 780 -> 1024 >> but then, if you use 64 projections, why 11? Are you sure the second >> input image to FDKConeBeamReconstructionImageFilter has the dimension you >> want? I would try to connect input 2 to an itk::ImageFileWriter and check >> what are the dimensions of this image. If you're absolutely sure, then I'll >> try to reproduce and fix the issue. >> Simon >> >> On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < >> gnthibault at gmail.com> wrote: >> >>> Dear all, >>> >>> I recently had troubles while trying to rewrite my code, linked with >>> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >>> well, to using fdk reconstruction method. >>> >>> My first question: is there a general way to enable maximum debug log >>> level at runtime in rtk ? >>> >>> My second question, is more specific: is it normal that I see such error >>> message coming from itk when using FDKConeBeamReconstructionFilter : >>> >>> ExceptionObject caught with fdk->Update() in file [...] >>> >>> itk::ExceptionObject (0x7f377c020cb0) >>> Location: "unknown" >>> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >>> Line: 416 >>> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >>> during SingleMethodExecute >>> >>> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >>> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >>> Cannot compute FFT of image with size [2048, 1024, 11]. >>> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >>> size in each dimension has a prime factorization consisting of only 2s, 3s, >>> or 5s. >>> >>> I suppose that this error arise while performing ramp filtering, but I >>> see no relation between FFT configuration stated in the error log ( [2048, >>> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >>> projections. >>> >>> I also tried with 200 projection and I had the same problem, but with >>> [2048, 1024, 34] >>> >>> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >>> to the total number of projection in my dataset every time. >>> >>> The revision I am currently using: >>> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >>> Merge: 578cf89 09d820c >>> >>> >>> Thank you in advance for your help. >>> >>> Regards >>> >>> Thibault Notargiacomo >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 03:12:36 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 09:12:36 +0200 Subject: [Rtk-users] Question about the geometry Message-ID: Dear all. Hello again. I writing to you again because I need some help to understand how to declare the geometry of the system. Cyril redirected me towards this document ( http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a lot, but unfortunately it has not been enough to make me reconstruct a tomogram. I have attached a drawing of my setup (setup.jpg). The source-to-detector distance is around 1600 mm. I just rotate the sample instead of the source, and the sample-detector distance is 15 cm which makes the isocenter distance 1450. The field of view is around 2 cm. The aligned projections are located here: https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 and the raw tiffs are here: https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 I would say the input data looks as nice, but when reconstructing I'm still just getting noise: This is how I perform my "reconstruction" # 361 projections from 0 to 360 degrees. The source-detector distance is 1.6 m and the # sample-detector distance is 15 cm # I have tried with many variations of --ssd and --sid but I think they all look the same rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o c:\Work\out_dir\geometry_real.xml # make a mha file out of the tiff files rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output c:\Work\out_dir\cylinder-a.mha --regexp .tif # "Reconstruct" the data. rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 The result can be viewed in the recon_result.PNG attachment. The reconstrcution can be found here: https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 Can someone please help me what I am doing wrong? best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: setup.jpg Type: image/jpeg Size: 29527 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: recon_result.PNG Type: image/png Size: 239196 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 06:09:04 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 12:09:04 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Is the origin and spacing of your projection data correct? What is your projection pixel size? Regards, Chao 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger : > Dear all. Hello again. > > I writing to you again because I need some help to understand how to > declare the geometry of the system. > > Cyril redirected me towards this document ( > http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > lot, but unfortunately it has not been enough to make me reconstruct a > tomogram. > > I have attached a drawing of my setup (setup.jpg). The > source-to-detector distance is around 1600 mm. I just rotate the > sample instead of the source, and the sample-detector distance is 15 > cm which makes the isocenter distance 1450. The field of view is > around 2 cm. > > The aligned projections are located here: > https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > and the raw tiffs are here: > https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > > I would say the input data looks as nice, but when reconstructing I'm > still just getting noise: > > This is how I perform my "reconstruction" > > # 361 projections from 0 to 360 degrees. The source-detector distance > is 1.6 m and the > # sample-detector distance is 15 cm > # I have tried with many variations of --ssd and --sid but I think > they all look the same > rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > c:\Work\out_dir\geometry_real.xml > > # make a mha file out of the tiff files > rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > c:\Work\out_dir\cylinder-a.mha --regexp .tif > > # "Reconstruct" the data. > rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha -g > c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > > The result can be viewed in the recon_result.PNG attachment. > The reconstrcution can be found here: > https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > > Can someone please help me what I am doing wrong? > > best > > Arvid > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 07:15:25 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 13:15:25 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao. Thank you for the reply. However, I'm not quite sure what you mean by origin and spacing. A pixel on the detector is ~200 microns, and the sample is magnified around 1.3 times. I do understand that having a correct geometry is important to get an output image with correct dimensions, but I do not understand it's so difficult for me to make a single successful reconstruction (possibly with a dummy geometry). best Arvid PS: Just to validate the data I'm testing on I installed Octave and created a sinogram I then ran through its iradon implementation. It seemed to work quite nicely (see attachments). On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > Hi Arvid, > > Is the origin and spacing of your projection data correct? What is your > projection pixel size? > > Regards, Chao > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > : >> >> Dear all. Hello again. >> >> I writing to you again because I need some help to understand how to >> declare the geometry of the system. >> >> Cyril redirected me towards this document ( >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> lot, but unfortunately it has not been enough to make me reconstruct a >> tomogram. >> >> I have attached a drawing of my setup (setup.jpg). The >> source-to-detector distance is around 1600 mm. I just rotate the >> sample instead of the source, and the sample-detector distance is 15 >> cm which makes the isocenter distance 1450. The field of view is >> around 2 cm. >> >> The aligned projections are located here: >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> and the raw tiffs are here: >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> I would say the input data looks as nice, but when reconstructing I'm >> still just getting noise: >> >> This is how I perform my "reconstruction" >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> is 1.6 m and the >> # sample-detector distance is 15 cm >> # I have tried with many variations of --ssd and --sid but I think >> they all look the same >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> c:\Work\out_dir\geometry_real.xml >> >> # make a mha file out of the tiff files >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> # "Reconstruct" the data. >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> The result can be viewed in the recon_result.PNG attachment. >> The reconstrcution can be found here: >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> Can someone please help me what I am doing wrong? >> >> best >> >> Arvid >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: Capture.JPG Type: image/jpeg Size: 58155 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 08:03:16 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 14:03:16 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Since you know how important a correct geometry is, you should understand why you need projection origin and spacing. CT geometry has more parameters than sid and sdd. How big the detector pixel size (spacing) and how the detector is places w.r.t. the central ray (origin) also play a role in the geometry. And in-plane/out-of-plane rotations etc. In your dataset the correct spacing and origin information is not stored correctly in the projection data, so the total geometry is wrong. I have tested your data with the following command line and it gives meaningful image. The newspacing and neworigin arguments force rtkfdk to accept spacing and origin information of projections from command line instead of from the data. Also I change the spacing of the volume from 2 to 0.2 because your object is small. rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 Apparently there is still some misalignment between this guessed geometry and the real geometry, which you need to figure out with your own hardware. Regards, Chao 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Hi Chao. > > Thank you for the reply. However, I'm not quite sure what you mean by > origin and spacing. > A pixel on the detector is ~200 microns, and the sample is magnified > around 1.3 times. > > I do understand that having a correct geometry is important to get an > output image with correct dimensions, but I do not understand it's so > difficult for me to make a single successful reconstruction (possibly > with a dummy geometry). > > best > > Arvid > > PS: Just to validate the data I'm testing on I installed Octave and > created a sinogram I then ran through its iradon implementation. It > seemed to work quite nicely (see attachments). > > On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > > Hi Arvid, > > > > Is the origin and spacing of your projection data correct? What is your > > projection pixel size? > > > > Regards, Chao > > > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Dear all. Hello again. > >> > >> I writing to you again because I need some help to understand how to > >> declare the geometry of the system. > >> > >> Cyril redirected me towards this document ( > >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> lot, but unfortunately it has not been enough to make me reconstruct a > >> tomogram. > >> > >> I have attached a drawing of my setup (setup.jpg). The > >> source-to-detector distance is around 1600 mm. I just rotate the > >> sample instead of the source, and the sample-detector distance is 15 > >> cm which makes the isocenter distance 1450. The field of view is > >> around 2 cm. > >> > >> The aligned projections are located here: > >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> and the raw tiffs are here: > >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> > >> I would say the input data looks as nice, but when reconstructing I'm > >> still just getting noise: > >> > >> This is how I perform my "reconstruction" > >> > >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> is 1.6 m and the > >> # sample-detector distance is 15 cm > >> # I have tried with many variations of --ssd and --sid but I think > >> they all look the same > >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> c:\Work\out_dir\geometry_real.xml > >> > >> # make a mha file out of the tiff files > >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> > >> # "Reconstruct" the data. > >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> > >> The result can be viewed in the recon_result.PNG attachment. > >> The reconstrcution can be found here: > >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> > >> Can someone please help me what I am doing wrong? > >> > >> best > >> > >> Arvid > >> > >> _______________________________________________ > >> Rtk-users mailing 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 Fri Oct 16 08:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 16 Oct 2015 14:15:43 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Thanks a lot Chao, I'm so glad that someone else than me did this! Just as a side note, Arvid, if you don't understand what is the origin and the spacing, look at the ITK software guide section 4.1.4, this is VERY important. Simon On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > Hi Arvid, > > Since you know how important a correct geometry is, you should understand > why you need projection origin and spacing. > CT geometry has more parameters than sid and sdd. How big the detector > pixel size (spacing) and how the detector is places w.r.t. the central ray > (origin) also play a role in the geometry. And in-plane/out-of-plane > rotations etc. > In your dataset the correct spacing and origin information is not stored > correctly in the projection data, so the total geometry is wrong. > > I have tested your data with the following command line and it gives > meaningful image. The newspacing and neworigin arguments force rtkfdk to > accept spacing and origin information of projections from command line > instead of from the data. Also I change the spacing of the volume from 2 to > 0.2 because your object is small. > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha > -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 > --newspacing=0.2 --neworigin=-20,-20 > > Apparently there is still some misalignment between this guessed geometry > and the real geometry, which you need to figure out with your own hardware. > > Regards, > Chao > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < > bottiger at gmail.com>: > >> Hi Chao. >> >> Thank you for the reply. However, I'm not quite sure what you mean by >> origin and spacing. >> A pixel on the detector is ~200 microns, and the sample is magnified >> around 1.3 times. >> >> I do understand that having a correct geometry is important to get an >> output image with correct dimensions, but I do not understand it's so >> difficult for me to make a single successful reconstruction (possibly >> with a dummy geometry). >> >> best >> >> Arvid >> >> PS: Just to validate the data I'm testing on I installed Octave and >> created a sinogram I then ran through its iradon implementation. It >> seemed to work quite nicely (see attachments). >> >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >> > Hi Arvid, >> > >> > Is the origin and spacing of your projection data correct? What is your >> > projection pixel size? >> > >> > Regards, Chao >> > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> > : >> >> >> >> Dear all. Hello again. >> >> >> >> I writing to you again because I need some help to understand how to >> >> declare the geometry of the system. >> >> >> >> Cyril redirected me towards this document ( >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> >> lot, but unfortunately it has not been enough to make me reconstruct a >> >> tomogram. >> >> >> >> I have attached a drawing of my setup (setup.jpg). The >> >> source-to-detector distance is around 1600 mm. I just rotate the >> >> sample instead of the source, and the sample-detector distance is 15 >> >> cm which makes the isocenter distance 1450. The field of view is >> >> around 2 cm. >> >> >> >> The aligned projections are located here: >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> >> and the raw tiffs are here: >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> >> >> I would say the input data looks as nice, but when reconstructing I'm >> >> still just getting noise: >> >> >> >> This is how I perform my "reconstruction" >> >> >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> >> is 1.6 m and the >> >> # sample-detector distance is 15 cm >> >> # I have tried with many variations of --ssd and --sid but I think >> >> they all look the same >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> >> c:\Work\out_dir\geometry_real.xml >> >> >> >> # make a mha file out of the tiff files >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> >> >> # "Reconstruct" the data. >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> >> c:\Work\out_dir\cylinder_a_recon.mha -g >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> >> >> The result can be viewed in the recon_result.PNG attachment. >> >> The reconstrcution can be found here: >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> >> >> Can someone please help me what I am doing wrong? >> >> >> >> best >> >> >> >> Arvid >> >> >> >> _______________________________________________ >> >> 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 bottiger at gmail.com Fri Oct 16 08:33:38 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 14:33:38 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao Wu Thank you very much! This is definitely something I can use in order to move forward. I'm not trying to make the best possible reconstruction out of this dataset, but just have something that works so I can start playing around and get familiar with RTK. Which I do have now. And to Simon: Thanks for the link. bets Arvid On Fri, Oct 16, 2015 at 2:15 PM, Simon Rit wrote: > Thanks a lot Chao, I'm so glad that someone else than me did this! > Just as a side note, Arvid, if you don't understand what is the origin and > the spacing, look at the ITK software guide section 4.1.4, this is VERY > important. > Simon > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: >> >> Hi Arvid, >> >> Since you know how important a correct geometry is, you should understand >> why you need projection origin and spacing. >> CT geometry has more parameters than sid and sdd. How big the detector >> pixel size (spacing) and how the detector is places w.r.t. the central ray >> (origin) also play a role in the geometry. And in-plane/out-of-plane >> rotations etc. >> In your dataset the correct spacing and origin information is not stored >> correctly in the projection data, so the total geometry is wrong. >> >> I have tested your data with the following command line and it gives >> meaningful image. The newspacing and neworigin arguments force rtkfdk to >> accept spacing and origin information of projections from command line >> instead of from the data. Also I change the spacing of the volume from 2 to >> 0.2 because your object is small. >> >> rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml >> --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 >> >> Apparently there is still some misalignment between this guessed geometry >> and the real geometry, which you need to figure out with your own hardware. >> >> Regards, >> Chao >> >> >> 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> : >>> >>> Hi Chao. >>> >>> Thank you for the reply. However, I'm not quite sure what you mean by >>> origin and spacing. >>> A pixel on the detector is ~200 microns, and the sample is magnified >>> around 1.3 times. >>> >>> I do understand that having a correct geometry is important to get an >>> output image with correct dimensions, but I do not understand it's so >>> difficult for me to make a single successful reconstruction (possibly >>> with a dummy geometry). >>> >>> best >>> >>> Arvid >>> >>> PS: Just to validate the data I'm testing on I installed Octave and >>> created a sinogram I then ran through its iradon implementation. It >>> seemed to work quite nicely (see attachments). >>> >>> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >>> > Hi Arvid, >>> > >>> > Is the origin and spacing of your projection data correct? What is your >>> > projection pixel size? >>> > >>> > Regards, Chao >>> > >>> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >>> > : >>> >> >>> >> Dear all. Hello again. >>> >> >>> >> I writing to you again because I need some help to understand how to >>> >> declare the geometry of the system. >>> >> >>> >> Cyril redirected me towards this document ( >>> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >>> >> lot, but unfortunately it has not been enough to make me reconstruct a >>> >> tomogram. >>> >> >>> >> I have attached a drawing of my setup (setup.jpg). The >>> >> source-to-detector distance is around 1600 mm. I just rotate the >>> >> sample instead of the source, and the sample-detector distance is 15 >>> >> cm which makes the isocenter distance 1450. The field of view is >>> >> around 2 cm. >>> >> >>> >> The aligned projections are located here: >>> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >>> >> and the raw tiffs are here: >>> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >>> >> >>> >> I would say the input data looks as nice, but when reconstructing I'm >>> >> still just getting noise: >>> >> >>> >> This is how I perform my "reconstruction" >>> >> >>> >> # 361 projections from 0 to 360 degrees. The source-detector distance >>> >> is 1.6 m and the >>> >> # sample-detector distance is 15 cm >>> >> # I have tried with many variations of --ssd and --sid but I think >>> >> they all look the same >>> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >>> >> c:\Work\out_dir\geometry_real.xml >>> >> >>> >> # make a mha file out of the tiff files >>> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >>> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >>> >> >>> >> # "Reconstruct" the data. >>> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >>> >> c:\Work\out_dir\cylinder_a_recon.mha -g >>> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >>> >> >>> >> The result can be viewed in the recon_result.PNG attachment. >>> >> The reconstrcution can be found here: >>> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >>> >> >>> >> Can someone please help me what I am doing wrong? >>> >> >>> >> best >>> >> >>> >> Arvid >>> >> >>> >> _______________________________________________ >>> >> 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 simon.rit at creatis.insa-lyon.fr Tue Oct 20 14:38:24 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 20 Oct 2015 20:38:24 +0200 Subject: [Rtk-users] using RTK with projection matrices and projection images In-Reply-To: References: Message-ID: Dear Shiras Abdurahman, It's better to email the mailing so that everybody can participate our discussion. We developped a tool to do this a while ago but it's never made it to the public repo. I have enclosed it if you want to have a look but it does what you want I think. The part of interest for you is how the variable matProj is converted to an RTK geometry. We'll try to clean it and push it to the main repo in November if you can't figure out how to use it. Good luck! Simon On Tue, Oct 20, 2015 at 5:07 PM, shiras abdurahman < shiras.abdurahman at gmail.com> wrote: > Dear Dr. Rit, > > My name is Shiras Abdurahman and I am a PhD student at ovgu Magdeburg, > Germany. Currently, I am working in tomographic reconstruction and I > started to using RTK. I have projection images and corresponding projection > matrices. I want to reconstruct volume with RTK. Is it possible to set > projection matrices directly and reconstruct the volume. Or do I need to > decompose first and get intrinsic and extrinsic parameters especially > rotation angles and use addProjection function? > I know that geometry can be read from xml file. > > Thank you for your time and patience. > > With regards, > Shiras Abdurahman > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rtkthales.cxx Type: text/x-c++src Size: 9360 bytes Desc: not available URL: From wuchao04 at gmail.com Mon Oct 26 16:30:58 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 26 Oct 2015 21:30:58 +0100 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Well, that's just some guess. I assume the central ray goes towards the center of your detector, so the origin should be denoted as somewhere near (- half_width, - half_height) in millimeter. Then I just fine-tune it manually a little bit to get a little bit better results... Regards, Chao 2015-10-26 19:44 GMT+01:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Dear Chao. > > I am very thankful for the help you provided me some days ago on the > RTK mailing list. However, I have a quick followup question for you, > which I have not been able to learn by reading the (very long) manual > another user provided me with. > > I am now working on another dataset, and get similar artifact when > reconstructing. Could you please help understand why you picked the > parameters you did? I guess the "spacing" is pixel size, but why did > why you pick "neworigin" to be -20,-20 ? > > best > > Arvid > > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > > Hi Arvid, > > > > Since you know how important a correct geometry is, you should understand > > why you need projection origin and spacing. > > CT geometry has more parameters than sid and sdd. How big the detector > pixel > > size (spacing) and how the detector is places w.r.t. the central ray > > (origin) also play a role in the geometry. And in-plane/out-of-plane > > rotations etc. > > In your dataset the correct spacing and origin information is not stored > > correctly in the projection data, so the total geometry is wrong. > > > > I have tested your data with the following command line and it gives > > meaningful image. The newspacing and neworigin arguments force rtkfdk to > > accept spacing and origin information of projections from command line > > instead of from the data. Also I change the spacing of the volume from 2 > to > > 0.2 because your object is small. > > > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > > c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml > > --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 > > > > Apparently there is still some misalignment between this guessed geometry > > and the real geometry, which you need to figure out with your own > hardware. > > > > Regards, > > Chao > > > > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Hi Chao. > >> > >> Thank you for the reply. However, I'm not quite sure what you mean by > >> origin and spacing. > >> A pixel on the detector is ~200 microns, and the sample is magnified > >> around 1.3 times. > >> > >> I do understand that having a correct geometry is important to get an > >> output image with correct dimensions, but I do not understand it's so > >> difficult for me to make a single successful reconstruction (possibly > >> with a dummy geometry). > >> > >> best > >> > >> Arvid > >> > >> PS: Just to validate the data I'm testing on I installed Octave and > >> created a sinogram I then ran through its iradon implementation. It > >> seemed to work quite nicely (see attachments). > >> > >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > >> > Hi Arvid, > >> > > >> > Is the origin and spacing of your projection data correct? What is > your > >> > projection pixel size? > >> > > >> > Regards, Chao > >> > > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > >> > : > >> >> > >> >> Dear all. Hello again. > >> >> > >> >> I writing to you again because I need some help to understand how to > >> >> declare the geometry of the system. > >> >> > >> >> Cyril redirected me towards this document ( > >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> >> lot, but unfortunately it has not been enough to make me reconstruct > a > >> >> tomogram. > >> >> > >> >> I have attached a drawing of my setup (setup.jpg). The > >> >> source-to-detector distance is around 1600 mm. I just rotate the > >> >> sample instead of the source, and the sample-detector distance is 15 > >> >> cm which makes the isocenter distance 1450. The field of view is > >> >> around 2 cm. > >> >> > >> >> The aligned projections are located here: > >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> >> and the raw tiffs are here: > >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> >> > >> >> I would say the input data looks as nice, but when reconstructing I'm > >> >> still just getting noise: > >> >> > >> >> This is how I perform my "reconstruction" > >> >> > >> >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> >> is 1.6 m and the > >> >> # sample-detector distance is 15 cm > >> >> # I have tried with many variations of --ssd and --sid but I think > >> >> they all look the same > >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> >> c:\Work\out_dir\geometry_real.xml > >> >> > >> >> # make a mha file out of the tiff files > >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> >> > >> >> # "Reconstruct" the data. > >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> >> > >> >> The result can be viewed in the recon_result.PNG attachment. > >> >> The reconstrcution can be found here: > >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> >> > >> >> Can someone please help me what I am doing wrong? > >> >> > >> >> best > >> >> > >> >> Arvid > >> >> > >> >> _______________________________________________ > >> >> Rtk-users mailing 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 Wed Oct 28 11:47:13 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Wed, 28 Oct 2015 16:47:13 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter Message-ID: <5630EE01.5070900@cppm.in2p3.fr> Hello everyone, I have a question/suggestion about the set of rtkDraw*ImageFilter. This filter are written as additive filters: for example, in rtkDrawEllipsoidImageFilter.txx, we can find for(..) itOut.Set( ellipsoid.density + itIn.Get() ) instead of for(..) itOut.Set( ellipsoid.density ) I think it can be more flexible the second option, because we can always associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. Moreover, the rtkDrawGeometricPhantomImageFilter class already uses itkAddImageFilter in order to have additive filters (which is redundant in current situation). What do you think ? Regards From shiraska at gmail.com Wed Oct 28 13:12:36 2015 From: shiraska at gmail.com (Shiras Abdurahman) Date: Wed, 28 Oct 2015 18:12:36 +0100 Subject: [Rtk-users] Filtered projection images Message-ID: Hi, I want to access processed projections especially filtered projections which are used for backprojection. Is it possible in RTK? Shiras -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 28 15:52:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:52:10 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: <5630EE01.5070900@cppm.in2p3.fr> References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: Hi Mathieu, Thanks for pointing this out. I agree that it might not be the best solution, yet one could argue that you could simply create a constant image with 0 to do what you'd like from the current implementation. My main problem is that I just tried to do what you suggest and some tests then fail... which shows the obvious, it's not a backward compatible change. I see two solutions: - keep it as is and you use ConstantImageFilter + we remove useless add filters, - a more complex but maybe more elegant solution: add a third template parameter for the operation that would allow the user to do what he'd like in a functor. That's what's done with filters that derive from itk::UnaryImageFilter . The default would be itk::Add2 but we could find or implement another one that simply discards the pixel value. What do you think? Simon PS: looking in the code, I just found that rtk::DrawConeImageFilter is not consistent with the others, it was always setting to 0 outside... that's been fixed! On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont wrote: > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. This > filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can always > associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is redundant in > current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > Rtk-users mailing 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 Oct 28 15:53:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:53:25 +0100 Subject: [Rtk-users] Filtered projection images In-Reply-To: References: Message-ID: Hi, I guess you mean filtered projections that are used in filtered backprojections algorithm? The filter you are looking for is rtk::FFTRampImageFilter which implements the ramp filter. There is a command line tool that can do it, rtkramp. Regards, Simon On Wed, Oct 28, 2015 at 6:12 PM, Shiras Abdurahman wrote: > Hi, > > I want to access processed projections especially filtered projections > which are used for backprojection. Is it possible in RTK? > > Shiras > > _______________________________________________ > Rtk-users mailing 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 Fri Oct 30 06:56:50 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Fri, 30 Oct 2015 11:56:50 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: <56334CF2.8070902@cppm.in2p3.fr> Hi, In case of your first solution, you can not chain several Draw*ImageFilters. For example, if you want to create small cylinders in a big cylinder. Your second solution is better. One another solution can be a thing like itk:SpatialObject but more simpler. An rtk::SpatialObject which one function (isInside(point)). We create a rtkDrawImageFilter class and implement ThreadedGenerateData like this : DrawImageFilter::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType itkNotUsed(threadId) { ... while( !itOut.IsAtEnd() ) { this->GetInput()->TransformIndexToPhysicalPoint(itOut.GetIndex(), point); if(m_rtkSpatialObject.isInside(point) itOut.Set(m_rtkFillFunctor(density, itIn.Get()); ... } DrawConeImageFilter class can be a child of this new DrawImageFilter (with new methods like setAngle, SetRadius which will adjust the rtkConeSpatialObject) This solution suppress duplicated code in Draw*ImageFilter::ThreadedGenerateData and makes easier implementation of another type of filling. On 28/10/2015 20:52, Simon Rit wrote: > Hi Mathieu, > Thanks for pointing this out. I agree that it might not be the best > solution, yet one could argue that you could simply create a constant > image with 0 to do what you'd like from the current implementation. My > main problem is that I just tried to do what you suggest and some tests > then fail... which shows the obvious, it's not a backward compatible change. > I see two solutions: > - keep it as is and you use ConstantImageFilter + we remove useless add > filters, > - a more complex but maybe more elegant solution: add a third template > parameter for the operation that would allow the user to do what he'd > like in a functor. That's what's done with filters that derive from > itk::UnaryImageFilter > . > The default would be itk::Add2 but we could find or implement another > one that simply discards the pixel value. > What do you think? > Simon > > PS: looking in the code, I just found that rtk::DrawConeImageFilter is > not consistent with the others, it was always setting to 0 outside... > that's been fixed! > > On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont > wrote: > > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. > This filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can > always associate Draw*ImageFilter and itkAddImageFilter to get an > additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is > redundant in current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > 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 Oct 1 02:18:53 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 08:18:53 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng wrote: > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: From cyril.mory at uclouvain.be Thu Oct 1 04:02:23 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Thu, 01 Oct 2015 10:02:23 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> Message-ID: <560CE88F.5030807@uclouvain.be> Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I'm using windows system (windows7 64 with VS 2013) and > I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with "ITK + FFTW" in > windows system? > > I'm just trying to use *rtkextractshroudsignal* and it seems to > require FFTW library externally. > > When I tried to use FFTW 3.3.4, I've encountered link errors as shown > below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > I'm running on Ubuntu 14.04 LTS and used the distribution library > (FFTW 3.3.3). If you're running on a Debian-based linux system, you > can also install the full development library set using the following > command: */sudo apt-get install libfftw3-3 libfftw3-dev/*. Then just > make sure that these libraries are being used by rerunning CCMake. > > I'm not quite sure about the error being thrown in your build, but > perhaps one of the main developers would be able to provide some more > insight into the issue. > > Hope this helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK > with those options on as you suggested. > > I've tried to use the up-to-date version of FFTW (3.3.4), but it > seems that it doesn't work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved external > symbol __imp_fftw_execute referenced in function "protected: > virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully using in > which system(Windows or Linux)? > > Thanks. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 6:56 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the inclusion of the > Fast Fourier Transform components. This requires compilation with > the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn't compile that way > initially, and it took a little bit of time to figure out. > > Hope that helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I'm now compiling itk-4.8 to use that feature since I've found > my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 4:31 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success since my > initial posting -- in fact I'm currently working on a new > method for accomplishing this task in certain challenging cases. > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase > signal output when called using the '-p' flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA/* > > From what I've experienced, this generally provides a good > signal [0,1) characterizing the respiratory phase using the > default settings. Occasionally, I've run into issues where > the default 'unsharpness' parameter needs to be adjusted to > give a clear signal (by appending the*--unsharp ##*flag to the > command). On more challenging shroud images -- notably, those > with little detectable signal from background -- additional > contrast-enhancement by pre-processing of the shroud has > assisted in signal extraction. > > I hope that helps -- and please let me know how it works out > for you. > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I've encountered exactly same issue and it would > be highly appreciated if you can share with me your > updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:*Rtk-users > [mailto:rtk-users-bounces at public.kitware.com]*On Behalf > Of*Joel Beaudry > *Sent:*Tuesday, March 17, 2015 5:25 PM > *To:*Matthew J. Riblett > > *Cc:*rtk-users at public.kitware.com > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but > I've had good success with using a Hilbert function in > python (scipy). I'm sure that Matlab has an equivalent > function, and maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett > > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a straightforward method > of going from the results of the rtkamsterdamshroud > and rtkextractshroudsignal applications to a [0,1) > phase signal for performing motion-compensated > reconstruction. I've been following along with the > MC-CBCT Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is used to > process the should signal prior to feeding it back > into the reconstruction application, but there is no > mention of how this is accomplished. I'm trying to > implement this into an automated workflow and I'd love > to know how this was accomplished. > > Thanks! > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > _______________________________________________ > 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 WEICHENG.SHEN at leidos.com Thu Oct 1 10:57:56 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Thu, 1 Oct 2015 14:57:56 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: image004.png Type: image/png Size: 15591 bytes Desc: image004.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 15591 bytes Desc: image001.png URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 1 11:23:48 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 17:23:48 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng wrote: > Hello Simon, > > > > Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside > RTK, the following error message appears: > > > > > ================================================================================================ > > > > CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): > By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project > has asked CMake to find a package configuration file provided by > "Gengetopt", but CMake did not find one. > > Could not find a package configuration file provided by "Gengetopt" with > any of the following names: > > GengetoptConfig.cmake > gengetopt-config.cmake > > Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set > "Gengetopt_DIR" to a directory containing one of the above files. If > "Gengetopt" provides a separate development package or SDK, be sure it has > been installed. > > > > > ================================================================================================ > > > > It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake > or gengetopt-config.cmake. I did a manual search for these files in the RTK > directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH > in the cmake GUI when performing configuration. The value of > CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln > file can now be successfully generated. > > > > Next I need to build the project using Visual Studio 2013. > > > > Thanks you very much for your help! > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Thursday, October 01, 2015 2:19 AM > *To:* Shen, Weicheng > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Unknown CMake command "WRAP_GGO" > > > > Hi, > > WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use > WRAP_GGO in an external project you need to do the same as in > applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the > easiest, to start with, is to build the rtktutorialapplication in the RTK > project. > > Let us know if that answered your problem, > > Simon > > > > On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: > > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 15591 bytes Desc: not available URL: From theday79 at gmail.com Thu Oct 1 17:33:51 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 1 Oct 2015 17:33:51 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <560CE88F.5030807@uclouvain.be> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> Message-ID: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park ; 'Matthew J. Riblett' ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I'm using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with "ITK + FFTW" in windows system? I'm just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I've encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I'm running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you're running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I'm not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I've tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn't work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn't compile that way initially, and it took a little bit of time to figure out. Hope that helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I'm now compiling itk-4.8 to use that feature since I've found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting - in fact I'm currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the '-p' flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I've experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I've run into issues where the default 'unsharpness' parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images - notably, those with little detectable signal from background - additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps - and please let me know how it works out for you. - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I've encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I've been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I'm trying to implement this into an automated workflow and I'd love to know how this was accomplished. Thanks! - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 joelbeaudry at gmail.com Thu Oct 1 17:40:30 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Thu, 1 Oct 2015 14:40:30 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Cyril, After trying out a few attempts, it seems like some values play nicer than others. Could it be an issue with floating point comparisons with the spacing and/or origins? It might explain why certain values seem to work (1.5) and others do not (0.88). I'll look at what values are being compared and get back to you. Thanks, Joel On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry wrote: > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 > spacing) and re-creating a mask off of that. So the motion mask should have > the same dimensions, spacing, and origin as the intended 4D image since I'm > using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating > my mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I created for > 160 (2), worked but not the case of 512 (0.88), and let you know what I > find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > wrote: > >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the small paragraph after >> the cuda command line : >> >> Note that the reconstructed volume in this example does not fully contain >> the attenuating object, causing hyper-attenuation artifacts on the borders >> of the result. To avoid these artifacts, reconstruct a larger volume >> (--dimension 256) should be fine. *Note that you will have to resize >> your motion mask as well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and allow any motion mask, >> but until I do, you can resize your motion mask using the CLITK tools ( >> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other datasets and it >> seems to be working. I need to increase the resolution and play around with >> the parameters now. >> >> I haven't had time to test it too much, but I do get an error when >> attempting to reconstruct with different dimensions. I'm using Cuda, and >> haven't tried it with just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >> AverageOutOfROIImageFilter: information of ROI image does not match input >> image" >> >> I'll be able to test some other things later and list more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line parameters AND data). Can >>> you restart it from scratch and let me know if you still have problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>> coordinates >>> - the regularization parameters (gamma space and gamma time) were way >>> too high. The regularization with a high gamma-time caused frames to be >>> identical, while it should only discourage variations >>> >>> I hope it works, now. If it doesn't work for you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and indeed, there are >>> several mistakes in it. I am working on correcting them. I'll keep you >>> posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>> >>> Hi RTK-users, >>> >>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>> example. The 5 frames should show some differences pertaining to patient >>> motion but the ones that I'm producing are identical, so no motion is >>> visible. >>> >>> Has anyone been able to follow the example and the provided dataset to >>> create a 4D image? >>> >>> Thanks, >>> Joel >>> >>> >>> _______________________________________________ >>> 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 Fri Oct 2 02:44:21 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 2 Oct 2015 08:44:21 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Joel, Can you explain how you created your mask? Looking at the code, it seems to me that if you create a 4D image with RTK, create a mask from this image with exactly the same meta info and pass it to ROOSTER, that should work in all cases. If I were you, I would compare the two mhd files (of the mask and the 4D image you used to create it) and verify that the meta info is exactly the same. For ROOSTER, I suggest to add an interpolation when the information is not inconsistent, e.g., in the main() function. I can do it if you agree Cyril. Simon On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry wrote: > Hi Cyril, > > After trying out a few attempts, it seems like some values play nicer than > others. Could it be an issue with floating point comparisons with the > spacing and/or origins? It might explain why certain values seem to work > (1.5) and others do not (0.88). I'll look at what values are being compared > and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >> spacing) and re-creating a mask off of that. So the motion mask should have >> the same dimensions, spacing, and origin as the intended 4D image since I'm >> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >> my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the mask I created >> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >> find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> Good to hear it's working now. >>> The error you get is explained on the wiki in the small paragraph after >>> the cuda command line : >>> >>> Note that the reconstructed volume in this example does not fully >>> contain the attenuating object, causing hyper-attenuation artifacts on the >>> borders of the result. To avoid these artifacts, reconstruct a larger >>> volume (--dimension 256) should be fine. *Note that you will have to >>> resize your motion mask as well, as 3D the motion mask is expected to have >>> the same size, spacing and origin as the first 3 dimensions of the 4D >>> output. * >>> >>> I guess I should take some time to fix that, and allow any motion mask, >>> but until I do, you can resize your motion mask using the CLITK tools ( >>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>> >>> Cyril >>> >>> >>> >>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other datasets and it >>> seems to be working. I need to increase the resolution and play around with >>> the parameters now. >>> >>> I haven't had time to test it too much, but I do get an error when >>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>> haven't tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>> AverageOutOfROIImageFilter: information of ROI image does not match input >>> image" >>> >>> I'll be able to test some other things later and list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> I have fixed the wiki example (command line parameters AND data). Can >>>> you restart it from scratch and let me know if you still have problems ? >>>> >>>> Roughly, the problems were the following: >>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>> coordinates >>>> - the regularization parameters (gamma space and gamma time) were way >>>> too high. The regularization with a high gamma-time caused frames to be >>>> identical, while it should only discourage variations >>>> >>>> I hope it works, now. If it doesn't work for you, please keep asking >>>> Cyril >>>> >>>> >>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki example, and indeed, there are >>>> several mistakes in it. I am working on correcting them. I'll keep you >>>> posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>> example. The 5 frames should show some differences pertaining to patient >>>> motion but the ones that I'm producing are identical, so no motion is >>>> visible. >>>> >>>> Has anyone been able to follow the example and the provided dataset to >>>> create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 cyril.mory at uclouvain.be Fri Oct 2 03:53:14 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 02 Oct 2015 09:53:14 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: <560E37EA.1060702@uclouvain.be> Indeed, resampling the mask if needed, to the correct size, spacing, origin and direction, seems the simplest way to deal with this issue. But I would do it in the filter rather than in the application, so that anything built on top of ROOSTER (i.e. incremental ROOSTER, or the rtkfourdroostertest) also benefits from it. Feel free to do it if you want, otherwise I'll take care of it next week :) On 10/02/2015 08:44 AM, Simon Rit wrote: > Hi Joel, > Can you explain how you created your mask? Looking at the code, it > seems to me that if you create a 4D image with RTK, create a mask from > this image with exactly the same meta info and pass it to ROOSTER, > that should work in all cases. If I were you, I would compare the two > mhd files (of the mask and the 4D image you used to create it) and > verify that the meta info is exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is > not inconsistent, e.g., in the main() function. I can do it if you > agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > > Hi Cyril, > > After trying out a few attempts, it seems like some values play > nicer than others. Could it be an issue with floating point > comparisons with the spacing and/or origins? It might explain why > certain values seem to work (1.5) and others do not (0.88). I'll > look at what values are being compared and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > > wrote: > > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions > 512 (0.88 spacing) and re-creating a mask off of that. So the > motion mask should have the same dimensions, spacing, and > origin as the intended 4D image since I'm using 4D rooster > with --dimension 512 --spacing 0.88. Perhaps I'm creating my > mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I > created for 160 (2), worked but not the case of 512 (0.88), > and let you know what I find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > > wrote: > > Hi Joel, > > Good to hear it's working now. > The error you get is explained on the wiki in the small > paragraph after the cuda command line : > > Note that the reconstructed volume in this example does > not fully contain the attenuating object, causing > hyper-attenuation artifacts on the borders of the result. > To avoid these artifacts, reconstruct a larger volume > (--dimension 256) should be fine. *Note that you will have > to resize your motion mask as well, as 3D the motion mask > is expected to have the same size, spacing and origin as > the first 3 dimensions of the 4D output. * > > I guess I should take some time to fix that, and allow any > motion mask, but until I do, you can resize your motion > mask using the CLITK tools > (http://www.creatis.insa-lyon.fr/rio/vv) or any method > that suits you. > > Cyril > > > > On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other >> datasets and it seems to be working. I need to increase >> the resolution and play around with the parameters now. >> >> I haven't had time to test it too much, but I do get an >> error when attempting to reconstruct with different >> dimensions. I'm using Cuda, and haven't tried it with >> just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws >> "In AverageOutOfROIImageFilter: information of ROI image >> does not match input image" >> >> I'll be able to test some other things later and list >> more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> I have fixed the wiki example (command line >> parameters AND data). Can you restart it from scratch >> and let me know if you still have problems ? >> >> Roughly, the problems were the following: >> - the "mm_50.mha" motion mask file was not aligned >> with the CBCT coordinates >> - the regularization parameters (gamma space and >> gamma time) were way too high. The regularization >> with a high gamma-time caused frames to be identical, >> while it should only discourage variations >> >> I hope it works, now. If it doesn't work for you, >> please keep asking >> Cyril >> >> >> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and >>> indeed, there are several mistakes in it. I am >>> working on correcting them. I'll keep you posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the >>>> 4DROOSTERReconstruction example. The 5 frames >>>> should show some differences pertaining to patient >>>> motion but the ones that I'm producing are >>>> identical, so no motion is visible. >>>> >>>> Has anyone been able to follow the example and the >>>> provided dataset to create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 joelbeaudry at gmail.com Fri Oct 2 12:31:38 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Fri, 2 Oct 2015 09:31:38 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: <560E37EA.1060702@uclouvain.be> References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: Hi Simon and Cyril, @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) and then use itkSnap to create a mask from that 3D image. I then use that mask as the input for ROOSTER, to which I again use the same spacing/dimensions. For some values it seems to work and other it doesn't. I'm wondering if itkSnap is truncating the spacing/dimension/origins when I save my mask, and perhaps why something like (160,2,-159) works but (511,0.88,-224.84). I'll take a look at the metadata. I'll try resampling my masks and like you said that should probably fix my issues. Thanks for the help, Joel On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory wrote: > Indeed, resampling the mask if needed, to the correct size, spacing, > origin and direction, seems the simplest way to deal with this issue. > But I would do it in the filter rather than in the application, so that > anything built on top of ROOSTER (i.e. incremental ROOSTER, or the > rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: > > Hi Joel, > Can you explain how you created your mask? Looking at the code, it seems > to me that if you create a 4D image with RTK, create a mask from this image > with exactly the same meta info and pass it to ROOSTER, that should work in > all cases. If I were you, I would compare the two mhd files (of the mask > and the 4D image you used to create it) and verify that the meta info is > exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is not > inconsistent, e.g., in the main() function. I can do it if you agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values play nicer >> than others. Could it be an issue with floating point comparisons with the >> spacing and/or origins? It might explain why certain values seem to work >> (1.5) and others do not (0.88). I'll look at what values are being compared >> and get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> wrote: >> >>> Hi Cyril, >>> >>> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >>> spacing) and re-creating a mask off of that. So the motion mask should have >>> the same dimensions, spacing, and origin as the intended 4D image since I'm >>> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >>> my mask incorrectly? >>> >>> I'll try and fiddle with it a bit later and see why the mask I created >>> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >>> find. >>> >>> Thanks again, >>> Joel >>> >>> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> Good to hear it's working now. >>>> The error you get is explained on the wiki in the small paragraph after >>>> the cuda command line : >>>> >>>> Note that the reconstructed volume in this example does not fully >>>> contain the attenuating object, causing hyper-attenuation artifacts on the >>>> borders of the result. To avoid these artifacts, reconstruct a larger >>>> volume (--dimension 256) should be fine. *Note that you will have to >>>> resize your motion mask as well, as 3D the motion mask is expected to have >>>> the same size, spacing and origin as the first 3 dimensions of the 4D >>>> output. * >>>> >>>> I guess I should take some time to fix that, and allow any motion mask, >>>> but until I do, you can resize your motion mask using the CLITK tools ( >>>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>>> >>>> Cyril >>>> >>>> >>>> >>>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>>> >>>> Hi Cyril, >>>> >>>> Works like a charm, thanks! I tried it on some other datasets and it >>>> seems to be working. I need to increase the resolution and play around with >>>> the parameters now. >>>> >>>> I haven't had time to test it too much, but I do get an error when >>>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>>> haven't tried it with just cpu reconstruction yet. >>>> >>>> i.e.) >>>> --dimension 160 --spacing 2 -> works >>>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>>> AverageOutOfROIImageFilter: information of ROI image does not match input >>>> image" >>>> >>>> I'll be able to test some other things later and list more details. >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> >>>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>>> wrote: >>>> >>>>> Hi Joel, >>>>> >>>>> I have fixed the wiki example (command line parameters AND data). Can >>>>> you restart it from scratch and let me know if you still have problems ? >>>>> >>>>> Roughly, the problems were the following: >>>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>>> coordinates >>>>> - the regularization parameters (gamma space and gamma time) were way >>>>> too high. The regularization with a high gamma-time caused frames to be >>>>> identical, while it should only discourage variations >>>>> >>>>> I hope it works, now. If it doesn't work for you, please keep asking >>>>> Cyril >>>>> >>>>> >>>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>>> >>>>> Hi Joel, >>>>> >>>>> I have just tried to reproduce the wiki example, and indeed, there are >>>>> several mistakes in it. I am working on correcting them. I'll keep you >>>>> posted. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>>> example. The 5 frames should show some differences pertaining to patient >>>>> motion but the ones that I'm producing are identical, so no motion is >>>>> visible. >>>>> >>>>> Has anyone been able to follow the example and the provided dataset to >>>>> create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 WEICHENG.SHEN at leidos.com Fri Oct 2 22:11:05 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Sat, 3 Oct 2015 02:11:05 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977222@EMP-EXMR104.corp.leidos.com> Hi Simon, Yes, if I run the CMake at the root of RTK, the example builds successfully. Thanks you very much! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 11:24 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng > wrote: Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: 15587 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 15591 bytes Desc: image002.png URL: From simon.rit at creatis.insa-lyon.fr Mon Oct 5 01:45:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 5 Oct 2015 07:45:06 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Oct 5 13:53:11 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 5 Oct 2015 13:53:11 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error1_using_ITK_FFT.png Type: image/png Size: 17214 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error in code.png Type: image/png Size: 21974 bytes Desc: not available URL: From cyril.mory at uclouvain.be Tue Oct 6 08:08:35 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Tue, 06 Oct 2015 14:08:35 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: <5613B9C3.4070309@uclouvain.be> Hi Joel, I have just pushed a fix for this issue: in the 4DROOSTER filter, I have added a resample filter between the ROI input and the AverageOutOfROIImageFilter. On my side, it runs fine. Let me know if it fixes the issue on your side. Thanks for pointing this out, Cyril On 10/02/2015 06:31 PM, Joel Beaudry wrote: > Hi Simon and Cyril, > > @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) > and then use itkSnap to create a mask from that 3D image. I then use > that mask as the input for ROOSTER, to which I again use the same > spacing/dimensions. For some values it seems to work and other it > doesn't. I'm wondering if itkSnap is truncating the > spacing/dimension/origins when I save my mask, and perhaps why > something like (160,2,-159) works but (511,0.88,-224.84). I'll take a > look at the metadata. > > I'll try resampling my masks and like you said that should probably > fix my issues. > > Thanks for the help, > Joel > > On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory > wrote: > > Indeed, resampling the mask if needed, to the correct size, > spacing, origin and direction, seems the simplest way to deal with > this issue. > But I would do it in the filter rather than in the application, so > that anything built on top of ROOSTER (i.e. incremental ROOSTER, > or the rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it > next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: >> Hi Joel, >> Can you explain how you created your mask? Looking at the code, >> it seems to me that if you create a 4D image with RTK, create a >> mask from this image with exactly the same meta info and pass it >> to ROOSTER, that should work in all cases. If I were you, I would >> compare the two mhd files (of the mask and the 4D image you used >> to create it) and verify that the meta info is exactly the same. >> For ROOSTER, I suggest to add an interpolation when the >> information is not inconsistent, e.g., in the main() function. I >> can do it if you agree Cyril. >> Simon >> >> On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values >> play nicer than others. Could it be an issue with floating >> point comparisons with the spacing and/or origins? It might >> explain why certain values seem to work (1.5) and others do >> not (0.88). I'll look at what values are being compared and >> get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with >> dimensions 512 (0.88 spacing) and re-creating a mask off >> of that. So the motion mask should have the same >> dimensions, spacing, and origin as the intended 4D image >> since I'm using 4D rooster with --dimension 512 --spacing >> 0.88. Perhaps I'm creating my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the >> mask I created for 160 (2), worked but not the case of >> 512 (0.88), and let you know what I find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the >> small paragraph after the cuda command line : >> >> Note that the reconstructed volume in this example >> does not fully contain the attenuating object, >> causing hyper-attenuation artifacts on the borders of >> the result. To avoid these artifacts, reconstruct a >> larger volume (--dimension 256) should be fine. *Note >> that you will have to resize your motion mask as >> well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 >> dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and >> allow any motion mask, but until I do, you can resize >> your motion mask using the CLITK tools >> (http://www.creatis.insa-lyon.fr/rio/vv) or any >> method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other >>> datasets and it seems to be working. I need to >>> increase the resolution and play around with the >>> parameters now. >>> >>> I haven't had time to test it too much, but I do get >>> an error when attempting to reconstruct with >>> different dimensions. I'm using Cuda, and haven't >>> tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> >>> throws "In AverageOutOfROIImageFilter: information >>> of ROI image does not match input image" >>> >>> I'll be able to test some other things later and >>> list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> >> > wrote: >>> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line >>> parameters AND data). Can you restart it from >>> scratch and let me know if you still have >>> problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not >>> aligned with the CBCT coordinates >>> - the regularization parameters (gamma space and >>> gamma time) were way too high. The >>> regularization with a high gamma-time caused >>> frames to be identical, while it should only >>> discourage variations >>> >>> I hope it works, now. If it doesn't work for >>> you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki >>>> example, and indeed, there are several mistakes >>>> in it. I am working on correcting them. I'll >>>> keep you posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the >>>>> 4DROOSTERReconstruction example. The 5 frames >>>>> should show some differences pertaining to >>>>> patient motion but the ones that I'm producing >>>>> are identical, so no motion is visible. >>>>> >>>>> Has anyone been able to follow the example and >>>>> the provided dataset to create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 Oct 6 09:11:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 6 Oct 2015 15:11:27 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park wrote: > Hi Simon, > > > > I?ve just tried to build it without FFTW library, as you have asked. > > > > I have encountered an error as shown in the attached pictures in running > ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, making > FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > > > Hope it helps. > > > > Yang > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Thanks a lot Yang for the detailed report, I'm sure that will be helpful > to many people. For my personal information, did you try to compile FFTW > from ITK as well? If it didn't work, could you let us know what was the > problem? > > Simon > > > > > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Tue Oct 6 10:49:55 2015 From: theday79 at gmail.com (Yang K Park) Date: Tue, 6 Oct 2015 10:49:55 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: <001c01d10046$44941080$cdbc3180$@gmail.com> Hi Simon, It seems that I misunderstood before. This time, I?ve followed your suggestion and encountered an error as follows: H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): fatal error C1083: Cannot open include file: 'fftw3.h': No such file or directory I?ve tested this with itk4.8.1, which is the most up-to-date release version. It seems that I need to specify the external fftw header file (fftw3.h), but the user interface for input does not appear in CMake unless I set ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. I hope this report can help itk developers resolve the issue. Thanks. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Tuesday, October 06, 2015 9:11 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com ] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park > Cc: Cyril Mory >; Matthew J. Riblett >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Tue Oct 6 11:00:16 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Tue, 6 Oct 2015 17:00:16 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <001c01d10046$44941080$cdbc3180$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> <001c01d10046$44941080$cdbc3180$@gmail.com> Message-ID: <5613E200.4050001@kitware.com> Yang, Simon, As I mentioned previously, you cannot build ITK with FFTW on Windows without setting ITK_USE_SYSTEM_FFTW=ON. You should get a warning in CMake specifying this. So the only solution to build ITK with FFTW on Windows is to use an externally compiled version of FFTW. Julien On 06/10/2015 16:49, Yang K Park wrote: > Hi Simon, > > It seems that I misunderstood before. This time, I?ve followed your > suggestion and encountered an error as follows: > > H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): > fatal error C1083: Cannot open include file: 'fftw3.h': No such file or > directory > > I?ve tested this with itk4.8.1, which is the most up-to-date release > version. > > It seems that I need to specify the external fftw header file (fftw3.h), > but the user interface for input does not appear in CMake unless I set > ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. > > I hope this report can help itk developers resolve the issue. > > Thanks. > > Yang > > *From:*simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of > *Simon Rit > *Sent:* Tuesday, October 06, 2015 9:11 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett > ; rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks Yang. I think I wasn't clear but what I meant was not to disable > FFTW but to compile and use FFTW in ITK by using > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=OFF > > instead of what I think you used > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=ON > > Julien Jomier from Kitware told me that both configurations worked for > him but your initial message suggests that the first did not work for > you. If you can confirm and explain your config (ITK version, compiler, > etc.). > > Simon > > PS: your test is useful anyway, I'll try to make the error message > clearer when FFTW is not used. > > On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: > > Hi Simon, > > I?ve just tried to build it without FFTW library, as you have asked. > > I have encountered an error as shown in the attached pictures in > running ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, > making FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > Hope it helps. > > Yang > > *From:*simon.rit at gmail.com > [mailto:simon.rit at gmail.com ] *On Behalf > Of *Simon Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > > *Cc:* Cyril Mory >; Matthew J. Riblett > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks a lot Yang for the detailed report, I'm sure that will be > helpful to many people. For my personal information, did you try to > compile FFTW from ITK as well? If it didn't work, could you let us > know what was the problem? > > Simon > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: > > Hi Cyril, > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally > succeeded. > > Following is the final version of my instruction. > > Thanks. > > Yang > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very > convenient! I really like it. Thanks for your hard works on this. > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > 1.Prepare fftw library files > > a.Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b.Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c.Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command > Prompt) > > d.Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e.Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > 2.Cmake for ITK > > a.Configure > > b.Turn on the following and reconfigure > > i.ITK_USE_SYSTEM_FFTW (mandatory to make the following options > appear) > > c.Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i.FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 > > ii.FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii.FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv.FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. > > d."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e.Reconfigure, Generate > > 3.Build ITK with Visual Studio > > a.In both Debug and Release > > 4.Cmake for RTK > > a.Default settings were used. > > b."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > 5.Build RTK using Visual Studio > > 6.Copy dll files to RTK bin folders > > a.Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b.To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7.Build RTK with Visual Studio > > *From:*Cyril Mory [mailto:cyril.mory at uclouvain.be > ] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park >; 'Matthew J. Riblett' > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam > Shroud > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just > have to activate it in the CMake options. On Windows, you cannot > do that. I do not have a clue why, but you cannot. You have to > install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled > DLLs from http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the > .lib files (that is absolutely necessary). You may have to run > the "lib.exe" program from the VS developer prompt instead of > the standard windows cmd.exe prompt. Specify you CPU > architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, > and you should be fine. I have successfully compiled this with > BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it > matters. > > If it works for you, then you might want to play around with the > other FFTW .lib files, and send on this mailing list a more > complete set of CMAKE options that works. I have tried some > other combinations without success, so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS > 2013) and I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with ?ITK + > FFTW? in windows system? > > I?m just trying to use *rtkextractshroudsignal* and it seems > to require FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors > as shown below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > I?m running on Ubuntu 14.04 LTS and used the distribution > library (FFTW 3.3.3). If you?re running on a Debian-based > linux system, you can also install the full development > library set using the following command: */sudo apt-get > install libfftw3-3 libfftw3-dev/*. Then just make sure that > these libraries are being used by rerunning CCMake. > > I?m not quite sure about the error being thrown in your > build, but perhaps one of the main developers would be able > to provide some more insight into the issue. > > Hope this helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to > compile ITK with those options on as you suggested. > > I?ve tried to use the up-to-date version of FFTW > (3.3.4), but it seems that it doesn?t work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved > external symbol __imp_fftw_execute referenced in > function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully > using in which system(Windows or Linux)? > > Thanks. > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the > inclusion of the Fast Fourier Transform components. > This requires compilation with the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that > way initially, and it took a little bit of time to > figure out. > > Hope that helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since > I?ve found my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data > from Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success > since my initial posting ? in fact I?m currently > working on a new method for accomplishing this task > in certain challenging cases. > > The most recent version of RTK provides an update to > the rtkextractshroudsignal application which > provides a phase signal output when called using the > ?-p? flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o > raw_signal.txt -p phase_signal.txt --method > LINEAR_BETWEEN_MINIMA/* > > From what I?ve experienced, this generally provides > a good signal [0,1) characterizing the respiratory > phase using the default settings. Occasionally, > I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear > signal (by appending the *--unsharp ##* flag to the > command). On more challenging shroud images ? > notably, those with little detectable signal from > background ? additional contrast-enhancement by > pre-processing of the shroud has assisted in signal > extraction. > > I hope that helps ? and please let me know how it > works out for you. > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue > and it would be highly appreciated if you can > share with me your updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical > School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:* Rtk-users > [mailto:rtk-users-bounces at public.kitware.com] > *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > > > *Cc:* rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal > data from Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab > script, but I've had good success with using a > Hilbert function in python (scipy). I'm sure > that Matlab has an equivalent function, and > maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. > Riblett > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a > straightforward method of going from the > results of the rtkamsterdamshroud and > rtkextractshroudsignal applications to a > [0,1) phase signal for performing > motion-compensated reconstruction. I?ve > been following along with the MC-CBCT > Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is > used to process the should signal prior to > feeding it back into the reconstruction > application, but there is no mention of how > this is accomplished. I?m trying to > implement this into an automated workflow > and I?d love to know how this was accomplished. > > Thanks! > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > > MCV Office Phone: +1.804.628.4858 > > > > _______________________________________________ > 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 > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From bottiger at gmail.com Mon Oct 12 05:42:20 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 11:42:20 +0200 Subject: [Rtk-users] Reconstruction problems Message-ID: Hi there I hope someone can help me me get started with RTK. First of all I should mention that I have compiled RTK on Windows 7 using Visual Studio 2013. Everything seems to compile and run just fine. Secondly: I tried to reproduce this example: http://wiki.openrtk.org/index.php/RTK/Scripts/FDK This was somewhat successful - I think. I could generate some projections, and reconstruct them. However, it just looks like an egg and not like a Shepp Logan phantom. See attachment. However, I'm unsure if this is expected or not. I took some homemade projections (of a small cylinder) and converted them into a MHA file (using rtkprojections.exe). The file looks correct in ImageJ. The dimensions are 370 pixels * 195 pixels * 361 projections You can get the file here: https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 The problem is that the reconstruction is wrong (see cylinder_recon). It looks like the dimensions are not read correctly, but I am unsure how I fix that? The rtkfdk.exe has a single --dimension parameter, but I am unsure which dimension that is suppose to be, but neither 195, 370 or any other value I could think of works for me. I hope someone can help me in the right direction. best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: SheppLogan.PNG Type: image/png Size: 150153 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cylinder_recon.PNG Type: image/png Size: 128472 bytes Desc: not available URL: From ghostcz at hotmail.com Mon Oct 12 05:54:44 2015 From: ghostcz at hotmail.com (louie L) Date: Mon, 12 Oct 2015 11:54:44 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Hi, You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? Cheers, Louie Sent from my iOS > On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 05:59:38 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 11:59:38 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: References: Message-ID: <561B848A.9090406@uclouvain.be> Hi Arvid, Well, you're on the right track :-) Your Shepp Logan reconstruction looks fine, I guess it is just a visualization problem: you can use vv http://www.creatis.insa-lyon.fr/rio/vv to open it and you will be able to change the "window" and "level" settings in visualization. Regarding the cylinder, can you send your geometry file too ? Regards Cyril Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Mon Oct 12 06:35:27 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:35:27 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: <561B848A.9090406@uclouvain.be> References: <561B848A.9090406@uclouvain.be> Message-ID: Hey Cyril I just wrote another e-mail about how I generated the geometry file (it's just simulated). But just in case I'll attach it here: best Arvid On Mon, Oct 12, 2015 at 11:59 AM, Cyril Mory wrote: > Hi Arvid, > > Well, you're on the right track :-) > Your Shepp Logan reconstruction looks fine, I guess it is just a > visualization problem: you can use vv > http://www.creatis.insa-lyon.fr/rio/vv > to open it and you will be able to change the "window" and "level" > settings in visualization. > > Regarding the cylinder, can you send your geometry file too ? > > Regards > Cyril > > Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example:http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here:https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > > > ------------------------------ > [image: Avast logo] > > L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le > logiciel antivirus Avast. > www.avast.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry360.xml Type: text/xml Size: 134495 bytes Desc: not available URL: From bottiger at gmail.com Mon Oct 12 06:36:03 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:36:03 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Sure. I'll admit I have yet to understand the specifics of the geometry file. Currently I just used a simulated one because that was what the SheppLogan example used, and the input projections looked similar. Here is a complete list of the commands I executed: rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 I did not do anything to the contrast and that is most likely the issue. I downloaded and installed vv and I can see some (very unclear) features inside the SheppLogan reconstruction - so that's nice. However, currently I'm mostly interested in getting the geometry right :) best On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: > Hi, > > You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? > > Cheers, > Louie > > Sent from my iOS > >> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >> >> Hi there >> >> I hope someone can help me me get started with RTK. >> >> First of all I should mention that I have compiled RTK on Windows 7 >> using Visual Studio 2013. Everything seems to compile and run just >> fine. >> >> Secondly: I tried to reproduce this example: >> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >> >> This was somewhat successful - I think. I could generate some >> projections, and reconstruct them. However, it just looks like an egg >> and not like a Shepp Logan phantom. See attachment. >> >> However, I'm unsure if this is expected or not. I took some homemade >> projections (of a small cylinder) and converted them into a MHA file >> (using rtkprojections.exe). The file looks correct in ImageJ. The >> dimensions are 370 pixels * 195 pixels * 361 projections >> >> You can get the file here: >> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >> >> The problem is that the reconstruction is wrong (see cylinder_recon). >> It looks like the dimensions are not read correctly, but I am unsure >> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >> I am unsure which dimension that is suppose to be, but neither 195, >> 370 or any other value I could think of works for me. >> >> I hope someone can help me in the right direction. >> >> best >> >> Arvid >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 15:52:10 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 21:52:10 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: <561C0F6A.6080602@uclouvain.be> Hi Arvid, Unfortunately, you cannot do that. You have to obtain the exact geometry of this particular acquisition from the cone beam device you used. If you need help to convert it to the RTK format, well, that's something you can ask for on this mailing list. Can you get the geometry data ? Regards, Cyril Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : > Sure. > > I'll admit I have yet to understand the specifics of the geometry > file. Currently I just used a simulated one because that was what the > SheppLogan example used, and the input projections looked similar. > > Here is a complete list of the commands I executed: > > rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml > > rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ > --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif > > rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o > c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g > c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 > > I did not do anything to the contrast and that is most likely the > issue. I downloaded and installed vv and I can see some (very unclear) > features inside the SheppLogan reconstruction - so that's nice. > However, currently I'm mostly interested in getting the geometry right :) > > best > > On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >> Hi, >> >> You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? >> >> Cheers, >> Louie >> >> Sent from my iOS >> >>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >>> >>> Hi there >>> >>> I hope someone can help me me get started with RTK. >>> >>> First of all I should mention that I have compiled RTK on Windows 7 >>> using Visual Studio 2013. Everything seems to compile and run just >>> fine. >>> >>> Secondly: I tried to reproduce this example: >>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>> >>> This was somewhat successful - I think. I could generate some >>> projections, and reconstruct them. However, it just looks like an egg >>> and not like a Shepp Logan phantom. See attachment. >>> >>> However, I'm unsure if this is expected or not. I took some homemade >>> projections (of a small cylinder) and converted them into a MHA file >>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>> dimensions are 370 pixels * 195 pixels * 361 projections >>> >>> You can get the file here: >>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>> >>> The problem is that the reconstruction is wrong (see cylinder_recon). >>> It looks like the dimensions are not read correctly, but I am unsure >>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>> I am unsure which dimension that is suppose to be, but neither 195, >>> 370 or any other value I could think of works for me. >>> >>> I hope someone can help me in the right direction. >>> >>> best >>> >>> Arvid >>> >>> >>> _______________________________________________ >>> 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 --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From cyril.mory at uclouvain.be Mon Oct 12 16:36:24 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 22:36:24 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: <561C1984.9030509@uclouvain.be> References: <561C1984.9030509@uclouvain.be> Message-ID: <561C19C8.5050304@uclouvain.be> Arvid, You can find a description of the geometry here : http://www.creatis.insa-lyon.fr/~srit/geometry.pdf In rtk/applications, several applications are simple converters from the cone beam manufacturer's raw geometry format to RTK geometry format, so you can also have a look at the code of these apps. If you know that you have an almost parallel beam, you can indeed try to use a dummy geometry file, but be careful: rtksimulatedgeometry generates a cone beam geometry, with large fan and cone angles if you leave the default parameters. You can adjust the 'sdd' and 'sid' options to simulate a very distant source, making rays almost parallel to each other (be careful with numerical precision, though). Hope it helps, Cyril Le 12/10/2015 21:59, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hello Cyril > > Thank you for getting back to me. I do have the geometry (albeit not > right here next to me). > However, my problem was that when I looked in the geometry file, I > didn't find it obvious how to define declare it - is it documented > somewhere? > > That said - the measurements I played around with is measured with an > almost parallel beam. I hoped I could reconstruct it (with minor > artifacts) using a dummy geometry file. > > best > > Arvid > > On Mon, Oct 12, 2015 at 9:52 PM, Cyril Mory wrote: >> Hi Arvid, >> >> Unfortunately, you cannot do that. You have to obtain the exact geometry of >> this particular acquisition from the cone beam device you used. >> If you need help to convert it to the RTK format, well, that's something you >> can ask for on this mailing list. >> Can you get the geometry data ? >> >> Regards, >> Cyril >> >> >> Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : >>> Sure. >>> >>> I'll admit I have yet to understand the specifics of the geometry >>> file. Currently I just used a simulated one because that was what the >>> SheppLogan example used, and the input projections looked similar. >>> >>> Here is a complete list of the commands I executed: >>> >>> rtksimulatedgeometry.exe -n 361 -o >>> c:\Users\aplb\Work\out_dir\geometry360.xml >>> >>> rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ >>> --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif >>> >>> rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o >>> c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g >>> c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 >>> >>> I did not do anything to the contrast and that is most likely the >>> issue. I downloaded and installed vv and I can see some (very unclear) >>> features inside the SheppLogan reconstruction - so that's nice. >>> However, currently I'm mostly interested in getting the geometry right :) >>> >>> best >>> >>> On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >>>> Hi, >>>> >>>> You can specify the size in each dimension. Can you post the arguments >>>> you used for the projections and reconstruction? Did you try to adjust the >>>> contrast of the output? >>>> >>>> Cheers, >>>> Louie >>>> >>>> Sent from my iOS >>>> >>>>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger >>>>> wrote: >>>>> >>>>> Hi there >>>>> >>>>> I hope someone can help me me get started with RTK. >>>>> >>>>> First of all I should mention that I have compiled RTK on Windows 7 >>>>> using Visual Studio 2013. Everything seems to compile and run just >>>>> fine. >>>>> >>>>> Secondly: I tried to reproduce this example: >>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>>>> >>>>> This was somewhat successful - I think. I could generate some >>>>> projections, and reconstruct them. However, it just looks like an egg >>>>> and not like a Shepp Logan phantom. See attachment. >>>>> >>>>> However, I'm unsure if this is expected or not. I took some homemade >>>>> projections (of a small cylinder) and converted them into a MHA file >>>>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>>>> dimensions are 370 pixels * 195 pixels * 361 projections >>>>> >>>>> You can get the file here: >>>>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>>>> >>>>> The problem is that the reconstruction is wrong (see cylinder_recon). >>>>> It looks like the dimensions are not read correctly, but I am unsure >>>>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>>>> I am unsure which dimension that is suppose to be, but neither 195, >>>>> 370 or any other value I could think of works for me. >>>>> >>>>> I hope someone can help me in the right direction. >>>>> >>>>> best >>>>> >>>>> Arvid >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >> >> >> --- >> L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le >> logiciel antivirus Avast. >> https://www.avast.com/antivirus >> --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From gnthibault at gmail.com Wed Oct 14 05:38:46 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Wed, 14 Oct 2015 11:38:46 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter Message-ID: Dear all, I recently had troubles while trying to rewrite my code, linked with libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite well, to using fdk reconstruction method. My first question: is there a general way to enable maximum debug log level at runtime in rtk ? My second question, is more specific: is it normal that I see such error message coming from itk when using FDKConeBeamReconstructionFilter : ExceptionObject caught with fdk->Update() in file [...] itk::ExceptionObject (0x7f377c020cb0) Location: "unknown" File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx Line: 416 Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred during SingleMethodExecute /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): Cannot compute FFT of image with size [2048, 1024, 11]. VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose size in each dimension has a prime factorization consisting of only 2s, 3s, or 5s. I suppose that this error arise while performing ramp filtering, but I see no relation between FFT configuration stated in the error log ( [2048, 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 projections. I also tried with 200 projection and I had the same problem, but with [2048, 1024, 34] Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to the total number of projection in my dataset every time. The revision I am currently using: commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 Merge: 578cf89 09d820c Thank you in advance for your help. Regards Thibault Notargiacomo -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 14 12:58:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 14 Oct 2015 18:58:06 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Hi Thibault, No, there is not really a log system that would allow you debugging at run time. You can compile a debug version that would enable a lot of messages related to the pipeline. For this, I think you need to use NDEBUG at compilation (it's an ITK mechanism that I never use). No, it's not normal that you see an error message. There are two things: - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it only handles power of 2/3/5 dimensions and it's slow. I always advise people to use FFTW by turning on ITK_USE_FFTW options during ITK's compilation. - I don't fully understand why vnl doesn't work either. I understand the first two dimensions, for vnl (which I strongly suggest to not use), I pad to the next power of 2 so 780 * 2 (for zero padding) -> 2048 780 -> 1024 but then, if you use 64 projections, why 11? Are you sure the second input image to FDKConeBeamReconstructionImageFilter has the dimension you want? I would try to connect input 2 to an itk::ImageFileWriter and check what are the dimensions of this image. If you're absolutely sure, then I'll try to reproduce and fix the issue. Simon On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < gnthibault at gmail.com> wrote: > Dear all, > > I recently had troubles while trying to rewrite my code, linked with > libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite > well, to using fdk reconstruction method. > > My first question: is there a general way to enable maximum debug log > level at runtime in rtk ? > > My second question, is more specific: is it normal that I see such error > message coming from itk when using FDKConeBeamReconstructionFilter : > > ExceptionObject caught with fdk->Update() in file [...] > > itk::ExceptionObject (0x7f377c020cb0) > Location: "unknown" > File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx > Line: 416 > Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred > during SingleMethodExecute > > /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: > itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): > Cannot compute FFT of image with size [2048, 1024, 11]. > VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose > size in each dimension has a prime factorization consisting of only 2s, 3s, > or 5s. > > I suppose that this error arise while performing ramp filtering, but I see > no relation between FFT configuration stated in the error log ( [2048, > 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 > projections. > > I also tried with 200 projection and I had the same problem, but with > [2048, 1024, 34] > > Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to > the total number of projection in my dataset every time. > > The revision I am currently using: > commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 > Merge: 578cf89 09d820c > > > Thank you in advance for your help. > > Regards > > Thibault Notargiacomo > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scouser27 at gmail.com Wed Oct 14 16:27:48 2015 From: scouser27 at gmail.com (sco user) Date: Wed, 14 Oct 2015 21:27:48 +0100 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi I'm a new user to RTK. I've been able to perform reconstructions of the Catphan and my own copies of Varian CBCT images with some success. I enabled the CUDA flags when making RTK so as to take advantage of the capabilities of my GPU. When I use --hardware="cuda" with the rtkfdk application, I have found that I must specify the lowmem option in order to get the reconstruction to run successfully. If I don't use lowmem, I get the following error: #### Reconstructing and writing... /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ unknown : Cuda Error : out of memory ExceptionObject caught with writer->Update() in file /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 itk::ExceptionObject (0x18e3460) Location: "unknown" File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h Line: 55 Description: Cuda Error : out of memory #### I take from this that I'm out of memory on the GPU. Is that correct? The GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be in order to get a typical Varian reconstruction to run without the lowmem option. On a side note, I know that the cuda option is working because it's a lot quicker than hardware="cpu", despite only having 96 cuda cores. Another question I'd like to ask is if anyone can shed some light on useful values for I-zero, wpc, scatter etc. With thanks in advance, Dave. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Oct 15 03:09:05 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 15 Oct 2015 09:09:05 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Without the lowmem flag all projection images may be loaded into graphics memory at once causing an out-of-memory issues. You can also check this thread: http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html Regards, Chao 2015-10-14 22:27 GMT+02:00 sco user : > Hi > > I'm a new user to RTK. > I've been able to perform reconstructions of the Catphan and my own copies > of Varian CBCT images with some success. I enabled the CUDA flags when > making RTK so as to take advantage of the capabilities of my GPU. > > When I use --hardware="cuda" with the rtkfdk application, I have found > that I must specify the lowmem option in order to get the reconstruction to > run successfully. If I don't use lowmem, I get the following error: > > #### > Reconstructing and writing... > /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ > unknown : Cuda Error : out of memory > > ExceptionObject caught with writer->Update() in file > /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 > > itk::ExceptionObject (0x18e3460) > Location: "unknown" > File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h > Line: 55 > Description: Cuda Error : out of memory > #### > > I take from this that I'm out of memory on the GPU. Is that correct? The > GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be > in order to get a typical Varian reconstruction to run without the lowmem > option. > > On a side note, I know that the cuda option is working because it's a lot > quicker than hardware="cpu", despite only having 96 cuda cores. > > > Another question I'd like to ask is if anyone can shed some light on > useful values for I-zero, wpc, scatter etc. > > With thanks in advance, > Dave. > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Thu Oct 15 03:52:25 2015 From: itkhelpacc at gmail.com (vishal k) Date: Thu, 15 Oct 2015 13:22:25 +0530 Subject: [Rtk-users] Need some help with Projection of 3D CT data Message-ID: hi, Im working on a CT data set using ITK.. Im trying to come up with a registration algorithm for fluoroscopy image obtained from C-Arm taken at some angle wrt to the patient and the projection of CT data taken at the same angle as that of the C-arm.. i need to change the angles of projection and the focal length of the source from time to time for my study.. I was wondering if i could do that using RTK? If yes, could you tell me where I find information that is relevant to my problem..Thank you Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 15 05:11:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:11:00 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Regarding the parameters (I-zero, wpc, scatter etc), we still need to create wiki pages to describe this (as agreed on during the Jul 31 meeting ). In the meantime, you'll find some info in each filter documentation. You can go to the projection pre-processing filter , look at the (complex) clickable graph and try to navigate in it. For example, I0 is for the LUTbasedVariableI0RawToAttenuationImageFilter and (therefore), inapplicable to Varian data as is. I'll keep the mailing list posted when we add info to the wiki. Good luck, Simon On Thu, Oct 15, 2015 at 9:09 AM, Chao Wu wrote: > Hi Dave, > > Without the lowmem flag all projection images may be loaded into graphics > memory at once causing an out-of-memory issues. > You can also check this thread: > http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html > > Regards, > Chao > > 2015-10-14 22:27 GMT+02:00 sco user : > >> Hi >> >> I'm a new user to RTK. >> I've been able to perform reconstructions of the Catphan and my own >> copies of Varian CBCT images with some success. I enabled the CUDA flags >> when making RTK so as to take advantage of the capabilities of my GPU. >> >> When I use --hardware="cuda" with the rtkfdk application, I have found >> that I must specify the lowmem option in order to get the reconstruction to >> run successfully. If I don't use lowmem, I get the following error: >> >> #### >> Reconstructing and writing... >> /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ >> unknown : Cuda Error : out of memory >> >> ExceptionObject caught with writer->Update() in file >> /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 >> >> itk::ExceptionObject (0x18e3460) >> Location: "unknown" >> File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h >> Line: 55 >> Description: Cuda Error : out of memory >> #### >> >> I take from this that I'm out of memory on the GPU. Is that correct? The >> GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be >> in order to get a typical Varian reconstruction to run without the lowmem >> option. >> >> On a side note, I know that the cuda option is working because it's a lot >> quicker than hardware="cpu", despite only having 96 cuda cores. >> >> >> Another question I'd like to ask is if anyone can shed some light on >> useful values for I-zero, wpc, scatter etc. >> >> With thanks in advance, >> Dave. >> >> >> _______________________________________________ >> 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 Thu Oct 15 05:33:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:33:42 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Yes, RTK can certainly do things like that. Start with a simple geometry following the example Forward projection of the wiki and maybe come back to us with more precise questions? Good luck, Simon On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: > hi, > Im working on a CT data set using ITK.. Im trying to come up with a > registration algorithm for fluoroscopy image obtained from C-Arm taken at > some angle wrt to the patient and the projection of CT data taken at the > same angle as that of the C-arm.. i need to change the angles of projection > and the focal length of the source from time to time for my study.. I was > wondering if i could do that using RTK? If yes, could you tell me where I > find information that is relevant to my problem..Thank you > Regards > > _______________________________________________ > Rtk-users mailing 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 Oct 15 05:49:16 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:49:16 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Hi, Please stick to the mailing list. That's exactly what I understood and my previous answer is still valid. Simon On Thu, Oct 15, 2015 at 11:47 AM, vishal k wrote: > hi Simon, > Thanks for ur advice..sorry i couldn't explain it properly...here my > problem explained in detail.. I have to register 3D ct data with > Fluoroscopy image obtained during surgery.. the problem is that they use > different co-ordinate systems.. I thought since i can obtained the C arm > position using the DICOM tags (source to patient distance etc), i could use > these positions values to obtain forward projection of the CT data.. after > doing this I feel my registering the forward projection image and the > actual fluoroscopy image(obtained during the surgery) would be easier...Please > advice me if there is any better way to deal this problem.. > Regards > Vishal > > On Thu, Oct 15, 2015 at 3:03 PM, Simon Rit > wrote: > >> Yes, RTK can certainly do things like that. Start with a simple geometry >> following the example Forward projection >> of the >> wiki and maybe come back to us with more >> precise questions? >> Good luck, >> Simon >> >> On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: >> >>> hi, >>> Im working on a CT data set using ITK.. Im trying to come up with a >>> registration algorithm for fluoroscopy image obtained from C-Arm taken at >>> some angle wrt to the patient and the projection of CT data taken at the >>> same angle as that of the C-arm.. i need to change the angles of projection >>> and the focal length of the source from time to time for my study.. I was >>> wondering if i could do that using RTK? If yes, could you tell me where I >>> find information that is relevant to my problem..Thank you >>> Regards >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnthibault at gmail.com Thu Oct 15 07:55:17 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Thu, 15 Oct 2015 13:55:17 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Thank you very much Simon for this advice, I should have read more carefully the recent posts about FFTWF / FFTWD. Now that Itk has been rebuilt using these flags, I no longer experience the previous problem. Unfortunately, when reconstructing with the CPU version of FDK, it seems that, although Ramp filtering and backprojection now do work very well, I still have issues with the weighting filter of FDK. As I am not familiar with analytic reconstruction methods, I don't know if the geometric parameters that are generated by the import method of Reg23ProjectionGeometry are consistant with the high variability of the gain factor applied to my projection by FDKWeightProjectionFilter: Just a short example: When using the following geometric parameters: SrcToCenter -1045.84 SrcToDet -1261.02 srcOffX 6.56918 srcOffY 6.56918 ProjOffX -151.44 ProjOffY -151.44 => FDKWeighting filter outputs an image that has a mean of -1.518 with a standard deviation of 2.056 with minimum value of -6.130 and maximum value of 1.871 On a frame where the source offset seems to be a little bit lower, I have the following gemetric parameters: SrcToCenter -1042.66 SrcToDet -1257.4 srcOffX 1.25469 srcOffY 1.25469 ProjOffX -150.321 ProjOffY -150.321 => FDKWeighting filter outputs an image that has a mean of -4.279E-4 with a standard deviation of 5.786E-4 with minimum value of -0.005 and maximum value of 5.268E-4 For comparison, our attenuation images in input of FDK have a mean of 0.8 with a standard deviation of 1.09 with minimum value of -1 and maximum value of 3.262. Here the negative values of attenuation arise from a problem while approximating the I0 in our images, although we should work on that problem, it was not that critical in SART reconstruction. I am surprised by such an important difference in gain applied to projection, given that, when disabling manually this weighting filter in RTK code, RampFiltering and BackProjection alone provided visually good reconstruction results. If you have any idea of what could have gone wrong in the process of importing geometry and/or applying weighting filter, I would be glad to hear it. Thank you in advance. Kind regards Thibault Notargiacomo 2015-10-14 18:58 GMT+02:00 Simon Rit : > Hi Thibault, > No, there is not really a log system that would allow you debugging at run > time. You can compile a debug version that would enable a lot of messages > related to the pipeline. For this, I think you need to use NDEBUG at > compilation (it's an ITK mechanism that I never use). > No, it's not normal that you see an error message. There are two things: > - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it > only handles power of 2/3/5 dimensions and it's slow. I always advise > people to use FFTW by turning on ITK_USE_FFTW options during ITK's > compilation. > - I don't fully understand why vnl doesn't work either. I understand the > first two dimensions, for vnl (which I strongly suggest to not use), I pad > to the next power of 2 so > 780 * 2 (for zero padding) -> 2048 > 780 -> 1024 > but then, if you use 64 projections, why 11? Are you sure the second input > image to FDKConeBeamReconstructionImageFilter has the dimension you want? I > would try to connect input 2 to an itk::ImageFileWriter and check what are > the dimensions of this image. If you're absolutely sure, then I'll try to > reproduce and fix the issue. > Simon > > On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < > gnthibault at gmail.com> wrote: > >> Dear all, >> >> I recently had troubles while trying to rewrite my code, linked with >> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >> well, to using fdk reconstruction method. >> >> My first question: is there a general way to enable maximum debug log >> level at runtime in rtk ? >> >> My second question, is more specific: is it normal that I see such error >> message coming from itk when using FDKConeBeamReconstructionFilter : >> >> ExceptionObject caught with fdk->Update() in file [...] >> >> itk::ExceptionObject (0x7f377c020cb0) >> Location: "unknown" >> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >> Line: 416 >> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >> during SingleMethodExecute >> >> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >> Cannot compute FFT of image with size [2048, 1024, 11]. >> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >> size in each dimension has a prime factorization consisting of only 2s, 3s, >> or 5s. >> >> I suppose that this error arise while performing ramp filtering, but I >> see no relation between FFT configuration stated in the error log ( [2048, >> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >> projections. >> >> I also tried with 200 projection and I had the same problem, but with >> [2048, 1024, 34] >> >> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >> to the total number of projection in my dataset every time. >> >> The revision I am currently using: >> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >> Merge: 578cf89 09d820c >> >> >> Thank you in advance for your help. >> >> Regards >> >> Thibault Notargiacomo >> >> _______________________________________________ >> Rtk-users mailing 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 Oct 15 10:50:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 16:50:30 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Interesting... I never used a geometry with negative sdd and sid but that's the issue here in my opinion. I did a quick test with positive and negative sdd/sid and that does not work for me either. Can you make them positive somehow? BTW, do you still use a modified version of the reg23 and can you share it? Thanks, Simon PS: the script I used for the test: rtksimulatedgeometry \ -o g \ -n 360 \ --sdd 1500 \ --sid 1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o pos.mha -g g rtksimulatedgeometry \ -o g \ -n 360 \ --sdd -1500 \ --sid -1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o neg.mha -g g On Thu, Oct 15, 2015 at 1:55 PM, Notargiacomo Thibault wrote: > Thank you very much Simon for this advice, I should have read more > carefully the recent posts about FFTWF / FFTWD. > > Now that Itk has been rebuilt using these flags, I no longer experience > the previous problem. > Unfortunately, when reconstructing with the CPU version of FDK, it seems > that, although Ramp filtering and backprojection now do work very well, I > still have issues with the weighting filter of FDK. > > As I am not familiar with analytic reconstruction methods, I don't know if > the geometric parameters that are generated by the import method of > Reg23ProjectionGeometry are consistant with the high variability of the > gain factor applied to my projection by FDKWeightProjectionFilter: > > Just a short example: > When using the following geometric parameters: > > SrcToCenter -1045.84 > SrcToDet -1261.02 > srcOffX 6.56918 > srcOffY 6.56918 > ProjOffX -151.44 > ProjOffY -151.44 > > => FDKWeighting filter outputs an image that has a mean of -1.518 with a > standard deviation of 2.056 with minimum value of -6.130 and maximum > value of 1.871 > > > On a frame where the source offset seems to be a little bit lower, I have > the following gemetric parameters: > > SrcToCenter -1042.66 > SrcToDet -1257.4 > srcOffX 1.25469 > srcOffY 1.25469 > ProjOffX -150.321 > ProjOffY -150.321 > > => FDKWeighting filter outputs an image that has a mean of -4.279E-4 > with a standard deviation of 5.786E-4 with minimum value of -0.005 and > maximum value of 5.268E-4 > > For comparison, our attenuation images in input of FDK have a mean of 0.8 > with a standard deviation of 1.09 with minimum value of -1 and maximum > value of 3.262. > > Here the negative values of attenuation arise from a problem while > approximating the I0 in our images, although we should work on that > problem, it was not that critical in SART reconstruction. > > I am surprised by such an important difference in gain applied to > projection, given that, when disabling manually this weighting filter in > RTK code, RampFiltering and BackProjection alone provided visually good > reconstruction results. > > If you have any idea of what could have gone wrong in the process of > importing geometry and/or applying weighting filter, I would be glad to > hear it. > > Thank you in advance. > > Kind regards > > Thibault Notargiacomo > > > > > > > > > 2015-10-14 18:58 GMT+02:00 Simon Rit : > >> Hi Thibault, >> No, there is not really a log system that would allow you debugging at >> run time. You can compile a debug version that would enable a lot of >> messages related to the pipeline. For this, I think you need to use NDEBUG >> at compilation (it's an ITK mechanism that I never use). >> No, it's not normal that you see an error message. There are two things: >> - the FFT of itk (compiled by default, based on vnl) is really bad IMO: >> it only handles power of 2/3/5 dimensions and it's slow. I always advise >> people to use FFTW by turning on ITK_USE_FFTW options during ITK's >> compilation. >> - I don't fully understand why vnl doesn't work either. I understand the >> first two dimensions, for vnl (which I strongly suggest to not use), I pad >> to the next power of 2 so >> 780 * 2 (for zero padding) -> 2048 >> 780 -> 1024 >> but then, if you use 64 projections, why 11? Are you sure the second >> input image to FDKConeBeamReconstructionImageFilter has the dimension you >> want? I would try to connect input 2 to an itk::ImageFileWriter and check >> what are the dimensions of this image. If you're absolutely sure, then I'll >> try to reproduce and fix the issue. >> Simon >> >> On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < >> gnthibault at gmail.com> wrote: >> >>> Dear all, >>> >>> I recently had troubles while trying to rewrite my code, linked with >>> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >>> well, to using fdk reconstruction method. >>> >>> My first question: is there a general way to enable maximum debug log >>> level at runtime in rtk ? >>> >>> My second question, is more specific: is it normal that I see such error >>> message coming from itk when using FDKConeBeamReconstructionFilter : >>> >>> ExceptionObject caught with fdk->Update() in file [...] >>> >>> itk::ExceptionObject (0x7f377c020cb0) >>> Location: "unknown" >>> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >>> Line: 416 >>> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >>> during SingleMethodExecute >>> >>> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >>> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >>> Cannot compute FFT of image with size [2048, 1024, 11]. >>> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >>> size in each dimension has a prime factorization consisting of only 2s, 3s, >>> or 5s. >>> >>> I suppose that this error arise while performing ramp filtering, but I >>> see no relation between FFT configuration stated in the error log ( [2048, >>> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >>> projections. >>> >>> I also tried with 200 projection and I had the same problem, but with >>> [2048, 1024, 34] >>> >>> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >>> to the total number of projection in my dataset every time. >>> >>> The revision I am currently using: >>> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >>> Merge: 578cf89 09d820c >>> >>> >>> Thank you in advance for your help. >>> >>> Regards >>> >>> Thibault Notargiacomo >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 03:12:36 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 09:12:36 +0200 Subject: [Rtk-users] Question about the geometry Message-ID: Dear all. Hello again. I writing to you again because I need some help to understand how to declare the geometry of the system. Cyril redirected me towards this document ( http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a lot, but unfortunately it has not been enough to make me reconstruct a tomogram. I have attached a drawing of my setup (setup.jpg). The source-to-detector distance is around 1600 mm. I just rotate the sample instead of the source, and the sample-detector distance is 15 cm which makes the isocenter distance 1450. The field of view is around 2 cm. The aligned projections are located here: https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 and the raw tiffs are here: https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 I would say the input data looks as nice, but when reconstructing I'm still just getting noise: This is how I perform my "reconstruction" # 361 projections from 0 to 360 degrees. The source-detector distance is 1.6 m and the # sample-detector distance is 15 cm # I have tried with many variations of --ssd and --sid but I think they all look the same rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o c:\Work\out_dir\geometry_real.xml # make a mha file out of the tiff files rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output c:\Work\out_dir\cylinder-a.mha --regexp .tif # "Reconstruct" the data. rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 The result can be viewed in the recon_result.PNG attachment. The reconstrcution can be found here: https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 Can someone please help me what I am doing wrong? best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: setup.jpg Type: image/jpeg Size: 29527 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: recon_result.PNG Type: image/png Size: 239196 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 06:09:04 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 12:09:04 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Is the origin and spacing of your projection data correct? What is your projection pixel size? Regards, Chao 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger : > Dear all. Hello again. > > I writing to you again because I need some help to understand how to > declare the geometry of the system. > > Cyril redirected me towards this document ( > http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > lot, but unfortunately it has not been enough to make me reconstruct a > tomogram. > > I have attached a drawing of my setup (setup.jpg). The > source-to-detector distance is around 1600 mm. I just rotate the > sample instead of the source, and the sample-detector distance is 15 > cm which makes the isocenter distance 1450. The field of view is > around 2 cm. > > The aligned projections are located here: > https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > and the raw tiffs are here: > https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > > I would say the input data looks as nice, but when reconstructing I'm > still just getting noise: > > This is how I perform my "reconstruction" > > # 361 projections from 0 to 360 degrees. The source-detector distance > is 1.6 m and the > # sample-detector distance is 15 cm > # I have tried with many variations of --ssd and --sid but I think > they all look the same > rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > c:\Work\out_dir\geometry_real.xml > > # make a mha file out of the tiff files > rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > c:\Work\out_dir\cylinder-a.mha --regexp .tif > > # "Reconstruct" the data. > rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha -g > c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > > The result can be viewed in the recon_result.PNG attachment. > The reconstrcution can be found here: > https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > > Can someone please help me what I am doing wrong? > > best > > Arvid > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 07:15:25 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 13:15:25 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao. Thank you for the reply. However, I'm not quite sure what you mean by origin and spacing. A pixel on the detector is ~200 microns, and the sample is magnified around 1.3 times. I do understand that having a correct geometry is important to get an output image with correct dimensions, but I do not understand it's so difficult for me to make a single successful reconstruction (possibly with a dummy geometry). best Arvid PS: Just to validate the data I'm testing on I installed Octave and created a sinogram I then ran through its iradon implementation. It seemed to work quite nicely (see attachments). On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > Hi Arvid, > > Is the origin and spacing of your projection data correct? What is your > projection pixel size? > > Regards, Chao > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > : >> >> Dear all. Hello again. >> >> I writing to you again because I need some help to understand how to >> declare the geometry of the system. >> >> Cyril redirected me towards this document ( >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> lot, but unfortunately it has not been enough to make me reconstruct a >> tomogram. >> >> I have attached a drawing of my setup (setup.jpg). The >> source-to-detector distance is around 1600 mm. I just rotate the >> sample instead of the source, and the sample-detector distance is 15 >> cm which makes the isocenter distance 1450. The field of view is >> around 2 cm. >> >> The aligned projections are located here: >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> and the raw tiffs are here: >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> I would say the input data looks as nice, but when reconstructing I'm >> still just getting noise: >> >> This is how I perform my "reconstruction" >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> is 1.6 m and the >> # sample-detector distance is 15 cm >> # I have tried with many variations of --ssd and --sid but I think >> they all look the same >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> c:\Work\out_dir\geometry_real.xml >> >> # make a mha file out of the tiff files >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> # "Reconstruct" the data. >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> The result can be viewed in the recon_result.PNG attachment. >> The reconstrcution can be found here: >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> Can someone please help me what I am doing wrong? >> >> best >> >> Arvid >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: Capture.JPG Type: image/jpeg Size: 58155 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 08:03:16 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 14:03:16 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Since you know how important a correct geometry is, you should understand why you need projection origin and spacing. CT geometry has more parameters than sid and sdd. How big the detector pixel size (spacing) and how the detector is places w.r.t. the central ray (origin) also play a role in the geometry. And in-plane/out-of-plane rotations etc. In your dataset the correct spacing and origin information is not stored correctly in the projection data, so the total geometry is wrong. I have tested your data with the following command line and it gives meaningful image. The newspacing and neworigin arguments force rtkfdk to accept spacing and origin information of projections from command line instead of from the data. Also I change the spacing of the volume from 2 to 0.2 because your object is small. rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 Apparently there is still some misalignment between this guessed geometry and the real geometry, which you need to figure out with your own hardware. Regards, Chao 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Hi Chao. > > Thank you for the reply. However, I'm not quite sure what you mean by > origin and spacing. > A pixel on the detector is ~200 microns, and the sample is magnified > around 1.3 times. > > I do understand that having a correct geometry is important to get an > output image with correct dimensions, but I do not understand it's so > difficult for me to make a single successful reconstruction (possibly > with a dummy geometry). > > best > > Arvid > > PS: Just to validate the data I'm testing on I installed Octave and > created a sinogram I then ran through its iradon implementation. It > seemed to work quite nicely (see attachments). > > On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > > Hi Arvid, > > > > Is the origin and spacing of your projection data correct? What is your > > projection pixel size? > > > > Regards, Chao > > > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Dear all. Hello again. > >> > >> I writing to you again because I need some help to understand how to > >> declare the geometry of the system. > >> > >> Cyril redirected me towards this document ( > >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> lot, but unfortunately it has not been enough to make me reconstruct a > >> tomogram. > >> > >> I have attached a drawing of my setup (setup.jpg). The > >> source-to-detector distance is around 1600 mm. I just rotate the > >> sample instead of the source, and the sample-detector distance is 15 > >> cm which makes the isocenter distance 1450. The field of view is > >> around 2 cm. > >> > >> The aligned projections are located here: > >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> and the raw tiffs are here: > >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> > >> I would say the input data looks as nice, but when reconstructing I'm > >> still just getting noise: > >> > >> This is how I perform my "reconstruction" > >> > >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> is 1.6 m and the > >> # sample-detector distance is 15 cm > >> # I have tried with many variations of --ssd and --sid but I think > >> they all look the same > >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> c:\Work\out_dir\geometry_real.xml > >> > >> # make a mha file out of the tiff files > >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> > >> # "Reconstruct" the data. > >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> > >> The result can be viewed in the recon_result.PNG attachment. > >> The reconstrcution can be found here: > >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> > >> Can someone please help me what I am doing wrong? > >> > >> best > >> > >> Arvid > >> > >> _______________________________________________ > >> Rtk-users mailing 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 Fri Oct 16 08:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 16 Oct 2015 14:15:43 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Thanks a lot Chao, I'm so glad that someone else than me did this! Just as a side note, Arvid, if you don't understand what is the origin and the spacing, look at the ITK software guide section 4.1.4, this is VERY important. Simon On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > Hi Arvid, > > Since you know how important a correct geometry is, you should understand > why you need projection origin and spacing. > CT geometry has more parameters than sid and sdd. How big the detector > pixel size (spacing) and how the detector is places w.r.t. the central ray > (origin) also play a role in the geometry. And in-plane/out-of-plane > rotations etc. > In your dataset the correct spacing and origin information is not stored > correctly in the projection data, so the total geometry is wrong. > > I have tested your data with the following command line and it gives > meaningful image. The newspacing and neworigin arguments force rtkfdk to > accept spacing and origin information of projections from command line > instead of from the data. Also I change the spacing of the volume from 2 to > 0.2 because your object is small. > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha > -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 > --newspacing=0.2 --neworigin=-20,-20 > > Apparently there is still some misalignment between this guessed geometry > and the real geometry, which you need to figure out with your own hardware. > > Regards, > Chao > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < > bottiger at gmail.com>: > >> Hi Chao. >> >> Thank you for the reply. However, I'm not quite sure what you mean by >> origin and spacing. >> A pixel on the detector is ~200 microns, and the sample is magnified >> around 1.3 times. >> >> I do understand that having a correct geometry is important to get an >> output image with correct dimensions, but I do not understand it's so >> difficult for me to make a single successful reconstruction (possibly >> with a dummy geometry). >> >> best >> >> Arvid >> >> PS: Just to validate the data I'm testing on I installed Octave and >> created a sinogram I then ran through its iradon implementation. It >> seemed to work quite nicely (see attachments). >> >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >> > Hi Arvid, >> > >> > Is the origin and spacing of your projection data correct? What is your >> > projection pixel size? >> > >> > Regards, Chao >> > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> > : >> >> >> >> Dear all. Hello again. >> >> >> >> I writing to you again because I need some help to understand how to >> >> declare the geometry of the system. >> >> >> >> Cyril redirected me towards this document ( >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> >> lot, but unfortunately it has not been enough to make me reconstruct a >> >> tomogram. >> >> >> >> I have attached a drawing of my setup (setup.jpg). The >> >> source-to-detector distance is around 1600 mm. I just rotate the >> >> sample instead of the source, and the sample-detector distance is 15 >> >> cm which makes the isocenter distance 1450. The field of view is >> >> around 2 cm. >> >> >> >> The aligned projections are located here: >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> >> and the raw tiffs are here: >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> >> >> I would say the input data looks as nice, but when reconstructing I'm >> >> still just getting noise: >> >> >> >> This is how I perform my "reconstruction" >> >> >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> >> is 1.6 m and the >> >> # sample-detector distance is 15 cm >> >> # I have tried with many variations of --ssd and --sid but I think >> >> they all look the same >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> >> c:\Work\out_dir\geometry_real.xml >> >> >> >> # make a mha file out of the tiff files >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> >> >> # "Reconstruct" the data. >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> >> c:\Work\out_dir\cylinder_a_recon.mha -g >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> >> >> The result can be viewed in the recon_result.PNG attachment. >> >> The reconstrcution can be found here: >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> >> >> Can someone please help me what I am doing wrong? >> >> >> >> best >> >> >> >> Arvid >> >> >> >> _______________________________________________ >> >> 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 bottiger at gmail.com Fri Oct 16 08:33:38 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 14:33:38 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao Wu Thank you very much! This is definitely something I can use in order to move forward. I'm not trying to make the best possible reconstruction out of this dataset, but just have something that works so I can start playing around and get familiar with RTK. Which I do have now. And to Simon: Thanks for the link. bets Arvid On Fri, Oct 16, 2015 at 2:15 PM, Simon Rit wrote: > Thanks a lot Chao, I'm so glad that someone else than me did this! > Just as a side note, Arvid, if you don't understand what is the origin and > the spacing, look at the ITK software guide section 4.1.4, this is VERY > important. > Simon > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: >> >> Hi Arvid, >> >> Since you know how important a correct geometry is, you should understand >> why you need projection origin and spacing. >> CT geometry has more parameters than sid and sdd. How big the detector >> pixel size (spacing) and how the detector is places w.r.t. the central ray >> (origin) also play a role in the geometry. And in-plane/out-of-plane >> rotations etc. >> In your dataset the correct spacing and origin information is not stored >> correctly in the projection data, so the total geometry is wrong. >> >> I have tested your data with the following command line and it gives >> meaningful image. The newspacing and neworigin arguments force rtkfdk to >> accept spacing and origin information of projections from command line >> instead of from the data. Also I change the spacing of the volume from 2 to >> 0.2 because your object is small. >> >> rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml >> --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 >> >> Apparently there is still some misalignment between this guessed geometry >> and the real geometry, which you need to figure out with your own hardware. >> >> Regards, >> Chao >> >> >> 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> : >>> >>> Hi Chao. >>> >>> Thank you for the reply. However, I'm not quite sure what you mean by >>> origin and spacing. >>> A pixel on the detector is ~200 microns, and the sample is magnified >>> around 1.3 times. >>> >>> I do understand that having a correct geometry is important to get an >>> output image with correct dimensions, but I do not understand it's so >>> difficult for me to make a single successful reconstruction (possibly >>> with a dummy geometry). >>> >>> best >>> >>> Arvid >>> >>> PS: Just to validate the data I'm testing on I installed Octave and >>> created a sinogram I then ran through its iradon implementation. It >>> seemed to work quite nicely (see attachments). >>> >>> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >>> > Hi Arvid, >>> > >>> > Is the origin and spacing of your projection data correct? What is your >>> > projection pixel size? >>> > >>> > Regards, Chao >>> > >>> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >>> > : >>> >> >>> >> Dear all. Hello again. >>> >> >>> >> I writing to you again because I need some help to understand how to >>> >> declare the geometry of the system. >>> >> >>> >> Cyril redirected me towards this document ( >>> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >>> >> lot, but unfortunately it has not been enough to make me reconstruct a >>> >> tomogram. >>> >> >>> >> I have attached a drawing of my setup (setup.jpg). The >>> >> source-to-detector distance is around 1600 mm. I just rotate the >>> >> sample instead of the source, and the sample-detector distance is 15 >>> >> cm which makes the isocenter distance 1450. The field of view is >>> >> around 2 cm. >>> >> >>> >> The aligned projections are located here: >>> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >>> >> and the raw tiffs are here: >>> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >>> >> >>> >> I would say the input data looks as nice, but when reconstructing I'm >>> >> still just getting noise: >>> >> >>> >> This is how I perform my "reconstruction" >>> >> >>> >> # 361 projections from 0 to 360 degrees. The source-detector distance >>> >> is 1.6 m and the >>> >> # sample-detector distance is 15 cm >>> >> # I have tried with many variations of --ssd and --sid but I think >>> >> they all look the same >>> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >>> >> c:\Work\out_dir\geometry_real.xml >>> >> >>> >> # make a mha file out of the tiff files >>> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >>> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >>> >> >>> >> # "Reconstruct" the data. >>> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >>> >> c:\Work\out_dir\cylinder_a_recon.mha -g >>> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >>> >> >>> >> The result can be viewed in the recon_result.PNG attachment. >>> >> The reconstrcution can be found here: >>> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >>> >> >>> >> Can someone please help me what I am doing wrong? >>> >> >>> >> best >>> >> >>> >> Arvid >>> >> >>> >> _______________________________________________ >>> >> 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 simon.rit at creatis.insa-lyon.fr Tue Oct 20 14:38:24 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 20 Oct 2015 20:38:24 +0200 Subject: [Rtk-users] using RTK with projection matrices and projection images In-Reply-To: References: Message-ID: Dear Shiras Abdurahman, It's better to email the mailing so that everybody can participate our discussion. We developped a tool to do this a while ago but it's never made it to the public repo. I have enclosed it if you want to have a look but it does what you want I think. The part of interest for you is how the variable matProj is converted to an RTK geometry. We'll try to clean it and push it to the main repo in November if you can't figure out how to use it. Good luck! Simon On Tue, Oct 20, 2015 at 5:07 PM, shiras abdurahman < shiras.abdurahman at gmail.com> wrote: > Dear Dr. Rit, > > My name is Shiras Abdurahman and I am a PhD student at ovgu Magdeburg, > Germany. Currently, I am working in tomographic reconstruction and I > started to using RTK. I have projection images and corresponding projection > matrices. I want to reconstruct volume with RTK. Is it possible to set > projection matrices directly and reconstruct the volume. Or do I need to > decompose first and get intrinsic and extrinsic parameters especially > rotation angles and use addProjection function? > I know that geometry can be read from xml file. > > Thank you for your time and patience. > > With regards, > Shiras Abdurahman > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rtkthales.cxx Type: text/x-c++src Size: 9360 bytes Desc: not available URL: From wuchao04 at gmail.com Mon Oct 26 16:30:58 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 26 Oct 2015 21:30:58 +0100 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Well, that's just some guess. I assume the central ray goes towards the center of your detector, so the origin should be denoted as somewhere near (- half_width, - half_height) in millimeter. Then I just fine-tune it manually a little bit to get a little bit better results... Regards, Chao 2015-10-26 19:44 GMT+01:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Dear Chao. > > I am very thankful for the help you provided me some days ago on the > RTK mailing list. However, I have a quick followup question for you, > which I have not been able to learn by reading the (very long) manual > another user provided me with. > > I am now working on another dataset, and get similar artifact when > reconstructing. Could you please help understand why you picked the > parameters you did? I guess the "spacing" is pixel size, but why did > why you pick "neworigin" to be -20,-20 ? > > best > > Arvid > > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > > Hi Arvid, > > > > Since you know how important a correct geometry is, you should understand > > why you need projection origin and spacing. > > CT geometry has more parameters than sid and sdd. How big the detector > pixel > > size (spacing) and how the detector is places w.r.t. the central ray > > (origin) also play a role in the geometry. And in-plane/out-of-plane > > rotations etc. > > In your dataset the correct spacing and origin information is not stored > > correctly in the projection data, so the total geometry is wrong. > > > > I have tested your data with the following command line and it gives > > meaningful image. The newspacing and neworigin arguments force rtkfdk to > > accept spacing and origin information of projections from command line > > instead of from the data. Also I change the spacing of the volume from 2 > to > > 0.2 because your object is small. > > > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > > c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml > > --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 > > > > Apparently there is still some misalignment between this guessed geometry > > and the real geometry, which you need to figure out with your own > hardware. > > > > Regards, > > Chao > > > > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Hi Chao. > >> > >> Thank you for the reply. However, I'm not quite sure what you mean by > >> origin and spacing. > >> A pixel on the detector is ~200 microns, and the sample is magnified > >> around 1.3 times. > >> > >> I do understand that having a correct geometry is important to get an > >> output image with correct dimensions, but I do not understand it's so > >> difficult for me to make a single successful reconstruction (possibly > >> with a dummy geometry). > >> > >> best > >> > >> Arvid > >> > >> PS: Just to validate the data I'm testing on I installed Octave and > >> created a sinogram I then ran through its iradon implementation. It > >> seemed to work quite nicely (see attachments). > >> > >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > >> > Hi Arvid, > >> > > >> > Is the origin and spacing of your projection data correct? What is > your > >> > projection pixel size? > >> > > >> > Regards, Chao > >> > > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > >> > : > >> >> > >> >> Dear all. Hello again. > >> >> > >> >> I writing to you again because I need some help to understand how to > >> >> declare the geometry of the system. > >> >> > >> >> Cyril redirected me towards this document ( > >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> >> lot, but unfortunately it has not been enough to make me reconstruct > a > >> >> tomogram. > >> >> > >> >> I have attached a drawing of my setup (setup.jpg). The > >> >> source-to-detector distance is around 1600 mm. I just rotate the > >> >> sample instead of the source, and the sample-detector distance is 15 > >> >> cm which makes the isocenter distance 1450. The field of view is > >> >> around 2 cm. > >> >> > >> >> The aligned projections are located here: > >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> >> and the raw tiffs are here: > >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> >> > >> >> I would say the input data looks as nice, but when reconstructing I'm > >> >> still just getting noise: > >> >> > >> >> This is how I perform my "reconstruction" > >> >> > >> >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> >> is 1.6 m and the > >> >> # sample-detector distance is 15 cm > >> >> # I have tried with many variations of --ssd and --sid but I think > >> >> they all look the same > >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> >> c:\Work\out_dir\geometry_real.xml > >> >> > >> >> # make a mha file out of the tiff files > >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> >> > >> >> # "Reconstruct" the data. > >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> >> > >> >> The result can be viewed in the recon_result.PNG attachment. > >> >> The reconstrcution can be found here: > >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> >> > >> >> Can someone please help me what I am doing wrong? > >> >> > >> >> best > >> >> > >> >> Arvid > >> >> > >> >> _______________________________________________ > >> >> Rtk-users mailing 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 Wed Oct 28 11:47:13 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Wed, 28 Oct 2015 16:47:13 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter Message-ID: <5630EE01.5070900@cppm.in2p3.fr> Hello everyone, I have a question/suggestion about the set of rtkDraw*ImageFilter. This filter are written as additive filters: for example, in rtkDrawEllipsoidImageFilter.txx, we can find for(..) itOut.Set( ellipsoid.density + itIn.Get() ) instead of for(..) itOut.Set( ellipsoid.density ) I think it can be more flexible the second option, because we can always associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. Moreover, the rtkDrawGeometricPhantomImageFilter class already uses itkAddImageFilter in order to have additive filters (which is redundant in current situation). What do you think ? Regards From shiraska at gmail.com Wed Oct 28 13:12:36 2015 From: shiraska at gmail.com (Shiras Abdurahman) Date: Wed, 28 Oct 2015 18:12:36 +0100 Subject: [Rtk-users] Filtered projection images Message-ID: Hi, I want to access processed projections especially filtered projections which are used for backprojection. Is it possible in RTK? Shiras -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 28 15:52:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:52:10 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: <5630EE01.5070900@cppm.in2p3.fr> References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: Hi Mathieu, Thanks for pointing this out. I agree that it might not be the best solution, yet one could argue that you could simply create a constant image with 0 to do what you'd like from the current implementation. My main problem is that I just tried to do what you suggest and some tests then fail... which shows the obvious, it's not a backward compatible change. I see two solutions: - keep it as is and you use ConstantImageFilter + we remove useless add filters, - a more complex but maybe more elegant solution: add a third template parameter for the operation that would allow the user to do what he'd like in a functor. That's what's done with filters that derive from itk::UnaryImageFilter . The default would be itk::Add2 but we could find or implement another one that simply discards the pixel value. What do you think? Simon PS: looking in the code, I just found that rtk::DrawConeImageFilter is not consistent with the others, it was always setting to 0 outside... that's been fixed! On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont wrote: > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. This > filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can always > associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is redundant in > current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > Rtk-users mailing 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 Oct 28 15:53:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:53:25 +0100 Subject: [Rtk-users] Filtered projection images In-Reply-To: References: Message-ID: Hi, I guess you mean filtered projections that are used in filtered backprojections algorithm? The filter you are looking for is rtk::FFTRampImageFilter which implements the ramp filter. There is a command line tool that can do it, rtkramp. Regards, Simon On Wed, Oct 28, 2015 at 6:12 PM, Shiras Abdurahman wrote: > Hi, > > I want to access processed projections especially filtered projections > which are used for backprojection. Is it possible in RTK? > > Shiras > > _______________________________________________ > Rtk-users mailing 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 Fri Oct 30 06:56:50 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Fri, 30 Oct 2015 11:56:50 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: <56334CF2.8070902@cppm.in2p3.fr> Hi, In case of your first solution, you can not chain several Draw*ImageFilters. For example, if you want to create small cylinders in a big cylinder. Your second solution is better. One another solution can be a thing like itk:SpatialObject but more simpler. An rtk::SpatialObject which one function (isInside(point)). We create a rtkDrawImageFilter class and implement ThreadedGenerateData like this : DrawImageFilter::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType itkNotUsed(threadId) { ... while( !itOut.IsAtEnd() ) { this->GetInput()->TransformIndexToPhysicalPoint(itOut.GetIndex(), point); if(m_rtkSpatialObject.isInside(point) itOut.Set(m_rtkFillFunctor(density, itIn.Get()); ... } DrawConeImageFilter class can be a child of this new DrawImageFilter (with new methods like setAngle, SetRadius which will adjust the rtkConeSpatialObject) This solution suppress duplicated code in Draw*ImageFilter::ThreadedGenerateData and makes easier implementation of another type of filling. On 28/10/2015 20:52, Simon Rit wrote: > Hi Mathieu, > Thanks for pointing this out. I agree that it might not be the best > solution, yet one could argue that you could simply create a constant > image with 0 to do what you'd like from the current implementation. My > main problem is that I just tried to do what you suggest and some tests > then fail... which shows the obvious, it's not a backward compatible change. > I see two solutions: > - keep it as is and you use ConstantImageFilter + we remove useless add > filters, > - a more complex but maybe more elegant solution: add a third template > parameter for the operation that would allow the user to do what he'd > like in a functor. That's what's done with filters that derive from > itk::UnaryImageFilter > . > The default would be itk::Add2 but we could find or implement another > one that simply discards the pixel value. > What do you think? > Simon > > PS: looking in the code, I just found that rtk::DrawConeImageFilter is > not consistent with the others, it was always setting to 0 outside... > that's been fixed! > > On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont > wrote: > > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. > This filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can > always associate Draw*ImageFilter and itkAddImageFilter to get an > additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is > redundant in current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > 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 Oct 1 02:18:53 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 08:18:53 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng wrote: > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: From cyril.mory at uclouvain.be Thu Oct 1 04:02:23 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Thu, 01 Oct 2015 10:02:23 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> Message-ID: <560CE88F.5030807@uclouvain.be> Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I'm using windows system (windows7 64 with VS 2013) and > I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with "ITK + FFTW" in > windows system? > > I'm just trying to use *rtkextractshroudsignal* and it seems to > require FFTW library externally. > > When I tried to use FFTW 3.3.4, I've encountered link errors as shown > below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > I'm running on Ubuntu 14.04 LTS and used the distribution library > (FFTW 3.3.3). If you're running on a Debian-based linux system, you > can also install the full development library set using the following > command: */sudo apt-get install libfftw3-3 libfftw3-dev/*. Then just > make sure that these libraries are being used by rerunning CCMake. > > I'm not quite sure about the error being thrown in your build, but > perhaps one of the main developers would be able to provide some more > insight into the issue. > > Hope this helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK > with those options on as you suggested. > > I've tried to use the up-to-date version of FFTW (3.3.4), but it > seems that it doesn't work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved external > symbol __imp_fftw_execute referenced in function "protected: > virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully using in > which system(Windows or Linux)? > > Thanks. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 6:56 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the inclusion of the > Fast Fourier Transform components. This requires compilation with > the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn't compile that way > initially, and it took a little bit of time to figure out. > > Hope that helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I'm now compiling itk-4.8 to use that feature since I've found > my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 4:31 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success since my > initial posting -- in fact I'm currently working on a new > method for accomplishing this task in certain challenging cases. > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase > signal output when called using the '-p' flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA/* > > From what I've experienced, this generally provides a good > signal [0,1) characterizing the respiratory phase using the > default settings. Occasionally, I've run into issues where > the default 'unsharpness' parameter needs to be adjusted to > give a clear signal (by appending the*--unsharp ##*flag to the > command). On more challenging shroud images -- notably, those > with little detectable signal from background -- additional > contrast-enhancement by pre-processing of the shroud has > assisted in signal extraction. > > I hope that helps -- and please let me know how it works out > for you. > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I've encountered exactly same issue and it would > be highly appreciated if you can share with me your > updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:*Rtk-users > [mailto:rtk-users-bounces at public.kitware.com]*On Behalf > Of*Joel Beaudry > *Sent:*Tuesday, March 17, 2015 5:25 PM > *To:*Matthew J. Riblett > > *Cc:*rtk-users at public.kitware.com > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but > I've had good success with using a Hilbert function in > python (scipy). I'm sure that Matlab has an equivalent > function, and maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett > > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a straightforward method > of going from the results of the rtkamsterdamshroud > and rtkextractshroudsignal applications to a [0,1) > phase signal for performing motion-compensated > reconstruction. I've been following along with the > MC-CBCT Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is used to > process the should signal prior to feeding it back > into the reconstruction application, but there is no > mention of how this is accomplished. I'm trying to > implement this into an automated workflow and I'd love > to know how this was accomplished. > > Thanks! > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > _______________________________________________ > 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 WEICHENG.SHEN at leidos.com Thu Oct 1 10:57:56 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Thu, 1 Oct 2015 14:57:56 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: image004.png Type: image/png Size: 15591 bytes Desc: image004.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 15591 bytes Desc: image001.png URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 1 11:23:48 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 17:23:48 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng wrote: > Hello Simon, > > > > Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside > RTK, the following error message appears: > > > > > ================================================================================================ > > > > CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): > By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project > has asked CMake to find a package configuration file provided by > "Gengetopt", but CMake did not find one. > > Could not find a package configuration file provided by "Gengetopt" with > any of the following names: > > GengetoptConfig.cmake > gengetopt-config.cmake > > Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set > "Gengetopt_DIR" to a directory containing one of the above files. If > "Gengetopt" provides a separate development package or SDK, be sure it has > been installed. > > > > > ================================================================================================ > > > > It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake > or gengetopt-config.cmake. I did a manual search for these files in the RTK > directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH > in the cmake GUI when performing configuration. The value of > CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln > file can now be successfully generated. > > > > Next I need to build the project using Visual Studio 2013. > > > > Thanks you very much for your help! > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Thursday, October 01, 2015 2:19 AM > *To:* Shen, Weicheng > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Unknown CMake command "WRAP_GGO" > > > > Hi, > > WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use > WRAP_GGO in an external project you need to do the same as in > applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the > easiest, to start with, is to build the rtktutorialapplication in the RTK > project. > > Let us know if that answered your problem, > > Simon > > > > On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: > > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 15591 bytes Desc: not available URL: From theday79 at gmail.com Thu Oct 1 17:33:51 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 1 Oct 2015 17:33:51 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <560CE88F.5030807@uclouvain.be> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> Message-ID: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park ; 'Matthew J. Riblett' ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I'm using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with "ITK + FFTW" in windows system? I'm just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I've encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I'm running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you're running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I'm not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I've tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn't work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn't compile that way initially, and it took a little bit of time to figure out. Hope that helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I'm now compiling itk-4.8 to use that feature since I've found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting - in fact I'm currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the '-p' flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I've experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I've run into issues where the default 'unsharpness' parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images - notably, those with little detectable signal from background - additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps - and please let me know how it works out for you. - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I've encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I've been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I'm trying to implement this into an automated workflow and I'd love to know how this was accomplished. Thanks! - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 joelbeaudry at gmail.com Thu Oct 1 17:40:30 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Thu, 1 Oct 2015 14:40:30 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Cyril, After trying out a few attempts, it seems like some values play nicer than others. Could it be an issue with floating point comparisons with the spacing and/or origins? It might explain why certain values seem to work (1.5) and others do not (0.88). I'll look at what values are being compared and get back to you. Thanks, Joel On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry wrote: > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 > spacing) and re-creating a mask off of that. So the motion mask should have > the same dimensions, spacing, and origin as the intended 4D image since I'm > using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating > my mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I created for > 160 (2), worked but not the case of 512 (0.88), and let you know what I > find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > wrote: > >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the small paragraph after >> the cuda command line : >> >> Note that the reconstructed volume in this example does not fully contain >> the attenuating object, causing hyper-attenuation artifacts on the borders >> of the result. To avoid these artifacts, reconstruct a larger volume >> (--dimension 256) should be fine. *Note that you will have to resize >> your motion mask as well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and allow any motion mask, >> but until I do, you can resize your motion mask using the CLITK tools ( >> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other datasets and it >> seems to be working. I need to increase the resolution and play around with >> the parameters now. >> >> I haven't had time to test it too much, but I do get an error when >> attempting to reconstruct with different dimensions. I'm using Cuda, and >> haven't tried it with just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >> AverageOutOfROIImageFilter: information of ROI image does not match input >> image" >> >> I'll be able to test some other things later and list more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line parameters AND data). Can >>> you restart it from scratch and let me know if you still have problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>> coordinates >>> - the regularization parameters (gamma space and gamma time) were way >>> too high. The regularization with a high gamma-time caused frames to be >>> identical, while it should only discourage variations >>> >>> I hope it works, now. If it doesn't work for you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and indeed, there are >>> several mistakes in it. I am working on correcting them. I'll keep you >>> posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>> >>> Hi RTK-users, >>> >>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>> example. The 5 frames should show some differences pertaining to patient >>> motion but the ones that I'm producing are identical, so no motion is >>> visible. >>> >>> Has anyone been able to follow the example and the provided dataset to >>> create a 4D image? >>> >>> Thanks, >>> Joel >>> >>> >>> _______________________________________________ >>> 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 Fri Oct 2 02:44:21 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 2 Oct 2015 08:44:21 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Joel, Can you explain how you created your mask? Looking at the code, it seems to me that if you create a 4D image with RTK, create a mask from this image with exactly the same meta info and pass it to ROOSTER, that should work in all cases. If I were you, I would compare the two mhd files (of the mask and the 4D image you used to create it) and verify that the meta info is exactly the same. For ROOSTER, I suggest to add an interpolation when the information is not inconsistent, e.g., in the main() function. I can do it if you agree Cyril. Simon On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry wrote: > Hi Cyril, > > After trying out a few attempts, it seems like some values play nicer than > others. Could it be an issue with floating point comparisons with the > spacing and/or origins? It might explain why certain values seem to work > (1.5) and others do not (0.88). I'll look at what values are being compared > and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >> spacing) and re-creating a mask off of that. So the motion mask should have >> the same dimensions, spacing, and origin as the intended 4D image since I'm >> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >> my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the mask I created >> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >> find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> Good to hear it's working now. >>> The error you get is explained on the wiki in the small paragraph after >>> the cuda command line : >>> >>> Note that the reconstructed volume in this example does not fully >>> contain the attenuating object, causing hyper-attenuation artifacts on the >>> borders of the result. To avoid these artifacts, reconstruct a larger >>> volume (--dimension 256) should be fine. *Note that you will have to >>> resize your motion mask as well, as 3D the motion mask is expected to have >>> the same size, spacing and origin as the first 3 dimensions of the 4D >>> output. * >>> >>> I guess I should take some time to fix that, and allow any motion mask, >>> but until I do, you can resize your motion mask using the CLITK tools ( >>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>> >>> Cyril >>> >>> >>> >>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other datasets and it >>> seems to be working. I need to increase the resolution and play around with >>> the parameters now. >>> >>> I haven't had time to test it too much, but I do get an error when >>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>> haven't tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>> AverageOutOfROIImageFilter: information of ROI image does not match input >>> image" >>> >>> I'll be able to test some other things later and list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> I have fixed the wiki example (command line parameters AND data). Can >>>> you restart it from scratch and let me know if you still have problems ? >>>> >>>> Roughly, the problems were the following: >>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>> coordinates >>>> - the regularization parameters (gamma space and gamma time) were way >>>> too high. The regularization with a high gamma-time caused frames to be >>>> identical, while it should only discourage variations >>>> >>>> I hope it works, now. If it doesn't work for you, please keep asking >>>> Cyril >>>> >>>> >>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki example, and indeed, there are >>>> several mistakes in it. I am working on correcting them. I'll keep you >>>> posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>> example. The 5 frames should show some differences pertaining to patient >>>> motion but the ones that I'm producing are identical, so no motion is >>>> visible. >>>> >>>> Has anyone been able to follow the example and the provided dataset to >>>> create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 cyril.mory at uclouvain.be Fri Oct 2 03:53:14 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 02 Oct 2015 09:53:14 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: <560E37EA.1060702@uclouvain.be> Indeed, resampling the mask if needed, to the correct size, spacing, origin and direction, seems the simplest way to deal with this issue. But I would do it in the filter rather than in the application, so that anything built on top of ROOSTER (i.e. incremental ROOSTER, or the rtkfourdroostertest) also benefits from it. Feel free to do it if you want, otherwise I'll take care of it next week :) On 10/02/2015 08:44 AM, Simon Rit wrote: > Hi Joel, > Can you explain how you created your mask? Looking at the code, it > seems to me that if you create a 4D image with RTK, create a mask from > this image with exactly the same meta info and pass it to ROOSTER, > that should work in all cases. If I were you, I would compare the two > mhd files (of the mask and the 4D image you used to create it) and > verify that the meta info is exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is > not inconsistent, e.g., in the main() function. I can do it if you > agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > > Hi Cyril, > > After trying out a few attempts, it seems like some values play > nicer than others. Could it be an issue with floating point > comparisons with the spacing and/or origins? It might explain why > certain values seem to work (1.5) and others do not (0.88). I'll > look at what values are being compared and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > > wrote: > > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions > 512 (0.88 spacing) and re-creating a mask off of that. So the > motion mask should have the same dimensions, spacing, and > origin as the intended 4D image since I'm using 4D rooster > with --dimension 512 --spacing 0.88. Perhaps I'm creating my > mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I > created for 160 (2), worked but not the case of 512 (0.88), > and let you know what I find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > > wrote: > > Hi Joel, > > Good to hear it's working now. > The error you get is explained on the wiki in the small > paragraph after the cuda command line : > > Note that the reconstructed volume in this example does > not fully contain the attenuating object, causing > hyper-attenuation artifacts on the borders of the result. > To avoid these artifacts, reconstruct a larger volume > (--dimension 256) should be fine. *Note that you will have > to resize your motion mask as well, as 3D the motion mask > is expected to have the same size, spacing and origin as > the first 3 dimensions of the 4D output. * > > I guess I should take some time to fix that, and allow any > motion mask, but until I do, you can resize your motion > mask using the CLITK tools > (http://www.creatis.insa-lyon.fr/rio/vv) or any method > that suits you. > > Cyril > > > > On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other >> datasets and it seems to be working. I need to increase >> the resolution and play around with the parameters now. >> >> I haven't had time to test it too much, but I do get an >> error when attempting to reconstruct with different >> dimensions. I'm using Cuda, and haven't tried it with >> just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws >> "In AverageOutOfROIImageFilter: information of ROI image >> does not match input image" >> >> I'll be able to test some other things later and list >> more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> I have fixed the wiki example (command line >> parameters AND data). Can you restart it from scratch >> and let me know if you still have problems ? >> >> Roughly, the problems were the following: >> - the "mm_50.mha" motion mask file was not aligned >> with the CBCT coordinates >> - the regularization parameters (gamma space and >> gamma time) were way too high. The regularization >> with a high gamma-time caused frames to be identical, >> while it should only discourage variations >> >> I hope it works, now. If it doesn't work for you, >> please keep asking >> Cyril >> >> >> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and >>> indeed, there are several mistakes in it. I am >>> working on correcting them. I'll keep you posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the >>>> 4DROOSTERReconstruction example. The 5 frames >>>> should show some differences pertaining to patient >>>> motion but the ones that I'm producing are >>>> identical, so no motion is visible. >>>> >>>> Has anyone been able to follow the example and the >>>> provided dataset to create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 joelbeaudry at gmail.com Fri Oct 2 12:31:38 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Fri, 2 Oct 2015 09:31:38 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: <560E37EA.1060702@uclouvain.be> References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: Hi Simon and Cyril, @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) and then use itkSnap to create a mask from that 3D image. I then use that mask as the input for ROOSTER, to which I again use the same spacing/dimensions. For some values it seems to work and other it doesn't. I'm wondering if itkSnap is truncating the spacing/dimension/origins when I save my mask, and perhaps why something like (160,2,-159) works but (511,0.88,-224.84). I'll take a look at the metadata. I'll try resampling my masks and like you said that should probably fix my issues. Thanks for the help, Joel On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory wrote: > Indeed, resampling the mask if needed, to the correct size, spacing, > origin and direction, seems the simplest way to deal with this issue. > But I would do it in the filter rather than in the application, so that > anything built on top of ROOSTER (i.e. incremental ROOSTER, or the > rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: > > Hi Joel, > Can you explain how you created your mask? Looking at the code, it seems > to me that if you create a 4D image with RTK, create a mask from this image > with exactly the same meta info and pass it to ROOSTER, that should work in > all cases. If I were you, I would compare the two mhd files (of the mask > and the 4D image you used to create it) and verify that the meta info is > exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is not > inconsistent, e.g., in the main() function. I can do it if you agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values play nicer >> than others. Could it be an issue with floating point comparisons with the >> spacing and/or origins? It might explain why certain values seem to work >> (1.5) and others do not (0.88). I'll look at what values are being compared >> and get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> wrote: >> >>> Hi Cyril, >>> >>> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >>> spacing) and re-creating a mask off of that. So the motion mask should have >>> the same dimensions, spacing, and origin as the intended 4D image since I'm >>> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >>> my mask incorrectly? >>> >>> I'll try and fiddle with it a bit later and see why the mask I created >>> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >>> find. >>> >>> Thanks again, >>> Joel >>> >>> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> Good to hear it's working now. >>>> The error you get is explained on the wiki in the small paragraph after >>>> the cuda command line : >>>> >>>> Note that the reconstructed volume in this example does not fully >>>> contain the attenuating object, causing hyper-attenuation artifacts on the >>>> borders of the result. To avoid these artifacts, reconstruct a larger >>>> volume (--dimension 256) should be fine. *Note that you will have to >>>> resize your motion mask as well, as 3D the motion mask is expected to have >>>> the same size, spacing and origin as the first 3 dimensions of the 4D >>>> output. * >>>> >>>> I guess I should take some time to fix that, and allow any motion mask, >>>> but until I do, you can resize your motion mask using the CLITK tools ( >>>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>>> >>>> Cyril >>>> >>>> >>>> >>>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>>> >>>> Hi Cyril, >>>> >>>> Works like a charm, thanks! I tried it on some other datasets and it >>>> seems to be working. I need to increase the resolution and play around with >>>> the parameters now. >>>> >>>> I haven't had time to test it too much, but I do get an error when >>>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>>> haven't tried it with just cpu reconstruction yet. >>>> >>>> i.e.) >>>> --dimension 160 --spacing 2 -> works >>>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>>> AverageOutOfROIImageFilter: information of ROI image does not match input >>>> image" >>>> >>>> I'll be able to test some other things later and list more details. >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> >>>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>>> wrote: >>>> >>>>> Hi Joel, >>>>> >>>>> I have fixed the wiki example (command line parameters AND data). Can >>>>> you restart it from scratch and let me know if you still have problems ? >>>>> >>>>> Roughly, the problems were the following: >>>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>>> coordinates >>>>> - the regularization parameters (gamma space and gamma time) were way >>>>> too high. The regularization with a high gamma-time caused frames to be >>>>> identical, while it should only discourage variations >>>>> >>>>> I hope it works, now. If it doesn't work for you, please keep asking >>>>> Cyril >>>>> >>>>> >>>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>>> >>>>> Hi Joel, >>>>> >>>>> I have just tried to reproduce the wiki example, and indeed, there are >>>>> several mistakes in it. I am working on correcting them. I'll keep you >>>>> posted. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>>> example. The 5 frames should show some differences pertaining to patient >>>>> motion but the ones that I'm producing are identical, so no motion is >>>>> visible. >>>>> >>>>> Has anyone been able to follow the example and the provided dataset to >>>>> create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 WEICHENG.SHEN at leidos.com Fri Oct 2 22:11:05 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Sat, 3 Oct 2015 02:11:05 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977222@EMP-EXMR104.corp.leidos.com> Hi Simon, Yes, if I run the CMake at the root of RTK, the example builds successfully. Thanks you very much! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 11:24 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng > wrote: Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: 15587 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 15591 bytes Desc: image002.png URL: From simon.rit at creatis.insa-lyon.fr Mon Oct 5 01:45:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 5 Oct 2015 07:45:06 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Oct 5 13:53:11 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 5 Oct 2015 13:53:11 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error1_using_ITK_FFT.png Type: image/png Size: 17214 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error in code.png Type: image/png Size: 21974 bytes Desc: not available URL: From cyril.mory at uclouvain.be Tue Oct 6 08:08:35 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Tue, 06 Oct 2015 14:08:35 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: <5613B9C3.4070309@uclouvain.be> Hi Joel, I have just pushed a fix for this issue: in the 4DROOSTER filter, I have added a resample filter between the ROI input and the AverageOutOfROIImageFilter. On my side, it runs fine. Let me know if it fixes the issue on your side. Thanks for pointing this out, Cyril On 10/02/2015 06:31 PM, Joel Beaudry wrote: > Hi Simon and Cyril, > > @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) > and then use itkSnap to create a mask from that 3D image. I then use > that mask as the input for ROOSTER, to which I again use the same > spacing/dimensions. For some values it seems to work and other it > doesn't. I'm wondering if itkSnap is truncating the > spacing/dimension/origins when I save my mask, and perhaps why > something like (160,2,-159) works but (511,0.88,-224.84). I'll take a > look at the metadata. > > I'll try resampling my masks and like you said that should probably > fix my issues. > > Thanks for the help, > Joel > > On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory > wrote: > > Indeed, resampling the mask if needed, to the correct size, > spacing, origin and direction, seems the simplest way to deal with > this issue. > But I would do it in the filter rather than in the application, so > that anything built on top of ROOSTER (i.e. incremental ROOSTER, > or the rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it > next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: >> Hi Joel, >> Can you explain how you created your mask? Looking at the code, >> it seems to me that if you create a 4D image with RTK, create a >> mask from this image with exactly the same meta info and pass it >> to ROOSTER, that should work in all cases. If I were you, I would >> compare the two mhd files (of the mask and the 4D image you used >> to create it) and verify that the meta info is exactly the same. >> For ROOSTER, I suggest to add an interpolation when the >> information is not inconsistent, e.g., in the main() function. I >> can do it if you agree Cyril. >> Simon >> >> On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values >> play nicer than others. Could it be an issue with floating >> point comparisons with the spacing and/or origins? It might >> explain why certain values seem to work (1.5) and others do >> not (0.88). I'll look at what values are being compared and >> get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with >> dimensions 512 (0.88 spacing) and re-creating a mask off >> of that. So the motion mask should have the same >> dimensions, spacing, and origin as the intended 4D image >> since I'm using 4D rooster with --dimension 512 --spacing >> 0.88. Perhaps I'm creating my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the >> mask I created for 160 (2), worked but not the case of >> 512 (0.88), and let you know what I find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the >> small paragraph after the cuda command line : >> >> Note that the reconstructed volume in this example >> does not fully contain the attenuating object, >> causing hyper-attenuation artifacts on the borders of >> the result. To avoid these artifacts, reconstruct a >> larger volume (--dimension 256) should be fine. *Note >> that you will have to resize your motion mask as >> well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 >> dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and >> allow any motion mask, but until I do, you can resize >> your motion mask using the CLITK tools >> (http://www.creatis.insa-lyon.fr/rio/vv) or any >> method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other >>> datasets and it seems to be working. I need to >>> increase the resolution and play around with the >>> parameters now. >>> >>> I haven't had time to test it too much, but I do get >>> an error when attempting to reconstruct with >>> different dimensions. I'm using Cuda, and haven't >>> tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> >>> throws "In AverageOutOfROIImageFilter: information >>> of ROI image does not match input image" >>> >>> I'll be able to test some other things later and >>> list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> >> > wrote: >>> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line >>> parameters AND data). Can you restart it from >>> scratch and let me know if you still have >>> problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not >>> aligned with the CBCT coordinates >>> - the regularization parameters (gamma space and >>> gamma time) were way too high. The >>> regularization with a high gamma-time caused >>> frames to be identical, while it should only >>> discourage variations >>> >>> I hope it works, now. If it doesn't work for >>> you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki >>>> example, and indeed, there are several mistakes >>>> in it. I am working on correcting them. I'll >>>> keep you posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the >>>>> 4DROOSTERReconstruction example. The 5 frames >>>>> should show some differences pertaining to >>>>> patient motion but the ones that I'm producing >>>>> are identical, so no motion is visible. >>>>> >>>>> Has anyone been able to follow the example and >>>>> the provided dataset to create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 Oct 6 09:11:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 6 Oct 2015 15:11:27 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park wrote: > Hi Simon, > > > > I?ve just tried to build it without FFTW library, as you have asked. > > > > I have encountered an error as shown in the attached pictures in running > ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, making > FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > > > Hope it helps. > > > > Yang > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Thanks a lot Yang for the detailed report, I'm sure that will be helpful > to many people. For my personal information, did you try to compile FFTW > from ITK as well? If it didn't work, could you let us know what was the > problem? > > Simon > > > > > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Tue Oct 6 10:49:55 2015 From: theday79 at gmail.com (Yang K Park) Date: Tue, 6 Oct 2015 10:49:55 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: <001c01d10046$44941080$cdbc3180$@gmail.com> Hi Simon, It seems that I misunderstood before. This time, I?ve followed your suggestion and encountered an error as follows: H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): fatal error C1083: Cannot open include file: 'fftw3.h': No such file or directory I?ve tested this with itk4.8.1, which is the most up-to-date release version. It seems that I need to specify the external fftw header file (fftw3.h), but the user interface for input does not appear in CMake unless I set ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. I hope this report can help itk developers resolve the issue. Thanks. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Tuesday, October 06, 2015 9:11 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com ] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park > Cc: Cyril Mory >; Matthew J. Riblett >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Tue Oct 6 11:00:16 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Tue, 6 Oct 2015 17:00:16 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <001c01d10046$44941080$cdbc3180$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> <001c01d10046$44941080$cdbc3180$@gmail.com> Message-ID: <5613E200.4050001@kitware.com> Yang, Simon, As I mentioned previously, you cannot build ITK with FFTW on Windows without setting ITK_USE_SYSTEM_FFTW=ON. You should get a warning in CMake specifying this. So the only solution to build ITK with FFTW on Windows is to use an externally compiled version of FFTW. Julien On 06/10/2015 16:49, Yang K Park wrote: > Hi Simon, > > It seems that I misunderstood before. This time, I?ve followed your > suggestion and encountered an error as follows: > > H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): > fatal error C1083: Cannot open include file: 'fftw3.h': No such file or > directory > > I?ve tested this with itk4.8.1, which is the most up-to-date release > version. > > It seems that I need to specify the external fftw header file (fftw3.h), > but the user interface for input does not appear in CMake unless I set > ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. > > I hope this report can help itk developers resolve the issue. > > Thanks. > > Yang > > *From:*simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of > *Simon Rit > *Sent:* Tuesday, October 06, 2015 9:11 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett > ; rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks Yang. I think I wasn't clear but what I meant was not to disable > FFTW but to compile and use FFTW in ITK by using > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=OFF > > instead of what I think you used > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=ON > > Julien Jomier from Kitware told me that both configurations worked for > him but your initial message suggests that the first did not work for > you. If you can confirm and explain your config (ITK version, compiler, > etc.). > > Simon > > PS: your test is useful anyway, I'll try to make the error message > clearer when FFTW is not used. > > On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: > > Hi Simon, > > I?ve just tried to build it without FFTW library, as you have asked. > > I have encountered an error as shown in the attached pictures in > running ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, > making FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > Hope it helps. > > Yang > > *From:*simon.rit at gmail.com > [mailto:simon.rit at gmail.com ] *On Behalf > Of *Simon Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > > *Cc:* Cyril Mory >; Matthew J. Riblett > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks a lot Yang for the detailed report, I'm sure that will be > helpful to many people. For my personal information, did you try to > compile FFTW from ITK as well? If it didn't work, could you let us > know what was the problem? > > Simon > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: > > Hi Cyril, > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally > succeeded. > > Following is the final version of my instruction. > > Thanks. > > Yang > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very > convenient! I really like it. Thanks for your hard works on this. > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > 1.Prepare fftw library files > > a.Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b.Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c.Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command > Prompt) > > d.Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e.Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > 2.Cmake for ITK > > a.Configure > > b.Turn on the following and reconfigure > > i.ITK_USE_SYSTEM_FFTW (mandatory to make the following options > appear) > > c.Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i.FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 > > ii.FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii.FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv.FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. > > d."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e.Reconfigure, Generate > > 3.Build ITK with Visual Studio > > a.In both Debug and Release > > 4.Cmake for RTK > > a.Default settings were used. > > b."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > 5.Build RTK using Visual Studio > > 6.Copy dll files to RTK bin folders > > a.Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b.To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7.Build RTK with Visual Studio > > *From:*Cyril Mory [mailto:cyril.mory at uclouvain.be > ] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park >; 'Matthew J. Riblett' > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam > Shroud > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just > have to activate it in the CMake options. On Windows, you cannot > do that. I do not have a clue why, but you cannot. You have to > install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled > DLLs from http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the > .lib files (that is absolutely necessary). You may have to run > the "lib.exe" program from the VS developer prompt instead of > the standard windows cmd.exe prompt. Specify you CPU > architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, > and you should be fine. I have successfully compiled this with > BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it > matters. > > If it works for you, then you might want to play around with the > other FFTW .lib files, and send on this mailing list a more > complete set of CMAKE options that works. I have tried some > other combinations without success, so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS > 2013) and I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with ?ITK + > FFTW? in windows system? > > I?m just trying to use *rtkextractshroudsignal* and it seems > to require FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors > as shown below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > I?m running on Ubuntu 14.04 LTS and used the distribution > library (FFTW 3.3.3). If you?re running on a Debian-based > linux system, you can also install the full development > library set using the following command: */sudo apt-get > install libfftw3-3 libfftw3-dev/*. Then just make sure that > these libraries are being used by rerunning CCMake. > > I?m not quite sure about the error being thrown in your > build, but perhaps one of the main developers would be able > to provide some more insight into the issue. > > Hope this helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to > compile ITK with those options on as you suggested. > > I?ve tried to use the up-to-date version of FFTW > (3.3.4), but it seems that it doesn?t work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved > external symbol __imp_fftw_execute referenced in > function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully > using in which system(Windows or Linux)? > > Thanks. > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the > inclusion of the Fast Fourier Transform components. > This requires compilation with the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that > way initially, and it took a little bit of time to > figure out. > > Hope that helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since > I?ve found my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data > from Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success > since my initial posting ? in fact I?m currently > working on a new method for accomplishing this task > in certain challenging cases. > > The most recent version of RTK provides an update to > the rtkextractshroudsignal application which > provides a phase signal output when called using the > ?-p? flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o > raw_signal.txt -p phase_signal.txt --method > LINEAR_BETWEEN_MINIMA/* > > From what I?ve experienced, this generally provides > a good signal [0,1) characterizing the respiratory > phase using the default settings. Occasionally, > I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear > signal (by appending the *--unsharp ##* flag to the > command). On more challenging shroud images ? > notably, those with little detectable signal from > background ? additional contrast-enhancement by > pre-processing of the shroud has assisted in signal > extraction. > > I hope that helps ? and please let me know how it > works out for you. > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue > and it would be highly appreciated if you can > share with me your updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical > School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:* Rtk-users > [mailto:rtk-users-bounces at public.kitware.com] > *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > > > *Cc:* rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal > data from Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab > script, but I've had good success with using a > Hilbert function in python (scipy). I'm sure > that Matlab has an equivalent function, and > maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. > Riblett > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a > straightforward method of going from the > results of the rtkamsterdamshroud and > rtkextractshroudsignal applications to a > [0,1) phase signal for performing > motion-compensated reconstruction. I?ve > been following along with the MC-CBCT > Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is > used to process the should signal prior to > feeding it back into the reconstruction > application, but there is no mention of how > this is accomplished. I?m trying to > implement this into an automated workflow > and I?d love to know how this was accomplished. > > Thanks! > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > > MCV Office Phone: +1.804.628.4858 > > > > _______________________________________________ > 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 > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From bottiger at gmail.com Mon Oct 12 05:42:20 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 11:42:20 +0200 Subject: [Rtk-users] Reconstruction problems Message-ID: Hi there I hope someone can help me me get started with RTK. First of all I should mention that I have compiled RTK on Windows 7 using Visual Studio 2013. Everything seems to compile and run just fine. Secondly: I tried to reproduce this example: http://wiki.openrtk.org/index.php/RTK/Scripts/FDK This was somewhat successful - I think. I could generate some projections, and reconstruct them. However, it just looks like an egg and not like a Shepp Logan phantom. See attachment. However, I'm unsure if this is expected or not. I took some homemade projections (of a small cylinder) and converted them into a MHA file (using rtkprojections.exe). The file looks correct in ImageJ. The dimensions are 370 pixels * 195 pixels * 361 projections You can get the file here: https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 The problem is that the reconstruction is wrong (see cylinder_recon). It looks like the dimensions are not read correctly, but I am unsure how I fix that? The rtkfdk.exe has a single --dimension parameter, but I am unsure which dimension that is suppose to be, but neither 195, 370 or any other value I could think of works for me. I hope someone can help me in the right direction. best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: SheppLogan.PNG Type: image/png Size: 150153 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cylinder_recon.PNG Type: image/png Size: 128472 bytes Desc: not available URL: From ghostcz at hotmail.com Mon Oct 12 05:54:44 2015 From: ghostcz at hotmail.com (louie L) Date: Mon, 12 Oct 2015 11:54:44 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Hi, You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? Cheers, Louie Sent from my iOS > On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 05:59:38 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 11:59:38 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: References: Message-ID: <561B848A.9090406@uclouvain.be> Hi Arvid, Well, you're on the right track :-) Your Shepp Logan reconstruction looks fine, I guess it is just a visualization problem: you can use vv http://www.creatis.insa-lyon.fr/rio/vv to open it and you will be able to change the "window" and "level" settings in visualization. Regarding the cylinder, can you send your geometry file too ? Regards Cyril Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Mon Oct 12 06:35:27 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:35:27 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: <561B848A.9090406@uclouvain.be> References: <561B848A.9090406@uclouvain.be> Message-ID: Hey Cyril I just wrote another e-mail about how I generated the geometry file (it's just simulated). But just in case I'll attach it here: best Arvid On Mon, Oct 12, 2015 at 11:59 AM, Cyril Mory wrote: > Hi Arvid, > > Well, you're on the right track :-) > Your Shepp Logan reconstruction looks fine, I guess it is just a > visualization problem: you can use vv > http://www.creatis.insa-lyon.fr/rio/vv > to open it and you will be able to change the "window" and "level" > settings in visualization. > > Regarding the cylinder, can you send your geometry file too ? > > Regards > Cyril > > Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example:http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here:https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > > > ------------------------------ > [image: Avast logo] > > L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le > logiciel antivirus Avast. > www.avast.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry360.xml Type: text/xml Size: 134495 bytes Desc: not available URL: From bottiger at gmail.com Mon Oct 12 06:36:03 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:36:03 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Sure. I'll admit I have yet to understand the specifics of the geometry file. Currently I just used a simulated one because that was what the SheppLogan example used, and the input projections looked similar. Here is a complete list of the commands I executed: rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 I did not do anything to the contrast and that is most likely the issue. I downloaded and installed vv and I can see some (very unclear) features inside the SheppLogan reconstruction - so that's nice. However, currently I'm mostly interested in getting the geometry right :) best On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: > Hi, > > You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? > > Cheers, > Louie > > Sent from my iOS > >> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >> >> Hi there >> >> I hope someone can help me me get started with RTK. >> >> First of all I should mention that I have compiled RTK on Windows 7 >> using Visual Studio 2013. Everything seems to compile and run just >> fine. >> >> Secondly: I tried to reproduce this example: >> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >> >> This was somewhat successful - I think. I could generate some >> projections, and reconstruct them. However, it just looks like an egg >> and not like a Shepp Logan phantom. See attachment. >> >> However, I'm unsure if this is expected or not. I took some homemade >> projections (of a small cylinder) and converted them into a MHA file >> (using rtkprojections.exe). The file looks correct in ImageJ. The >> dimensions are 370 pixels * 195 pixels * 361 projections >> >> You can get the file here: >> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >> >> The problem is that the reconstruction is wrong (see cylinder_recon). >> It looks like the dimensions are not read correctly, but I am unsure >> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >> I am unsure which dimension that is suppose to be, but neither 195, >> 370 or any other value I could think of works for me. >> >> I hope someone can help me in the right direction. >> >> best >> >> Arvid >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 15:52:10 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 21:52:10 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: <561C0F6A.6080602@uclouvain.be> Hi Arvid, Unfortunately, you cannot do that. You have to obtain the exact geometry of this particular acquisition from the cone beam device you used. If you need help to convert it to the RTK format, well, that's something you can ask for on this mailing list. Can you get the geometry data ? Regards, Cyril Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : > Sure. > > I'll admit I have yet to understand the specifics of the geometry > file. Currently I just used a simulated one because that was what the > SheppLogan example used, and the input projections looked similar. > > Here is a complete list of the commands I executed: > > rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml > > rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ > --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif > > rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o > c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g > c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 > > I did not do anything to the contrast and that is most likely the > issue. I downloaded and installed vv and I can see some (very unclear) > features inside the SheppLogan reconstruction - so that's nice. > However, currently I'm mostly interested in getting the geometry right :) > > best > > On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >> Hi, >> >> You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? >> >> Cheers, >> Louie >> >> Sent from my iOS >> >>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >>> >>> Hi there >>> >>> I hope someone can help me me get started with RTK. >>> >>> First of all I should mention that I have compiled RTK on Windows 7 >>> using Visual Studio 2013. Everything seems to compile and run just >>> fine. >>> >>> Secondly: I tried to reproduce this example: >>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>> >>> This was somewhat successful - I think. I could generate some >>> projections, and reconstruct them. However, it just looks like an egg >>> and not like a Shepp Logan phantom. See attachment. >>> >>> However, I'm unsure if this is expected or not. I took some homemade >>> projections (of a small cylinder) and converted them into a MHA file >>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>> dimensions are 370 pixels * 195 pixels * 361 projections >>> >>> You can get the file here: >>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>> >>> The problem is that the reconstruction is wrong (see cylinder_recon). >>> It looks like the dimensions are not read correctly, but I am unsure >>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>> I am unsure which dimension that is suppose to be, but neither 195, >>> 370 or any other value I could think of works for me. >>> >>> I hope someone can help me in the right direction. >>> >>> best >>> >>> Arvid >>> >>> >>> _______________________________________________ >>> 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 --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From cyril.mory at uclouvain.be Mon Oct 12 16:36:24 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 22:36:24 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: <561C1984.9030509@uclouvain.be> References: <561C1984.9030509@uclouvain.be> Message-ID: <561C19C8.5050304@uclouvain.be> Arvid, You can find a description of the geometry here : http://www.creatis.insa-lyon.fr/~srit/geometry.pdf In rtk/applications, several applications are simple converters from the cone beam manufacturer's raw geometry format to RTK geometry format, so you can also have a look at the code of these apps. If you know that you have an almost parallel beam, you can indeed try to use a dummy geometry file, but be careful: rtksimulatedgeometry generates a cone beam geometry, with large fan and cone angles if you leave the default parameters. You can adjust the 'sdd' and 'sid' options to simulate a very distant source, making rays almost parallel to each other (be careful with numerical precision, though). Hope it helps, Cyril Le 12/10/2015 21:59, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hello Cyril > > Thank you for getting back to me. I do have the geometry (albeit not > right here next to me). > However, my problem was that when I looked in the geometry file, I > didn't find it obvious how to define declare it - is it documented > somewhere? > > That said - the measurements I played around with is measured with an > almost parallel beam. I hoped I could reconstruct it (with minor > artifacts) using a dummy geometry file. > > best > > Arvid > > On Mon, Oct 12, 2015 at 9:52 PM, Cyril Mory wrote: >> Hi Arvid, >> >> Unfortunately, you cannot do that. You have to obtain the exact geometry of >> this particular acquisition from the cone beam device you used. >> If you need help to convert it to the RTK format, well, that's something you >> can ask for on this mailing list. >> Can you get the geometry data ? >> >> Regards, >> Cyril >> >> >> Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : >>> Sure. >>> >>> I'll admit I have yet to understand the specifics of the geometry >>> file. Currently I just used a simulated one because that was what the >>> SheppLogan example used, and the input projections looked similar. >>> >>> Here is a complete list of the commands I executed: >>> >>> rtksimulatedgeometry.exe -n 361 -o >>> c:\Users\aplb\Work\out_dir\geometry360.xml >>> >>> rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ >>> --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif >>> >>> rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o >>> c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g >>> c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 >>> >>> I did not do anything to the contrast and that is most likely the >>> issue. I downloaded and installed vv and I can see some (very unclear) >>> features inside the SheppLogan reconstruction - so that's nice. >>> However, currently I'm mostly interested in getting the geometry right :) >>> >>> best >>> >>> On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >>>> Hi, >>>> >>>> You can specify the size in each dimension. Can you post the arguments >>>> you used for the projections and reconstruction? Did you try to adjust the >>>> contrast of the output? >>>> >>>> Cheers, >>>> Louie >>>> >>>> Sent from my iOS >>>> >>>>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger >>>>> wrote: >>>>> >>>>> Hi there >>>>> >>>>> I hope someone can help me me get started with RTK. >>>>> >>>>> First of all I should mention that I have compiled RTK on Windows 7 >>>>> using Visual Studio 2013. Everything seems to compile and run just >>>>> fine. >>>>> >>>>> Secondly: I tried to reproduce this example: >>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>>>> >>>>> This was somewhat successful - I think. I could generate some >>>>> projections, and reconstruct them. However, it just looks like an egg >>>>> and not like a Shepp Logan phantom. See attachment. >>>>> >>>>> However, I'm unsure if this is expected or not. I took some homemade >>>>> projections (of a small cylinder) and converted them into a MHA file >>>>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>>>> dimensions are 370 pixels * 195 pixels * 361 projections >>>>> >>>>> You can get the file here: >>>>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>>>> >>>>> The problem is that the reconstruction is wrong (see cylinder_recon). >>>>> It looks like the dimensions are not read correctly, but I am unsure >>>>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>>>> I am unsure which dimension that is suppose to be, but neither 195, >>>>> 370 or any other value I could think of works for me. >>>>> >>>>> I hope someone can help me in the right direction. >>>>> >>>>> best >>>>> >>>>> Arvid >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >> >> >> --- >> L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le >> logiciel antivirus Avast. >> https://www.avast.com/antivirus >> --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From gnthibault at gmail.com Wed Oct 14 05:38:46 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Wed, 14 Oct 2015 11:38:46 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter Message-ID: Dear all, I recently had troubles while trying to rewrite my code, linked with libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite well, to using fdk reconstruction method. My first question: is there a general way to enable maximum debug log level at runtime in rtk ? My second question, is more specific: is it normal that I see such error message coming from itk when using FDKConeBeamReconstructionFilter : ExceptionObject caught with fdk->Update() in file [...] itk::ExceptionObject (0x7f377c020cb0) Location: "unknown" File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx Line: 416 Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred during SingleMethodExecute /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): Cannot compute FFT of image with size [2048, 1024, 11]. VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose size in each dimension has a prime factorization consisting of only 2s, 3s, or 5s. I suppose that this error arise while performing ramp filtering, but I see no relation between FFT configuration stated in the error log ( [2048, 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 projections. I also tried with 200 projection and I had the same problem, but with [2048, 1024, 34] Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to the total number of projection in my dataset every time. The revision I am currently using: commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 Merge: 578cf89 09d820c Thank you in advance for your help. Regards Thibault Notargiacomo -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 14 12:58:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 14 Oct 2015 18:58:06 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Hi Thibault, No, there is not really a log system that would allow you debugging at run time. You can compile a debug version that would enable a lot of messages related to the pipeline. For this, I think you need to use NDEBUG at compilation (it's an ITK mechanism that I never use). No, it's not normal that you see an error message. There are two things: - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it only handles power of 2/3/5 dimensions and it's slow. I always advise people to use FFTW by turning on ITK_USE_FFTW options during ITK's compilation. - I don't fully understand why vnl doesn't work either. I understand the first two dimensions, for vnl (which I strongly suggest to not use), I pad to the next power of 2 so 780 * 2 (for zero padding) -> 2048 780 -> 1024 but then, if you use 64 projections, why 11? Are you sure the second input image to FDKConeBeamReconstructionImageFilter has the dimension you want? I would try to connect input 2 to an itk::ImageFileWriter and check what are the dimensions of this image. If you're absolutely sure, then I'll try to reproduce and fix the issue. Simon On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < gnthibault at gmail.com> wrote: > Dear all, > > I recently had troubles while trying to rewrite my code, linked with > libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite > well, to using fdk reconstruction method. > > My first question: is there a general way to enable maximum debug log > level at runtime in rtk ? > > My second question, is more specific: is it normal that I see such error > message coming from itk when using FDKConeBeamReconstructionFilter : > > ExceptionObject caught with fdk->Update() in file [...] > > itk::ExceptionObject (0x7f377c020cb0) > Location: "unknown" > File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx > Line: 416 > Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred > during SingleMethodExecute > > /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: > itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): > Cannot compute FFT of image with size [2048, 1024, 11]. > VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose > size in each dimension has a prime factorization consisting of only 2s, 3s, > or 5s. > > I suppose that this error arise while performing ramp filtering, but I see > no relation between FFT configuration stated in the error log ( [2048, > 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 > projections. > > I also tried with 200 projection and I had the same problem, but with > [2048, 1024, 34] > > Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to > the total number of projection in my dataset every time. > > The revision I am currently using: > commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 > Merge: 578cf89 09d820c > > > Thank you in advance for your help. > > Regards > > Thibault Notargiacomo > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scouser27 at gmail.com Wed Oct 14 16:27:48 2015 From: scouser27 at gmail.com (sco user) Date: Wed, 14 Oct 2015 21:27:48 +0100 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi I'm a new user to RTK. I've been able to perform reconstructions of the Catphan and my own copies of Varian CBCT images with some success. I enabled the CUDA flags when making RTK so as to take advantage of the capabilities of my GPU. When I use --hardware="cuda" with the rtkfdk application, I have found that I must specify the lowmem option in order to get the reconstruction to run successfully. If I don't use lowmem, I get the following error: #### Reconstructing and writing... /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ unknown : Cuda Error : out of memory ExceptionObject caught with writer->Update() in file /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 itk::ExceptionObject (0x18e3460) Location: "unknown" File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h Line: 55 Description: Cuda Error : out of memory #### I take from this that I'm out of memory on the GPU. Is that correct? The GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be in order to get a typical Varian reconstruction to run without the lowmem option. On a side note, I know that the cuda option is working because it's a lot quicker than hardware="cpu", despite only having 96 cuda cores. Another question I'd like to ask is if anyone can shed some light on useful values for I-zero, wpc, scatter etc. With thanks in advance, Dave. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Oct 15 03:09:05 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 15 Oct 2015 09:09:05 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Without the lowmem flag all projection images may be loaded into graphics memory at once causing an out-of-memory issues. You can also check this thread: http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html Regards, Chao 2015-10-14 22:27 GMT+02:00 sco user : > Hi > > I'm a new user to RTK. > I've been able to perform reconstructions of the Catphan and my own copies > of Varian CBCT images with some success. I enabled the CUDA flags when > making RTK so as to take advantage of the capabilities of my GPU. > > When I use --hardware="cuda" with the rtkfdk application, I have found > that I must specify the lowmem option in order to get the reconstruction to > run successfully. If I don't use lowmem, I get the following error: > > #### > Reconstructing and writing... > /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ > unknown : Cuda Error : out of memory > > ExceptionObject caught with writer->Update() in file > /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 > > itk::ExceptionObject (0x18e3460) > Location: "unknown" > File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h > Line: 55 > Description: Cuda Error : out of memory > #### > > I take from this that I'm out of memory on the GPU. Is that correct? The > GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be > in order to get a typical Varian reconstruction to run without the lowmem > option. > > On a side note, I know that the cuda option is working because it's a lot > quicker than hardware="cpu", despite only having 96 cuda cores. > > > Another question I'd like to ask is if anyone can shed some light on > useful values for I-zero, wpc, scatter etc. > > With thanks in advance, > Dave. > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Thu Oct 15 03:52:25 2015 From: itkhelpacc at gmail.com (vishal k) Date: Thu, 15 Oct 2015 13:22:25 +0530 Subject: [Rtk-users] Need some help with Projection of 3D CT data Message-ID: hi, Im working on a CT data set using ITK.. Im trying to come up with a registration algorithm for fluoroscopy image obtained from C-Arm taken at some angle wrt to the patient and the projection of CT data taken at the same angle as that of the C-arm.. i need to change the angles of projection and the focal length of the source from time to time for my study.. I was wondering if i could do that using RTK? If yes, could you tell me where I find information that is relevant to my problem..Thank you Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 15 05:11:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:11:00 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Regarding the parameters (I-zero, wpc, scatter etc), we still need to create wiki pages to describe this (as agreed on during the Jul 31 meeting ). In the meantime, you'll find some info in each filter documentation. You can go to the projection pre-processing filter , look at the (complex) clickable graph and try to navigate in it. For example, I0 is for the LUTbasedVariableI0RawToAttenuationImageFilter and (therefore), inapplicable to Varian data as is. I'll keep the mailing list posted when we add info to the wiki. Good luck, Simon On Thu, Oct 15, 2015 at 9:09 AM, Chao Wu wrote: > Hi Dave, > > Without the lowmem flag all projection images may be loaded into graphics > memory at once causing an out-of-memory issues. > You can also check this thread: > http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html > > Regards, > Chao > > 2015-10-14 22:27 GMT+02:00 sco user : > >> Hi >> >> I'm a new user to RTK. >> I've been able to perform reconstructions of the Catphan and my own >> copies of Varian CBCT images with some success. I enabled the CUDA flags >> when making RTK so as to take advantage of the capabilities of my GPU. >> >> When I use --hardware="cuda" with the rtkfdk application, I have found >> that I must specify the lowmem option in order to get the reconstruction to >> run successfully. If I don't use lowmem, I get the following error: >> >> #### >> Reconstructing and writing... >> /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ >> unknown : Cuda Error : out of memory >> >> ExceptionObject caught with writer->Update() in file >> /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 >> >> itk::ExceptionObject (0x18e3460) >> Location: "unknown" >> File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h >> Line: 55 >> Description: Cuda Error : out of memory >> #### >> >> I take from this that I'm out of memory on the GPU. Is that correct? The >> GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be >> in order to get a typical Varian reconstruction to run without the lowmem >> option. >> >> On a side note, I know that the cuda option is working because it's a lot >> quicker than hardware="cpu", despite only having 96 cuda cores. >> >> >> Another question I'd like to ask is if anyone can shed some light on >> useful values for I-zero, wpc, scatter etc. >> >> With thanks in advance, >> Dave. >> >> >> _______________________________________________ >> 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 Thu Oct 15 05:33:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:33:42 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Yes, RTK can certainly do things like that. Start with a simple geometry following the example Forward projection of the wiki and maybe come back to us with more precise questions? Good luck, Simon On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: > hi, > Im working on a CT data set using ITK.. Im trying to come up with a > registration algorithm for fluoroscopy image obtained from C-Arm taken at > some angle wrt to the patient and the projection of CT data taken at the > same angle as that of the C-arm.. i need to change the angles of projection > and the focal length of the source from time to time for my study.. I was > wondering if i could do that using RTK? If yes, could you tell me where I > find information that is relevant to my problem..Thank you > Regards > > _______________________________________________ > Rtk-users mailing 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 Oct 15 05:49:16 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:49:16 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Hi, Please stick to the mailing list. That's exactly what I understood and my previous answer is still valid. Simon On Thu, Oct 15, 2015 at 11:47 AM, vishal k wrote: > hi Simon, > Thanks for ur advice..sorry i couldn't explain it properly...here my > problem explained in detail.. I have to register 3D ct data with > Fluoroscopy image obtained during surgery.. the problem is that they use > different co-ordinate systems.. I thought since i can obtained the C arm > position using the DICOM tags (source to patient distance etc), i could use > these positions values to obtain forward projection of the CT data.. after > doing this I feel my registering the forward projection image and the > actual fluoroscopy image(obtained during the surgery) would be easier...Please > advice me if there is any better way to deal this problem.. > Regards > Vishal > > On Thu, Oct 15, 2015 at 3:03 PM, Simon Rit > wrote: > >> Yes, RTK can certainly do things like that. Start with a simple geometry >> following the example Forward projection >> of the >> wiki and maybe come back to us with more >> precise questions? >> Good luck, >> Simon >> >> On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: >> >>> hi, >>> Im working on a CT data set using ITK.. Im trying to come up with a >>> registration algorithm for fluoroscopy image obtained from C-Arm taken at >>> some angle wrt to the patient and the projection of CT data taken at the >>> same angle as that of the C-arm.. i need to change the angles of projection >>> and the focal length of the source from time to time for my study.. I was >>> wondering if i could do that using RTK? If yes, could you tell me where I >>> find information that is relevant to my problem..Thank you >>> Regards >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnthibault at gmail.com Thu Oct 15 07:55:17 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Thu, 15 Oct 2015 13:55:17 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Thank you very much Simon for this advice, I should have read more carefully the recent posts about FFTWF / FFTWD. Now that Itk has been rebuilt using these flags, I no longer experience the previous problem. Unfortunately, when reconstructing with the CPU version of FDK, it seems that, although Ramp filtering and backprojection now do work very well, I still have issues with the weighting filter of FDK. As I am not familiar with analytic reconstruction methods, I don't know if the geometric parameters that are generated by the import method of Reg23ProjectionGeometry are consistant with the high variability of the gain factor applied to my projection by FDKWeightProjectionFilter: Just a short example: When using the following geometric parameters: SrcToCenter -1045.84 SrcToDet -1261.02 srcOffX 6.56918 srcOffY 6.56918 ProjOffX -151.44 ProjOffY -151.44 => FDKWeighting filter outputs an image that has a mean of -1.518 with a standard deviation of 2.056 with minimum value of -6.130 and maximum value of 1.871 On a frame where the source offset seems to be a little bit lower, I have the following gemetric parameters: SrcToCenter -1042.66 SrcToDet -1257.4 srcOffX 1.25469 srcOffY 1.25469 ProjOffX -150.321 ProjOffY -150.321 => FDKWeighting filter outputs an image that has a mean of -4.279E-4 with a standard deviation of 5.786E-4 with minimum value of -0.005 and maximum value of 5.268E-4 For comparison, our attenuation images in input of FDK have a mean of 0.8 with a standard deviation of 1.09 with minimum value of -1 and maximum value of 3.262. Here the negative values of attenuation arise from a problem while approximating the I0 in our images, although we should work on that problem, it was not that critical in SART reconstruction. I am surprised by such an important difference in gain applied to projection, given that, when disabling manually this weighting filter in RTK code, RampFiltering and BackProjection alone provided visually good reconstruction results. If you have any idea of what could have gone wrong in the process of importing geometry and/or applying weighting filter, I would be glad to hear it. Thank you in advance. Kind regards Thibault Notargiacomo 2015-10-14 18:58 GMT+02:00 Simon Rit : > Hi Thibault, > No, there is not really a log system that would allow you debugging at run > time. You can compile a debug version that would enable a lot of messages > related to the pipeline. For this, I think you need to use NDEBUG at > compilation (it's an ITK mechanism that I never use). > No, it's not normal that you see an error message. There are two things: > - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it > only handles power of 2/3/5 dimensions and it's slow. I always advise > people to use FFTW by turning on ITK_USE_FFTW options during ITK's > compilation. > - I don't fully understand why vnl doesn't work either. I understand the > first two dimensions, for vnl (which I strongly suggest to not use), I pad > to the next power of 2 so > 780 * 2 (for zero padding) -> 2048 > 780 -> 1024 > but then, if you use 64 projections, why 11? Are you sure the second input > image to FDKConeBeamReconstructionImageFilter has the dimension you want? I > would try to connect input 2 to an itk::ImageFileWriter and check what are > the dimensions of this image. If you're absolutely sure, then I'll try to > reproduce and fix the issue. > Simon > > On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < > gnthibault at gmail.com> wrote: > >> Dear all, >> >> I recently had troubles while trying to rewrite my code, linked with >> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >> well, to using fdk reconstruction method. >> >> My first question: is there a general way to enable maximum debug log >> level at runtime in rtk ? >> >> My second question, is more specific: is it normal that I see such error >> message coming from itk when using FDKConeBeamReconstructionFilter : >> >> ExceptionObject caught with fdk->Update() in file [...] >> >> itk::ExceptionObject (0x7f377c020cb0) >> Location: "unknown" >> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >> Line: 416 >> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >> during SingleMethodExecute >> >> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >> Cannot compute FFT of image with size [2048, 1024, 11]. >> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >> size in each dimension has a prime factorization consisting of only 2s, 3s, >> or 5s. >> >> I suppose that this error arise while performing ramp filtering, but I >> see no relation between FFT configuration stated in the error log ( [2048, >> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >> projections. >> >> I also tried with 200 projection and I had the same problem, but with >> [2048, 1024, 34] >> >> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >> to the total number of projection in my dataset every time. >> >> The revision I am currently using: >> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >> Merge: 578cf89 09d820c >> >> >> Thank you in advance for your help. >> >> Regards >> >> Thibault Notargiacomo >> >> _______________________________________________ >> Rtk-users mailing 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 Oct 15 10:50:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 16:50:30 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Interesting... I never used a geometry with negative sdd and sid but that's the issue here in my opinion. I did a quick test with positive and negative sdd/sid and that does not work for me either. Can you make them positive somehow? BTW, do you still use a modified version of the reg23 and can you share it? Thanks, Simon PS: the script I used for the test: rtksimulatedgeometry \ -o g \ -n 360 \ --sdd 1500 \ --sid 1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o pos.mha -g g rtksimulatedgeometry \ -o g \ -n 360 \ --sdd -1500 \ --sid -1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o neg.mha -g g On Thu, Oct 15, 2015 at 1:55 PM, Notargiacomo Thibault wrote: > Thank you very much Simon for this advice, I should have read more > carefully the recent posts about FFTWF / FFTWD. > > Now that Itk has been rebuilt using these flags, I no longer experience > the previous problem. > Unfortunately, when reconstructing with the CPU version of FDK, it seems > that, although Ramp filtering and backprojection now do work very well, I > still have issues with the weighting filter of FDK. > > As I am not familiar with analytic reconstruction methods, I don't know if > the geometric parameters that are generated by the import method of > Reg23ProjectionGeometry are consistant with the high variability of the > gain factor applied to my projection by FDKWeightProjectionFilter: > > Just a short example: > When using the following geometric parameters: > > SrcToCenter -1045.84 > SrcToDet -1261.02 > srcOffX 6.56918 > srcOffY 6.56918 > ProjOffX -151.44 > ProjOffY -151.44 > > => FDKWeighting filter outputs an image that has a mean of -1.518 with a > standard deviation of 2.056 with minimum value of -6.130 and maximum > value of 1.871 > > > On a frame where the source offset seems to be a little bit lower, I have > the following gemetric parameters: > > SrcToCenter -1042.66 > SrcToDet -1257.4 > srcOffX 1.25469 > srcOffY 1.25469 > ProjOffX -150.321 > ProjOffY -150.321 > > => FDKWeighting filter outputs an image that has a mean of -4.279E-4 > with a standard deviation of 5.786E-4 with minimum value of -0.005 and > maximum value of 5.268E-4 > > For comparison, our attenuation images in input of FDK have a mean of 0.8 > with a standard deviation of 1.09 with minimum value of -1 and maximum > value of 3.262. > > Here the negative values of attenuation arise from a problem while > approximating the I0 in our images, although we should work on that > problem, it was not that critical in SART reconstruction. > > I am surprised by such an important difference in gain applied to > projection, given that, when disabling manually this weighting filter in > RTK code, RampFiltering and BackProjection alone provided visually good > reconstruction results. > > If you have any idea of what could have gone wrong in the process of > importing geometry and/or applying weighting filter, I would be glad to > hear it. > > Thank you in advance. > > Kind regards > > Thibault Notargiacomo > > > > > > > > > 2015-10-14 18:58 GMT+02:00 Simon Rit : > >> Hi Thibault, >> No, there is not really a log system that would allow you debugging at >> run time. You can compile a debug version that would enable a lot of >> messages related to the pipeline. For this, I think you need to use NDEBUG >> at compilation (it's an ITK mechanism that I never use). >> No, it's not normal that you see an error message. There are two things: >> - the FFT of itk (compiled by default, based on vnl) is really bad IMO: >> it only handles power of 2/3/5 dimensions and it's slow. I always advise >> people to use FFTW by turning on ITK_USE_FFTW options during ITK's >> compilation. >> - I don't fully understand why vnl doesn't work either. I understand the >> first two dimensions, for vnl (which I strongly suggest to not use), I pad >> to the next power of 2 so >> 780 * 2 (for zero padding) -> 2048 >> 780 -> 1024 >> but then, if you use 64 projections, why 11? Are you sure the second >> input image to FDKConeBeamReconstructionImageFilter has the dimension you >> want? I would try to connect input 2 to an itk::ImageFileWriter and check >> what are the dimensions of this image. If you're absolutely sure, then I'll >> try to reproduce and fix the issue. >> Simon >> >> On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < >> gnthibault at gmail.com> wrote: >> >>> Dear all, >>> >>> I recently had troubles while trying to rewrite my code, linked with >>> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >>> well, to using fdk reconstruction method. >>> >>> My first question: is there a general way to enable maximum debug log >>> level at runtime in rtk ? >>> >>> My second question, is more specific: is it normal that I see such error >>> message coming from itk when using FDKConeBeamReconstructionFilter : >>> >>> ExceptionObject caught with fdk->Update() in file [...] >>> >>> itk::ExceptionObject (0x7f377c020cb0) >>> Location: "unknown" >>> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >>> Line: 416 >>> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >>> during SingleMethodExecute >>> >>> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >>> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >>> Cannot compute FFT of image with size [2048, 1024, 11]. >>> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >>> size in each dimension has a prime factorization consisting of only 2s, 3s, >>> or 5s. >>> >>> I suppose that this error arise while performing ramp filtering, but I >>> see no relation between FFT configuration stated in the error log ( [2048, >>> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >>> projections. >>> >>> I also tried with 200 projection and I had the same problem, but with >>> [2048, 1024, 34] >>> >>> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >>> to the total number of projection in my dataset every time. >>> >>> The revision I am currently using: >>> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >>> Merge: 578cf89 09d820c >>> >>> >>> Thank you in advance for your help. >>> >>> Regards >>> >>> Thibault Notargiacomo >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 03:12:36 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 09:12:36 +0200 Subject: [Rtk-users] Question about the geometry Message-ID: Dear all. Hello again. I writing to you again because I need some help to understand how to declare the geometry of the system. Cyril redirected me towards this document ( http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a lot, but unfortunately it has not been enough to make me reconstruct a tomogram. I have attached a drawing of my setup (setup.jpg). The source-to-detector distance is around 1600 mm. I just rotate the sample instead of the source, and the sample-detector distance is 15 cm which makes the isocenter distance 1450. The field of view is around 2 cm. The aligned projections are located here: https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 and the raw tiffs are here: https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 I would say the input data looks as nice, but when reconstructing I'm still just getting noise: This is how I perform my "reconstruction" # 361 projections from 0 to 360 degrees. The source-detector distance is 1.6 m and the # sample-detector distance is 15 cm # I have tried with many variations of --ssd and --sid but I think they all look the same rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o c:\Work\out_dir\geometry_real.xml # make a mha file out of the tiff files rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output c:\Work\out_dir\cylinder-a.mha --regexp .tif # "Reconstruct" the data. rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 The result can be viewed in the recon_result.PNG attachment. The reconstrcution can be found here: https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 Can someone please help me what I am doing wrong? best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: setup.jpg Type: image/jpeg Size: 29527 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: recon_result.PNG Type: image/png Size: 239196 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 06:09:04 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 12:09:04 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Is the origin and spacing of your projection data correct? What is your projection pixel size? Regards, Chao 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger : > Dear all. Hello again. > > I writing to you again because I need some help to understand how to > declare the geometry of the system. > > Cyril redirected me towards this document ( > http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > lot, but unfortunately it has not been enough to make me reconstruct a > tomogram. > > I have attached a drawing of my setup (setup.jpg). The > source-to-detector distance is around 1600 mm. I just rotate the > sample instead of the source, and the sample-detector distance is 15 > cm which makes the isocenter distance 1450. The field of view is > around 2 cm. > > The aligned projections are located here: > https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > and the raw tiffs are here: > https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > > I would say the input data looks as nice, but when reconstructing I'm > still just getting noise: > > This is how I perform my "reconstruction" > > # 361 projections from 0 to 360 degrees. The source-detector distance > is 1.6 m and the > # sample-detector distance is 15 cm > # I have tried with many variations of --ssd and --sid but I think > they all look the same > rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > c:\Work\out_dir\geometry_real.xml > > # make a mha file out of the tiff files > rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > c:\Work\out_dir\cylinder-a.mha --regexp .tif > > # "Reconstruct" the data. > rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha -g > c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > > The result can be viewed in the recon_result.PNG attachment. > The reconstrcution can be found here: > https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > > Can someone please help me what I am doing wrong? > > best > > Arvid > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 07:15:25 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 13:15:25 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao. Thank you for the reply. However, I'm not quite sure what you mean by origin and spacing. A pixel on the detector is ~200 microns, and the sample is magnified around 1.3 times. I do understand that having a correct geometry is important to get an output image with correct dimensions, but I do not understand it's so difficult for me to make a single successful reconstruction (possibly with a dummy geometry). best Arvid PS: Just to validate the data I'm testing on I installed Octave and created a sinogram I then ran through its iradon implementation. It seemed to work quite nicely (see attachments). On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > Hi Arvid, > > Is the origin and spacing of your projection data correct? What is your > projection pixel size? > > Regards, Chao > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > : >> >> Dear all. Hello again. >> >> I writing to you again because I need some help to understand how to >> declare the geometry of the system. >> >> Cyril redirected me towards this document ( >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> lot, but unfortunately it has not been enough to make me reconstruct a >> tomogram. >> >> I have attached a drawing of my setup (setup.jpg). The >> source-to-detector distance is around 1600 mm. I just rotate the >> sample instead of the source, and the sample-detector distance is 15 >> cm which makes the isocenter distance 1450. The field of view is >> around 2 cm. >> >> The aligned projections are located here: >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> and the raw tiffs are here: >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> I would say the input data looks as nice, but when reconstructing I'm >> still just getting noise: >> >> This is how I perform my "reconstruction" >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> is 1.6 m and the >> # sample-detector distance is 15 cm >> # I have tried with many variations of --ssd and --sid but I think >> they all look the same >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> c:\Work\out_dir\geometry_real.xml >> >> # make a mha file out of the tiff files >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> # "Reconstruct" the data. >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> The result can be viewed in the recon_result.PNG attachment. >> The reconstrcution can be found here: >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> Can someone please help me what I am doing wrong? >> >> best >> >> Arvid >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: Capture.JPG Type: image/jpeg Size: 58155 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 08:03:16 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 14:03:16 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Since you know how important a correct geometry is, you should understand why you need projection origin and spacing. CT geometry has more parameters than sid and sdd. How big the detector pixel size (spacing) and how the detector is places w.r.t. the central ray (origin) also play a role in the geometry. And in-plane/out-of-plane rotations etc. In your dataset the correct spacing and origin information is not stored correctly in the projection data, so the total geometry is wrong. I have tested your data with the following command line and it gives meaningful image. The newspacing and neworigin arguments force rtkfdk to accept spacing and origin information of projections from command line instead of from the data. Also I change the spacing of the volume from 2 to 0.2 because your object is small. rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 Apparently there is still some misalignment between this guessed geometry and the real geometry, which you need to figure out with your own hardware. Regards, Chao 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Hi Chao. > > Thank you for the reply. However, I'm not quite sure what you mean by > origin and spacing. > A pixel on the detector is ~200 microns, and the sample is magnified > around 1.3 times. > > I do understand that having a correct geometry is important to get an > output image with correct dimensions, but I do not understand it's so > difficult for me to make a single successful reconstruction (possibly > with a dummy geometry). > > best > > Arvid > > PS: Just to validate the data I'm testing on I installed Octave and > created a sinogram I then ran through its iradon implementation. It > seemed to work quite nicely (see attachments). > > On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > > Hi Arvid, > > > > Is the origin and spacing of your projection data correct? What is your > > projection pixel size? > > > > Regards, Chao > > > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Dear all. Hello again. > >> > >> I writing to you again because I need some help to understand how to > >> declare the geometry of the system. > >> > >> Cyril redirected me towards this document ( > >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> lot, but unfortunately it has not been enough to make me reconstruct a > >> tomogram. > >> > >> I have attached a drawing of my setup (setup.jpg). The > >> source-to-detector distance is around 1600 mm. I just rotate the > >> sample instead of the source, and the sample-detector distance is 15 > >> cm which makes the isocenter distance 1450. The field of view is > >> around 2 cm. > >> > >> The aligned projections are located here: > >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> and the raw tiffs are here: > >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> > >> I would say the input data looks as nice, but when reconstructing I'm > >> still just getting noise: > >> > >> This is how I perform my "reconstruction" > >> > >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> is 1.6 m and the > >> # sample-detector distance is 15 cm > >> # I have tried with many variations of --ssd and --sid but I think > >> they all look the same > >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> c:\Work\out_dir\geometry_real.xml > >> > >> # make a mha file out of the tiff files > >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> > >> # "Reconstruct" the data. > >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> > >> The result can be viewed in the recon_result.PNG attachment. > >> The reconstrcution can be found here: > >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> > >> Can someone please help me what I am doing wrong? > >> > >> best > >> > >> Arvid > >> > >> _______________________________________________ > >> Rtk-users mailing 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 Fri Oct 16 08:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 16 Oct 2015 14:15:43 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Thanks a lot Chao, I'm so glad that someone else than me did this! Just as a side note, Arvid, if you don't understand what is the origin and the spacing, look at the ITK software guide section 4.1.4, this is VERY important. Simon On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > Hi Arvid, > > Since you know how important a correct geometry is, you should understand > why you need projection origin and spacing. > CT geometry has more parameters than sid and sdd. How big the detector > pixel size (spacing) and how the detector is places w.r.t. the central ray > (origin) also play a role in the geometry. And in-plane/out-of-plane > rotations etc. > In your dataset the correct spacing and origin information is not stored > correctly in the projection data, so the total geometry is wrong. > > I have tested your data with the following command line and it gives > meaningful image. The newspacing and neworigin arguments force rtkfdk to > accept spacing and origin information of projections from command line > instead of from the data. Also I change the spacing of the volume from 2 to > 0.2 because your object is small. > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha > -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 > --newspacing=0.2 --neworigin=-20,-20 > > Apparently there is still some misalignment between this guessed geometry > and the real geometry, which you need to figure out with your own hardware. > > Regards, > Chao > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < > bottiger at gmail.com>: > >> Hi Chao. >> >> Thank you for the reply. However, I'm not quite sure what you mean by >> origin and spacing. >> A pixel on the detector is ~200 microns, and the sample is magnified >> around 1.3 times. >> >> I do understand that having a correct geometry is important to get an >> output image with correct dimensions, but I do not understand it's so >> difficult for me to make a single successful reconstruction (possibly >> with a dummy geometry). >> >> best >> >> Arvid >> >> PS: Just to validate the data I'm testing on I installed Octave and >> created a sinogram I then ran through its iradon implementation. It >> seemed to work quite nicely (see attachments). >> >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >> > Hi Arvid, >> > >> > Is the origin and spacing of your projection data correct? What is your >> > projection pixel size? >> > >> > Regards, Chao >> > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> > : >> >> >> >> Dear all. Hello again. >> >> >> >> I writing to you again because I need some help to understand how to >> >> declare the geometry of the system. >> >> >> >> Cyril redirected me towards this document ( >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> >> lot, but unfortunately it has not been enough to make me reconstruct a >> >> tomogram. >> >> >> >> I have attached a drawing of my setup (setup.jpg). The >> >> source-to-detector distance is around 1600 mm. I just rotate the >> >> sample instead of the source, and the sample-detector distance is 15 >> >> cm which makes the isocenter distance 1450. The field of view is >> >> around 2 cm. >> >> >> >> The aligned projections are located here: >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> >> and the raw tiffs are here: >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> >> >> I would say the input data looks as nice, but when reconstructing I'm >> >> still just getting noise: >> >> >> >> This is how I perform my "reconstruction" >> >> >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> >> is 1.6 m and the >> >> # sample-detector distance is 15 cm >> >> # I have tried with many variations of --ssd and --sid but I think >> >> they all look the same >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> >> c:\Work\out_dir\geometry_real.xml >> >> >> >> # make a mha file out of the tiff files >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> >> >> # "Reconstruct" the data. >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> >> c:\Work\out_dir\cylinder_a_recon.mha -g >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> >> >> The result can be viewed in the recon_result.PNG attachment. >> >> The reconstrcution can be found here: >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> >> >> Can someone please help me what I am doing wrong? >> >> >> >> best >> >> >> >> Arvid >> >> >> >> _______________________________________________ >> >> 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 bottiger at gmail.com Fri Oct 16 08:33:38 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 14:33:38 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao Wu Thank you very much! This is definitely something I can use in order to move forward. I'm not trying to make the best possible reconstruction out of this dataset, but just have something that works so I can start playing around and get familiar with RTK. Which I do have now. And to Simon: Thanks for the link. bets Arvid On Fri, Oct 16, 2015 at 2:15 PM, Simon Rit wrote: > Thanks a lot Chao, I'm so glad that someone else than me did this! > Just as a side note, Arvid, if you don't understand what is the origin and > the spacing, look at the ITK software guide section 4.1.4, this is VERY > important. > Simon > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: >> >> Hi Arvid, >> >> Since you know how important a correct geometry is, you should understand >> why you need projection origin and spacing. >> CT geometry has more parameters than sid and sdd. How big the detector >> pixel size (spacing) and how the detector is places w.r.t. the central ray >> (origin) also play a role in the geometry. And in-plane/out-of-plane >> rotations etc. >> In your dataset the correct spacing and origin information is not stored >> correctly in the projection data, so the total geometry is wrong. >> >> I have tested your data with the following command line and it gives >> meaningful image. The newspacing and neworigin arguments force rtkfdk to >> accept spacing and origin information of projections from command line >> instead of from the data. Also I change the spacing of the volume from 2 to >> 0.2 because your object is small. >> >> rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml >> --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 >> >> Apparently there is still some misalignment between this guessed geometry >> and the real geometry, which you need to figure out with your own hardware. >> >> Regards, >> Chao >> >> >> 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> : >>> >>> Hi Chao. >>> >>> Thank you for the reply. However, I'm not quite sure what you mean by >>> origin and spacing. >>> A pixel on the detector is ~200 microns, and the sample is magnified >>> around 1.3 times. >>> >>> I do understand that having a correct geometry is important to get an >>> output image with correct dimensions, but I do not understand it's so >>> difficult for me to make a single successful reconstruction (possibly >>> with a dummy geometry). >>> >>> best >>> >>> Arvid >>> >>> PS: Just to validate the data I'm testing on I installed Octave and >>> created a sinogram I then ran through its iradon implementation. It >>> seemed to work quite nicely (see attachments). >>> >>> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >>> > Hi Arvid, >>> > >>> > Is the origin and spacing of your projection data correct? What is your >>> > projection pixel size? >>> > >>> > Regards, Chao >>> > >>> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >>> > : >>> >> >>> >> Dear all. Hello again. >>> >> >>> >> I writing to you again because I need some help to understand how to >>> >> declare the geometry of the system. >>> >> >>> >> Cyril redirected me towards this document ( >>> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >>> >> lot, but unfortunately it has not been enough to make me reconstruct a >>> >> tomogram. >>> >> >>> >> I have attached a drawing of my setup (setup.jpg). The >>> >> source-to-detector distance is around 1600 mm. I just rotate the >>> >> sample instead of the source, and the sample-detector distance is 15 >>> >> cm which makes the isocenter distance 1450. The field of view is >>> >> around 2 cm. >>> >> >>> >> The aligned projections are located here: >>> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >>> >> and the raw tiffs are here: >>> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >>> >> >>> >> I would say the input data looks as nice, but when reconstructing I'm >>> >> still just getting noise: >>> >> >>> >> This is how I perform my "reconstruction" >>> >> >>> >> # 361 projections from 0 to 360 degrees. The source-detector distance >>> >> is 1.6 m and the >>> >> # sample-detector distance is 15 cm >>> >> # I have tried with many variations of --ssd and --sid but I think >>> >> they all look the same >>> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >>> >> c:\Work\out_dir\geometry_real.xml >>> >> >>> >> # make a mha file out of the tiff files >>> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >>> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >>> >> >>> >> # "Reconstruct" the data. >>> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >>> >> c:\Work\out_dir\cylinder_a_recon.mha -g >>> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >>> >> >>> >> The result can be viewed in the recon_result.PNG attachment. >>> >> The reconstrcution can be found here: >>> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >>> >> >>> >> Can someone please help me what I am doing wrong? >>> >> >>> >> best >>> >> >>> >> Arvid >>> >> >>> >> _______________________________________________ >>> >> 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 simon.rit at creatis.insa-lyon.fr Tue Oct 20 14:38:24 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 20 Oct 2015 20:38:24 +0200 Subject: [Rtk-users] using RTK with projection matrices and projection images In-Reply-To: References: Message-ID: Dear Shiras Abdurahman, It's better to email the mailing so that everybody can participate our discussion. We developped a tool to do this a while ago but it's never made it to the public repo. I have enclosed it if you want to have a look but it does what you want I think. The part of interest for you is how the variable matProj is converted to an RTK geometry. We'll try to clean it and push it to the main repo in November if you can't figure out how to use it. Good luck! Simon On Tue, Oct 20, 2015 at 5:07 PM, shiras abdurahman < shiras.abdurahman at gmail.com> wrote: > Dear Dr. Rit, > > My name is Shiras Abdurahman and I am a PhD student at ovgu Magdeburg, > Germany. Currently, I am working in tomographic reconstruction and I > started to using RTK. I have projection images and corresponding projection > matrices. I want to reconstruct volume with RTK. Is it possible to set > projection matrices directly and reconstruct the volume. Or do I need to > decompose first and get intrinsic and extrinsic parameters especially > rotation angles and use addProjection function? > I know that geometry can be read from xml file. > > Thank you for your time and patience. > > With regards, > Shiras Abdurahman > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rtkthales.cxx Type: text/x-c++src Size: 9360 bytes Desc: not available URL: From wuchao04 at gmail.com Mon Oct 26 16:30:58 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 26 Oct 2015 21:30:58 +0100 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Well, that's just some guess. I assume the central ray goes towards the center of your detector, so the origin should be denoted as somewhere near (- half_width, - half_height) in millimeter. Then I just fine-tune it manually a little bit to get a little bit better results... Regards, Chao 2015-10-26 19:44 GMT+01:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Dear Chao. > > I am very thankful for the help you provided me some days ago on the > RTK mailing list. However, I have a quick followup question for you, > which I have not been able to learn by reading the (very long) manual > another user provided me with. > > I am now working on another dataset, and get similar artifact when > reconstructing. Could you please help understand why you picked the > parameters you did? I guess the "spacing" is pixel size, but why did > why you pick "neworigin" to be -20,-20 ? > > best > > Arvid > > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > > Hi Arvid, > > > > Since you know how important a correct geometry is, you should understand > > why you need projection origin and spacing. > > CT geometry has more parameters than sid and sdd. How big the detector > pixel > > size (spacing) and how the detector is places w.r.t. the central ray > > (origin) also play a role in the geometry. And in-plane/out-of-plane > > rotations etc. > > In your dataset the correct spacing and origin information is not stored > > correctly in the projection data, so the total geometry is wrong. > > > > I have tested your data with the following command line and it gives > > meaningful image. The newspacing and neworigin arguments force rtkfdk to > > accept spacing and origin information of projections from command line > > instead of from the data. Also I change the spacing of the volume from 2 > to > > 0.2 because your object is small. > > > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > > c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml > > --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 > > > > Apparently there is still some misalignment between this guessed geometry > > and the real geometry, which you need to figure out with your own > hardware. > > > > Regards, > > Chao > > > > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Hi Chao. > >> > >> Thank you for the reply. However, I'm not quite sure what you mean by > >> origin and spacing. > >> A pixel on the detector is ~200 microns, and the sample is magnified > >> around 1.3 times. > >> > >> I do understand that having a correct geometry is important to get an > >> output image with correct dimensions, but I do not understand it's so > >> difficult for me to make a single successful reconstruction (possibly > >> with a dummy geometry). > >> > >> best > >> > >> Arvid > >> > >> PS: Just to validate the data I'm testing on I installed Octave and > >> created a sinogram I then ran through its iradon implementation. It > >> seemed to work quite nicely (see attachments). > >> > >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > >> > Hi Arvid, > >> > > >> > Is the origin and spacing of your projection data correct? What is > your > >> > projection pixel size? > >> > > >> > Regards, Chao > >> > > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > >> > : > >> >> > >> >> Dear all. Hello again. > >> >> > >> >> I writing to you again because I need some help to understand how to > >> >> declare the geometry of the system. > >> >> > >> >> Cyril redirected me towards this document ( > >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> >> lot, but unfortunately it has not been enough to make me reconstruct > a > >> >> tomogram. > >> >> > >> >> I have attached a drawing of my setup (setup.jpg). The > >> >> source-to-detector distance is around 1600 mm. I just rotate the > >> >> sample instead of the source, and the sample-detector distance is 15 > >> >> cm which makes the isocenter distance 1450. The field of view is > >> >> around 2 cm. > >> >> > >> >> The aligned projections are located here: > >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> >> and the raw tiffs are here: > >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> >> > >> >> I would say the input data looks as nice, but when reconstructing I'm > >> >> still just getting noise: > >> >> > >> >> This is how I perform my "reconstruction" > >> >> > >> >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> >> is 1.6 m and the > >> >> # sample-detector distance is 15 cm > >> >> # I have tried with many variations of --ssd and --sid but I think > >> >> they all look the same > >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> >> c:\Work\out_dir\geometry_real.xml > >> >> > >> >> # make a mha file out of the tiff files > >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> >> > >> >> # "Reconstruct" the data. > >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> >> > >> >> The result can be viewed in the recon_result.PNG attachment. > >> >> The reconstrcution can be found here: > >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> >> > >> >> Can someone please help me what I am doing wrong? > >> >> > >> >> best > >> >> > >> >> Arvid > >> >> > >> >> _______________________________________________ > >> >> Rtk-users mailing 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 Wed Oct 28 11:47:13 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Wed, 28 Oct 2015 16:47:13 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter Message-ID: <5630EE01.5070900@cppm.in2p3.fr> Hello everyone, I have a question/suggestion about the set of rtkDraw*ImageFilter. This filter are written as additive filters: for example, in rtkDrawEllipsoidImageFilter.txx, we can find for(..) itOut.Set( ellipsoid.density + itIn.Get() ) instead of for(..) itOut.Set( ellipsoid.density ) I think it can be more flexible the second option, because we can always associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. Moreover, the rtkDrawGeometricPhantomImageFilter class already uses itkAddImageFilter in order to have additive filters (which is redundant in current situation). What do you think ? Regards From shiraska at gmail.com Wed Oct 28 13:12:36 2015 From: shiraska at gmail.com (Shiras Abdurahman) Date: Wed, 28 Oct 2015 18:12:36 +0100 Subject: [Rtk-users] Filtered projection images Message-ID: Hi, I want to access processed projections especially filtered projections which are used for backprojection. Is it possible in RTK? Shiras -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 28 15:52:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:52:10 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: <5630EE01.5070900@cppm.in2p3.fr> References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: Hi Mathieu, Thanks for pointing this out. I agree that it might not be the best solution, yet one could argue that you could simply create a constant image with 0 to do what you'd like from the current implementation. My main problem is that I just tried to do what you suggest and some tests then fail... which shows the obvious, it's not a backward compatible change. I see two solutions: - keep it as is and you use ConstantImageFilter + we remove useless add filters, - a more complex but maybe more elegant solution: add a third template parameter for the operation that would allow the user to do what he'd like in a functor. That's what's done with filters that derive from itk::UnaryImageFilter . The default would be itk::Add2 but we could find or implement another one that simply discards the pixel value. What do you think? Simon PS: looking in the code, I just found that rtk::DrawConeImageFilter is not consistent with the others, it was always setting to 0 outside... that's been fixed! On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont wrote: > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. This > filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can always > associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is redundant in > current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > Rtk-users mailing 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 Oct 28 15:53:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:53:25 +0100 Subject: [Rtk-users] Filtered projection images In-Reply-To: References: Message-ID: Hi, I guess you mean filtered projections that are used in filtered backprojections algorithm? The filter you are looking for is rtk::FFTRampImageFilter which implements the ramp filter. There is a command line tool that can do it, rtkramp. Regards, Simon On Wed, Oct 28, 2015 at 6:12 PM, Shiras Abdurahman wrote: > Hi, > > I want to access processed projections especially filtered projections > which are used for backprojection. Is it possible in RTK? > > Shiras > > _______________________________________________ > Rtk-users mailing 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 Fri Oct 30 06:56:50 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Fri, 30 Oct 2015 11:56:50 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: <56334CF2.8070902@cppm.in2p3.fr> Hi, In case of your first solution, you can not chain several Draw*ImageFilters. For example, if you want to create small cylinders in a big cylinder. Your second solution is better. One another solution can be a thing like itk:SpatialObject but more simpler. An rtk::SpatialObject which one function (isInside(point)). We create a rtkDrawImageFilter class and implement ThreadedGenerateData like this : DrawImageFilter::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType itkNotUsed(threadId) { ... while( !itOut.IsAtEnd() ) { this->GetInput()->TransformIndexToPhysicalPoint(itOut.GetIndex(), point); if(m_rtkSpatialObject.isInside(point) itOut.Set(m_rtkFillFunctor(density, itIn.Get()); ... } DrawConeImageFilter class can be a child of this new DrawImageFilter (with new methods like setAngle, SetRadius which will adjust the rtkConeSpatialObject) This solution suppress duplicated code in Draw*ImageFilter::ThreadedGenerateData and makes easier implementation of another type of filling. On 28/10/2015 20:52, Simon Rit wrote: > Hi Mathieu, > Thanks for pointing this out. I agree that it might not be the best > solution, yet one could argue that you could simply create a constant > image with 0 to do what you'd like from the current implementation. My > main problem is that I just tried to do what you suggest and some tests > then fail... which shows the obvious, it's not a backward compatible change. > I see two solutions: > - keep it as is and you use ConstantImageFilter + we remove useless add > filters, > - a more complex but maybe more elegant solution: add a third template > parameter for the operation that would allow the user to do what he'd > like in a functor. That's what's done with filters that derive from > itk::UnaryImageFilter > . > The default would be itk::Add2 but we could find or implement another > one that simply discards the pixel value. > What do you think? > Simon > > PS: looking in the code, I just found that rtk::DrawConeImageFilter is > not consistent with the others, it was always setting to 0 outside... > that's been fixed! > > On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont > wrote: > > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. > This filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can > always associate Draw*ImageFilter and itkAddImageFilter to get an > additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is > redundant in current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > 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 Oct 1 02:18:53 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 08:18:53 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng wrote: > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: From cyril.mory at uclouvain.be Thu Oct 1 04:02:23 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Thu, 01 Oct 2015 10:02:23 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> Message-ID: <560CE88F.5030807@uclouvain.be> Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I'm using windows system (windows7 64 with VS 2013) and > I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with "ITK + FFTW" in > windows system? > > I'm just trying to use *rtkextractshroudsignal* and it seems to > require FFTW library externally. > > When I tried to use FFTW 3.3.4, I've encountered link errors as shown > below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > I'm running on Ubuntu 14.04 LTS and used the distribution library > (FFTW 3.3.3). If you're running on a Debian-based linux system, you > can also install the full development library set using the following > command: */sudo apt-get install libfftw3-3 libfftw3-dev/*. Then just > make sure that these libraries are being used by rerunning CCMake. > > I'm not quite sure about the error being thrown in your build, but > perhaps one of the main developers would be able to provide some more > insight into the issue. > > Hope this helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK > with those options on as you suggested. > > I've tried to use the up-to-date version of FFTW (3.3.4), but it > seems that it doesn't work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved external > symbol __imp_fftw_execute referenced in function "protected: > virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully using in > which system(Windows or Linux)? > > Thanks. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 6:56 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the inclusion of the > Fast Fourier Transform components. This requires compilation with > the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn't compile that way > initially, and it took a little bit of time to figure out. > > Hope that helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I'm now compiling itk-4.8 to use that feature since I've found > my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 4:31 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success since my > initial posting -- in fact I'm currently working on a new > method for accomplishing this task in certain challenging cases. > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase > signal output when called using the '-p' flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA/* > > From what I've experienced, this generally provides a good > signal [0,1) characterizing the respiratory phase using the > default settings. Occasionally, I've run into issues where > the default 'unsharpness' parameter needs to be adjusted to > give a clear signal (by appending the*--unsharp ##*flag to the > command). On more challenging shroud images -- notably, those > with little detectable signal from background -- additional > contrast-enhancement by pre-processing of the shroud has > assisted in signal extraction. > > I hope that helps -- and please let me know how it works out > for you. > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I've encountered exactly same issue and it would > be highly appreciated if you can share with me your > updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:*Rtk-users > [mailto:rtk-users-bounces at public.kitware.com]*On Behalf > Of*Joel Beaudry > *Sent:*Tuesday, March 17, 2015 5:25 PM > *To:*Matthew J. Riblett > > *Cc:*rtk-users at public.kitware.com > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but > I've had good success with using a Hilbert function in > python (scipy). I'm sure that Matlab has an equivalent > function, and maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett > > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a straightforward method > of going from the results of the rtkamsterdamshroud > and rtkextractshroudsignal applications to a [0,1) > phase signal for performing motion-compensated > reconstruction. I've been following along with the > MC-CBCT Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is used to > process the should signal prior to feeding it back > into the reconstruction application, but there is no > mention of how this is accomplished. I'm trying to > implement this into an automated workflow and I'd love > to know how this was accomplished. > > Thanks! > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > _______________________________________________ > 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 WEICHENG.SHEN at leidos.com Thu Oct 1 10:57:56 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Thu, 1 Oct 2015 14:57:56 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: image004.png Type: image/png Size: 15591 bytes Desc: image004.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 15591 bytes Desc: image001.png URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 1 11:23:48 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 17:23:48 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng wrote: > Hello Simon, > > > > Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside > RTK, the following error message appears: > > > > > ================================================================================================ > > > > CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): > By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project > has asked CMake to find a package configuration file provided by > "Gengetopt", but CMake did not find one. > > Could not find a package configuration file provided by "Gengetopt" with > any of the following names: > > GengetoptConfig.cmake > gengetopt-config.cmake > > Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set > "Gengetopt_DIR" to a directory containing one of the above files. If > "Gengetopt" provides a separate development package or SDK, be sure it has > been installed. > > > > > ================================================================================================ > > > > It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake > or gengetopt-config.cmake. I did a manual search for these files in the RTK > directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH > in the cmake GUI when performing configuration. The value of > CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln > file can now be successfully generated. > > > > Next I need to build the project using Visual Studio 2013. > > > > Thanks you very much for your help! > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Thursday, October 01, 2015 2:19 AM > *To:* Shen, Weicheng > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Unknown CMake command "WRAP_GGO" > > > > Hi, > > WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use > WRAP_GGO in an external project you need to do the same as in > applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the > easiest, to start with, is to build the rtktutorialapplication in the RTK > project. > > Let us know if that answered your problem, > > Simon > > > > On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: > > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 15591 bytes Desc: not available URL: From theday79 at gmail.com Thu Oct 1 17:33:51 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 1 Oct 2015 17:33:51 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <560CE88F.5030807@uclouvain.be> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> Message-ID: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park ; 'Matthew J. Riblett' ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I'm using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with "ITK + FFTW" in windows system? I'm just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I've encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I'm running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you're running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I'm not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I've tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn't work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn't compile that way initially, and it took a little bit of time to figure out. Hope that helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I'm now compiling itk-4.8 to use that feature since I've found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting - in fact I'm currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the '-p' flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I've experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I've run into issues where the default 'unsharpness' parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images - notably, those with little detectable signal from background - additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps - and please let me know how it works out for you. - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I've encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I've been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I'm trying to implement this into an automated workflow and I'd love to know how this was accomplished. Thanks! - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 joelbeaudry at gmail.com Thu Oct 1 17:40:30 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Thu, 1 Oct 2015 14:40:30 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Cyril, After trying out a few attempts, it seems like some values play nicer than others. Could it be an issue with floating point comparisons with the spacing and/or origins? It might explain why certain values seem to work (1.5) and others do not (0.88). I'll look at what values are being compared and get back to you. Thanks, Joel On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry wrote: > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 > spacing) and re-creating a mask off of that. So the motion mask should have > the same dimensions, spacing, and origin as the intended 4D image since I'm > using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating > my mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I created for > 160 (2), worked but not the case of 512 (0.88), and let you know what I > find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > wrote: > >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the small paragraph after >> the cuda command line : >> >> Note that the reconstructed volume in this example does not fully contain >> the attenuating object, causing hyper-attenuation artifacts on the borders >> of the result. To avoid these artifacts, reconstruct a larger volume >> (--dimension 256) should be fine. *Note that you will have to resize >> your motion mask as well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and allow any motion mask, >> but until I do, you can resize your motion mask using the CLITK tools ( >> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other datasets and it >> seems to be working. I need to increase the resolution and play around with >> the parameters now. >> >> I haven't had time to test it too much, but I do get an error when >> attempting to reconstruct with different dimensions. I'm using Cuda, and >> haven't tried it with just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >> AverageOutOfROIImageFilter: information of ROI image does not match input >> image" >> >> I'll be able to test some other things later and list more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line parameters AND data). Can >>> you restart it from scratch and let me know if you still have problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>> coordinates >>> - the regularization parameters (gamma space and gamma time) were way >>> too high. The regularization with a high gamma-time caused frames to be >>> identical, while it should only discourage variations >>> >>> I hope it works, now. If it doesn't work for you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and indeed, there are >>> several mistakes in it. I am working on correcting them. I'll keep you >>> posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>> >>> Hi RTK-users, >>> >>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>> example. The 5 frames should show some differences pertaining to patient >>> motion but the ones that I'm producing are identical, so no motion is >>> visible. >>> >>> Has anyone been able to follow the example and the provided dataset to >>> create a 4D image? >>> >>> Thanks, >>> Joel >>> >>> >>> _______________________________________________ >>> 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 Fri Oct 2 02:44:21 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 2 Oct 2015 08:44:21 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Joel, Can you explain how you created your mask? Looking at the code, it seems to me that if you create a 4D image with RTK, create a mask from this image with exactly the same meta info and pass it to ROOSTER, that should work in all cases. If I were you, I would compare the two mhd files (of the mask and the 4D image you used to create it) and verify that the meta info is exactly the same. For ROOSTER, I suggest to add an interpolation when the information is not inconsistent, e.g., in the main() function. I can do it if you agree Cyril. Simon On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry wrote: > Hi Cyril, > > After trying out a few attempts, it seems like some values play nicer than > others. Could it be an issue with floating point comparisons with the > spacing and/or origins? It might explain why certain values seem to work > (1.5) and others do not (0.88). I'll look at what values are being compared > and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >> spacing) and re-creating a mask off of that. So the motion mask should have >> the same dimensions, spacing, and origin as the intended 4D image since I'm >> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >> my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the mask I created >> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >> find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> Good to hear it's working now. >>> The error you get is explained on the wiki in the small paragraph after >>> the cuda command line : >>> >>> Note that the reconstructed volume in this example does not fully >>> contain the attenuating object, causing hyper-attenuation artifacts on the >>> borders of the result. To avoid these artifacts, reconstruct a larger >>> volume (--dimension 256) should be fine. *Note that you will have to >>> resize your motion mask as well, as 3D the motion mask is expected to have >>> the same size, spacing and origin as the first 3 dimensions of the 4D >>> output. * >>> >>> I guess I should take some time to fix that, and allow any motion mask, >>> but until I do, you can resize your motion mask using the CLITK tools ( >>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>> >>> Cyril >>> >>> >>> >>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other datasets and it >>> seems to be working. I need to increase the resolution and play around with >>> the parameters now. >>> >>> I haven't had time to test it too much, but I do get an error when >>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>> haven't tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>> AverageOutOfROIImageFilter: information of ROI image does not match input >>> image" >>> >>> I'll be able to test some other things later and list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> I have fixed the wiki example (command line parameters AND data). Can >>>> you restart it from scratch and let me know if you still have problems ? >>>> >>>> Roughly, the problems were the following: >>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>> coordinates >>>> - the regularization parameters (gamma space and gamma time) were way >>>> too high. The regularization with a high gamma-time caused frames to be >>>> identical, while it should only discourage variations >>>> >>>> I hope it works, now. If it doesn't work for you, please keep asking >>>> Cyril >>>> >>>> >>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki example, and indeed, there are >>>> several mistakes in it. I am working on correcting them. I'll keep you >>>> posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>> example. The 5 frames should show some differences pertaining to patient >>>> motion but the ones that I'm producing are identical, so no motion is >>>> visible. >>>> >>>> Has anyone been able to follow the example and the provided dataset to >>>> create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 cyril.mory at uclouvain.be Fri Oct 2 03:53:14 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 02 Oct 2015 09:53:14 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: <560E37EA.1060702@uclouvain.be> Indeed, resampling the mask if needed, to the correct size, spacing, origin and direction, seems the simplest way to deal with this issue. But I would do it in the filter rather than in the application, so that anything built on top of ROOSTER (i.e. incremental ROOSTER, or the rtkfourdroostertest) also benefits from it. Feel free to do it if you want, otherwise I'll take care of it next week :) On 10/02/2015 08:44 AM, Simon Rit wrote: > Hi Joel, > Can you explain how you created your mask? Looking at the code, it > seems to me that if you create a 4D image with RTK, create a mask from > this image with exactly the same meta info and pass it to ROOSTER, > that should work in all cases. If I were you, I would compare the two > mhd files (of the mask and the 4D image you used to create it) and > verify that the meta info is exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is > not inconsistent, e.g., in the main() function. I can do it if you > agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > > Hi Cyril, > > After trying out a few attempts, it seems like some values play > nicer than others. Could it be an issue with floating point > comparisons with the spacing and/or origins? It might explain why > certain values seem to work (1.5) and others do not (0.88). I'll > look at what values are being compared and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > > wrote: > > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions > 512 (0.88 spacing) and re-creating a mask off of that. So the > motion mask should have the same dimensions, spacing, and > origin as the intended 4D image since I'm using 4D rooster > with --dimension 512 --spacing 0.88. Perhaps I'm creating my > mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I > created for 160 (2), worked but not the case of 512 (0.88), > and let you know what I find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > > wrote: > > Hi Joel, > > Good to hear it's working now. > The error you get is explained on the wiki in the small > paragraph after the cuda command line : > > Note that the reconstructed volume in this example does > not fully contain the attenuating object, causing > hyper-attenuation artifacts on the borders of the result. > To avoid these artifacts, reconstruct a larger volume > (--dimension 256) should be fine. *Note that you will have > to resize your motion mask as well, as 3D the motion mask > is expected to have the same size, spacing and origin as > the first 3 dimensions of the 4D output. * > > I guess I should take some time to fix that, and allow any > motion mask, but until I do, you can resize your motion > mask using the CLITK tools > (http://www.creatis.insa-lyon.fr/rio/vv) or any method > that suits you. > > Cyril > > > > On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other >> datasets and it seems to be working. I need to increase >> the resolution and play around with the parameters now. >> >> I haven't had time to test it too much, but I do get an >> error when attempting to reconstruct with different >> dimensions. I'm using Cuda, and haven't tried it with >> just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws >> "In AverageOutOfROIImageFilter: information of ROI image >> does not match input image" >> >> I'll be able to test some other things later and list >> more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> I have fixed the wiki example (command line >> parameters AND data). Can you restart it from scratch >> and let me know if you still have problems ? >> >> Roughly, the problems were the following: >> - the "mm_50.mha" motion mask file was not aligned >> with the CBCT coordinates >> - the regularization parameters (gamma space and >> gamma time) were way too high. The regularization >> with a high gamma-time caused frames to be identical, >> while it should only discourage variations >> >> I hope it works, now. If it doesn't work for you, >> please keep asking >> Cyril >> >> >> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and >>> indeed, there are several mistakes in it. I am >>> working on correcting them. I'll keep you posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the >>>> 4DROOSTERReconstruction example. The 5 frames >>>> should show some differences pertaining to patient >>>> motion but the ones that I'm producing are >>>> identical, so no motion is visible. >>>> >>>> Has anyone been able to follow the example and the >>>> provided dataset to create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 joelbeaudry at gmail.com Fri Oct 2 12:31:38 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Fri, 2 Oct 2015 09:31:38 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: <560E37EA.1060702@uclouvain.be> References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: Hi Simon and Cyril, @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) and then use itkSnap to create a mask from that 3D image. I then use that mask as the input for ROOSTER, to which I again use the same spacing/dimensions. For some values it seems to work and other it doesn't. I'm wondering if itkSnap is truncating the spacing/dimension/origins when I save my mask, and perhaps why something like (160,2,-159) works but (511,0.88,-224.84). I'll take a look at the metadata. I'll try resampling my masks and like you said that should probably fix my issues. Thanks for the help, Joel On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory wrote: > Indeed, resampling the mask if needed, to the correct size, spacing, > origin and direction, seems the simplest way to deal with this issue. > But I would do it in the filter rather than in the application, so that > anything built on top of ROOSTER (i.e. incremental ROOSTER, or the > rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: > > Hi Joel, > Can you explain how you created your mask? Looking at the code, it seems > to me that if you create a 4D image with RTK, create a mask from this image > with exactly the same meta info and pass it to ROOSTER, that should work in > all cases. If I were you, I would compare the two mhd files (of the mask > and the 4D image you used to create it) and verify that the meta info is > exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is not > inconsistent, e.g., in the main() function. I can do it if you agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values play nicer >> than others. Could it be an issue with floating point comparisons with the >> spacing and/or origins? It might explain why certain values seem to work >> (1.5) and others do not (0.88). I'll look at what values are being compared >> and get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> wrote: >> >>> Hi Cyril, >>> >>> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >>> spacing) and re-creating a mask off of that. So the motion mask should have >>> the same dimensions, spacing, and origin as the intended 4D image since I'm >>> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >>> my mask incorrectly? >>> >>> I'll try and fiddle with it a bit later and see why the mask I created >>> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >>> find. >>> >>> Thanks again, >>> Joel >>> >>> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> Good to hear it's working now. >>>> The error you get is explained on the wiki in the small paragraph after >>>> the cuda command line : >>>> >>>> Note that the reconstructed volume in this example does not fully >>>> contain the attenuating object, causing hyper-attenuation artifacts on the >>>> borders of the result. To avoid these artifacts, reconstruct a larger >>>> volume (--dimension 256) should be fine. *Note that you will have to >>>> resize your motion mask as well, as 3D the motion mask is expected to have >>>> the same size, spacing and origin as the first 3 dimensions of the 4D >>>> output. * >>>> >>>> I guess I should take some time to fix that, and allow any motion mask, >>>> but until I do, you can resize your motion mask using the CLITK tools ( >>>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>>> >>>> Cyril >>>> >>>> >>>> >>>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>>> >>>> Hi Cyril, >>>> >>>> Works like a charm, thanks! I tried it on some other datasets and it >>>> seems to be working. I need to increase the resolution and play around with >>>> the parameters now. >>>> >>>> I haven't had time to test it too much, but I do get an error when >>>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>>> haven't tried it with just cpu reconstruction yet. >>>> >>>> i.e.) >>>> --dimension 160 --spacing 2 -> works >>>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>>> AverageOutOfROIImageFilter: information of ROI image does not match input >>>> image" >>>> >>>> I'll be able to test some other things later and list more details. >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> >>>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>>> wrote: >>>> >>>>> Hi Joel, >>>>> >>>>> I have fixed the wiki example (command line parameters AND data). Can >>>>> you restart it from scratch and let me know if you still have problems ? >>>>> >>>>> Roughly, the problems were the following: >>>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>>> coordinates >>>>> - the regularization parameters (gamma space and gamma time) were way >>>>> too high. The regularization with a high gamma-time caused frames to be >>>>> identical, while it should only discourage variations >>>>> >>>>> I hope it works, now. If it doesn't work for you, please keep asking >>>>> Cyril >>>>> >>>>> >>>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>>> >>>>> Hi Joel, >>>>> >>>>> I have just tried to reproduce the wiki example, and indeed, there are >>>>> several mistakes in it. I am working on correcting them. I'll keep you >>>>> posted. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>>> example. The 5 frames should show some differences pertaining to patient >>>>> motion but the ones that I'm producing are identical, so no motion is >>>>> visible. >>>>> >>>>> Has anyone been able to follow the example and the provided dataset to >>>>> create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 WEICHENG.SHEN at leidos.com Fri Oct 2 22:11:05 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Sat, 3 Oct 2015 02:11:05 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977222@EMP-EXMR104.corp.leidos.com> Hi Simon, Yes, if I run the CMake at the root of RTK, the example builds successfully. Thanks you very much! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 11:24 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng > wrote: Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: 15587 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 15591 bytes Desc: image002.png URL: From simon.rit at creatis.insa-lyon.fr Mon Oct 5 01:45:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 5 Oct 2015 07:45:06 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Oct 5 13:53:11 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 5 Oct 2015 13:53:11 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error1_using_ITK_FFT.png Type: image/png Size: 17214 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error in code.png Type: image/png Size: 21974 bytes Desc: not available URL: From cyril.mory at uclouvain.be Tue Oct 6 08:08:35 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Tue, 06 Oct 2015 14:08:35 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: <5613B9C3.4070309@uclouvain.be> Hi Joel, I have just pushed a fix for this issue: in the 4DROOSTER filter, I have added a resample filter between the ROI input and the AverageOutOfROIImageFilter. On my side, it runs fine. Let me know if it fixes the issue on your side. Thanks for pointing this out, Cyril On 10/02/2015 06:31 PM, Joel Beaudry wrote: > Hi Simon and Cyril, > > @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) > and then use itkSnap to create a mask from that 3D image. I then use > that mask as the input for ROOSTER, to which I again use the same > spacing/dimensions. For some values it seems to work and other it > doesn't. I'm wondering if itkSnap is truncating the > spacing/dimension/origins when I save my mask, and perhaps why > something like (160,2,-159) works but (511,0.88,-224.84). I'll take a > look at the metadata. > > I'll try resampling my masks and like you said that should probably > fix my issues. > > Thanks for the help, > Joel > > On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory > wrote: > > Indeed, resampling the mask if needed, to the correct size, > spacing, origin and direction, seems the simplest way to deal with > this issue. > But I would do it in the filter rather than in the application, so > that anything built on top of ROOSTER (i.e. incremental ROOSTER, > or the rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it > next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: >> Hi Joel, >> Can you explain how you created your mask? Looking at the code, >> it seems to me that if you create a 4D image with RTK, create a >> mask from this image with exactly the same meta info and pass it >> to ROOSTER, that should work in all cases. If I were you, I would >> compare the two mhd files (of the mask and the 4D image you used >> to create it) and verify that the meta info is exactly the same. >> For ROOSTER, I suggest to add an interpolation when the >> information is not inconsistent, e.g., in the main() function. I >> can do it if you agree Cyril. >> Simon >> >> On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values >> play nicer than others. Could it be an issue with floating >> point comparisons with the spacing and/or origins? It might >> explain why certain values seem to work (1.5) and others do >> not (0.88). I'll look at what values are being compared and >> get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with >> dimensions 512 (0.88 spacing) and re-creating a mask off >> of that. So the motion mask should have the same >> dimensions, spacing, and origin as the intended 4D image >> since I'm using 4D rooster with --dimension 512 --spacing >> 0.88. Perhaps I'm creating my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the >> mask I created for 160 (2), worked but not the case of >> 512 (0.88), and let you know what I find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the >> small paragraph after the cuda command line : >> >> Note that the reconstructed volume in this example >> does not fully contain the attenuating object, >> causing hyper-attenuation artifacts on the borders of >> the result. To avoid these artifacts, reconstruct a >> larger volume (--dimension 256) should be fine. *Note >> that you will have to resize your motion mask as >> well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 >> dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and >> allow any motion mask, but until I do, you can resize >> your motion mask using the CLITK tools >> (http://www.creatis.insa-lyon.fr/rio/vv) or any >> method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other >>> datasets and it seems to be working. I need to >>> increase the resolution and play around with the >>> parameters now. >>> >>> I haven't had time to test it too much, but I do get >>> an error when attempting to reconstruct with >>> different dimensions. I'm using Cuda, and haven't >>> tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> >>> throws "In AverageOutOfROIImageFilter: information >>> of ROI image does not match input image" >>> >>> I'll be able to test some other things later and >>> list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> >> > wrote: >>> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line >>> parameters AND data). Can you restart it from >>> scratch and let me know if you still have >>> problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not >>> aligned with the CBCT coordinates >>> - the regularization parameters (gamma space and >>> gamma time) were way too high. The >>> regularization with a high gamma-time caused >>> frames to be identical, while it should only >>> discourage variations >>> >>> I hope it works, now. If it doesn't work for >>> you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki >>>> example, and indeed, there are several mistakes >>>> in it. I am working on correcting them. I'll >>>> keep you posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the >>>>> 4DROOSTERReconstruction example. The 5 frames >>>>> should show some differences pertaining to >>>>> patient motion but the ones that I'm producing >>>>> are identical, so no motion is visible. >>>>> >>>>> Has anyone been able to follow the example and >>>>> the provided dataset to create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 Oct 6 09:11:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 6 Oct 2015 15:11:27 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park wrote: > Hi Simon, > > > > I?ve just tried to build it without FFTW library, as you have asked. > > > > I have encountered an error as shown in the attached pictures in running > ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, making > FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > > > Hope it helps. > > > > Yang > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Thanks a lot Yang for the detailed report, I'm sure that will be helpful > to many people. For my personal information, did you try to compile FFTW > from ITK as well? If it didn't work, could you let us know what was the > problem? > > Simon > > > > > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Tue Oct 6 10:49:55 2015 From: theday79 at gmail.com (Yang K Park) Date: Tue, 6 Oct 2015 10:49:55 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: <001c01d10046$44941080$cdbc3180$@gmail.com> Hi Simon, It seems that I misunderstood before. This time, I?ve followed your suggestion and encountered an error as follows: H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): fatal error C1083: Cannot open include file: 'fftw3.h': No such file or directory I?ve tested this with itk4.8.1, which is the most up-to-date release version. It seems that I need to specify the external fftw header file (fftw3.h), but the user interface for input does not appear in CMake unless I set ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. I hope this report can help itk developers resolve the issue. Thanks. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Tuesday, October 06, 2015 9:11 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com ] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park > Cc: Cyril Mory >; Matthew J. Riblett >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Tue Oct 6 11:00:16 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Tue, 6 Oct 2015 17:00:16 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <001c01d10046$44941080$cdbc3180$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> <001c01d10046$44941080$cdbc3180$@gmail.com> Message-ID: <5613E200.4050001@kitware.com> Yang, Simon, As I mentioned previously, you cannot build ITK with FFTW on Windows without setting ITK_USE_SYSTEM_FFTW=ON. You should get a warning in CMake specifying this. So the only solution to build ITK with FFTW on Windows is to use an externally compiled version of FFTW. Julien On 06/10/2015 16:49, Yang K Park wrote: > Hi Simon, > > It seems that I misunderstood before. This time, I?ve followed your > suggestion and encountered an error as follows: > > H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): > fatal error C1083: Cannot open include file: 'fftw3.h': No such file or > directory > > I?ve tested this with itk4.8.1, which is the most up-to-date release > version. > > It seems that I need to specify the external fftw header file (fftw3.h), > but the user interface for input does not appear in CMake unless I set > ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. > > I hope this report can help itk developers resolve the issue. > > Thanks. > > Yang > > *From:*simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of > *Simon Rit > *Sent:* Tuesday, October 06, 2015 9:11 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett > ; rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks Yang. I think I wasn't clear but what I meant was not to disable > FFTW but to compile and use FFTW in ITK by using > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=OFF > > instead of what I think you used > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=ON > > Julien Jomier from Kitware told me that both configurations worked for > him but your initial message suggests that the first did not work for > you. If you can confirm and explain your config (ITK version, compiler, > etc.). > > Simon > > PS: your test is useful anyway, I'll try to make the error message > clearer when FFTW is not used. > > On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: > > Hi Simon, > > I?ve just tried to build it without FFTW library, as you have asked. > > I have encountered an error as shown in the attached pictures in > running ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, > making FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > Hope it helps. > > Yang > > *From:*simon.rit at gmail.com > [mailto:simon.rit at gmail.com ] *On Behalf > Of *Simon Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > > *Cc:* Cyril Mory >; Matthew J. Riblett > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks a lot Yang for the detailed report, I'm sure that will be > helpful to many people. For my personal information, did you try to > compile FFTW from ITK as well? If it didn't work, could you let us > know what was the problem? > > Simon > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: > > Hi Cyril, > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally > succeeded. > > Following is the final version of my instruction. > > Thanks. > > Yang > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very > convenient! I really like it. Thanks for your hard works on this. > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > 1.Prepare fftw library files > > a.Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b.Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c.Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command > Prompt) > > d.Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e.Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > 2.Cmake for ITK > > a.Configure > > b.Turn on the following and reconfigure > > i.ITK_USE_SYSTEM_FFTW (mandatory to make the following options > appear) > > c.Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i.FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 > > ii.FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii.FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv.FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. > > d."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e.Reconfigure, Generate > > 3.Build ITK with Visual Studio > > a.In both Debug and Release > > 4.Cmake for RTK > > a.Default settings were used. > > b."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > 5.Build RTK using Visual Studio > > 6.Copy dll files to RTK bin folders > > a.Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b.To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7.Build RTK with Visual Studio > > *From:*Cyril Mory [mailto:cyril.mory at uclouvain.be > ] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park >; 'Matthew J. Riblett' > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam > Shroud > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just > have to activate it in the CMake options. On Windows, you cannot > do that. I do not have a clue why, but you cannot. You have to > install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled > DLLs from http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the > .lib files (that is absolutely necessary). You may have to run > the "lib.exe" program from the VS developer prompt instead of > the standard windows cmd.exe prompt. Specify you CPU > architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, > and you should be fine. I have successfully compiled this with > BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it > matters. > > If it works for you, then you might want to play around with the > other FFTW .lib files, and send on this mailing list a more > complete set of CMAKE options that works. I have tried some > other combinations without success, so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS > 2013) and I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with ?ITK + > FFTW? in windows system? > > I?m just trying to use *rtkextractshroudsignal* and it seems > to require FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors > as shown below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > I?m running on Ubuntu 14.04 LTS and used the distribution > library (FFTW 3.3.3). If you?re running on a Debian-based > linux system, you can also install the full development > library set using the following command: */sudo apt-get > install libfftw3-3 libfftw3-dev/*. Then just make sure that > these libraries are being used by rerunning CCMake. > > I?m not quite sure about the error being thrown in your > build, but perhaps one of the main developers would be able > to provide some more insight into the issue. > > Hope this helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to > compile ITK with those options on as you suggested. > > I?ve tried to use the up-to-date version of FFTW > (3.3.4), but it seems that it doesn?t work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved > external symbol __imp_fftw_execute referenced in > function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully > using in which system(Windows or Linux)? > > Thanks. > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the > inclusion of the Fast Fourier Transform components. > This requires compilation with the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that > way initially, and it took a little bit of time to > figure out. > > Hope that helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since > I?ve found my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data > from Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success > since my initial posting ? in fact I?m currently > working on a new method for accomplishing this task > in certain challenging cases. > > The most recent version of RTK provides an update to > the rtkextractshroudsignal application which > provides a phase signal output when called using the > ?-p? flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o > raw_signal.txt -p phase_signal.txt --method > LINEAR_BETWEEN_MINIMA/* > > From what I?ve experienced, this generally provides > a good signal [0,1) characterizing the respiratory > phase using the default settings. Occasionally, > I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear > signal (by appending the *--unsharp ##* flag to the > command). On more challenging shroud images ? > notably, those with little detectable signal from > background ? additional contrast-enhancement by > pre-processing of the shroud has assisted in signal > extraction. > > I hope that helps ? and please let me know how it > works out for you. > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue > and it would be highly appreciated if you can > share with me your updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical > School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:* Rtk-users > [mailto:rtk-users-bounces at public.kitware.com] > *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > > > *Cc:* rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal > data from Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab > script, but I've had good success with using a > Hilbert function in python (scipy). I'm sure > that Matlab has an equivalent function, and > maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. > Riblett > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a > straightforward method of going from the > results of the rtkamsterdamshroud and > rtkextractshroudsignal applications to a > [0,1) phase signal for performing > motion-compensated reconstruction. I?ve > been following along with the MC-CBCT > Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is > used to process the should signal prior to > feeding it back into the reconstruction > application, but there is no mention of how > this is accomplished. I?m trying to > implement this into an automated workflow > and I?d love to know how this was accomplished. > > Thanks! > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > > MCV Office Phone: +1.804.628.4858 > > > > _______________________________________________ > 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 > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From bottiger at gmail.com Mon Oct 12 05:42:20 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 11:42:20 +0200 Subject: [Rtk-users] Reconstruction problems Message-ID: Hi there I hope someone can help me me get started with RTK. First of all I should mention that I have compiled RTK on Windows 7 using Visual Studio 2013. Everything seems to compile and run just fine. Secondly: I tried to reproduce this example: http://wiki.openrtk.org/index.php/RTK/Scripts/FDK This was somewhat successful - I think. I could generate some projections, and reconstruct them. However, it just looks like an egg and not like a Shepp Logan phantom. See attachment. However, I'm unsure if this is expected or not. I took some homemade projections (of a small cylinder) and converted them into a MHA file (using rtkprojections.exe). The file looks correct in ImageJ. The dimensions are 370 pixels * 195 pixels * 361 projections You can get the file here: https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 The problem is that the reconstruction is wrong (see cylinder_recon). It looks like the dimensions are not read correctly, but I am unsure how I fix that? The rtkfdk.exe has a single --dimension parameter, but I am unsure which dimension that is suppose to be, but neither 195, 370 or any other value I could think of works for me. I hope someone can help me in the right direction. best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: SheppLogan.PNG Type: image/png Size: 150153 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cylinder_recon.PNG Type: image/png Size: 128472 bytes Desc: not available URL: From ghostcz at hotmail.com Mon Oct 12 05:54:44 2015 From: ghostcz at hotmail.com (louie L) Date: Mon, 12 Oct 2015 11:54:44 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Hi, You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? Cheers, Louie Sent from my iOS > On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 05:59:38 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 11:59:38 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: References: Message-ID: <561B848A.9090406@uclouvain.be> Hi Arvid, Well, you're on the right track :-) Your Shepp Logan reconstruction looks fine, I guess it is just a visualization problem: you can use vv http://www.creatis.insa-lyon.fr/rio/vv to open it and you will be able to change the "window" and "level" settings in visualization. Regarding the cylinder, can you send your geometry file too ? Regards Cyril Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Mon Oct 12 06:35:27 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:35:27 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: <561B848A.9090406@uclouvain.be> References: <561B848A.9090406@uclouvain.be> Message-ID: Hey Cyril I just wrote another e-mail about how I generated the geometry file (it's just simulated). But just in case I'll attach it here: best Arvid On Mon, Oct 12, 2015 at 11:59 AM, Cyril Mory wrote: > Hi Arvid, > > Well, you're on the right track :-) > Your Shepp Logan reconstruction looks fine, I guess it is just a > visualization problem: you can use vv > http://www.creatis.insa-lyon.fr/rio/vv > to open it and you will be able to change the "window" and "level" > settings in visualization. > > Regarding the cylinder, can you send your geometry file too ? > > Regards > Cyril > > Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example:http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here:https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > > > ------------------------------ > [image: Avast logo] > > L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le > logiciel antivirus Avast. > www.avast.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry360.xml Type: text/xml Size: 134495 bytes Desc: not available URL: From bottiger at gmail.com Mon Oct 12 06:36:03 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:36:03 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Sure. I'll admit I have yet to understand the specifics of the geometry file. Currently I just used a simulated one because that was what the SheppLogan example used, and the input projections looked similar. Here is a complete list of the commands I executed: rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 I did not do anything to the contrast and that is most likely the issue. I downloaded and installed vv and I can see some (very unclear) features inside the SheppLogan reconstruction - so that's nice. However, currently I'm mostly interested in getting the geometry right :) best On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: > Hi, > > You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? > > Cheers, > Louie > > Sent from my iOS > >> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >> >> Hi there >> >> I hope someone can help me me get started with RTK. >> >> First of all I should mention that I have compiled RTK on Windows 7 >> using Visual Studio 2013. Everything seems to compile and run just >> fine. >> >> Secondly: I tried to reproduce this example: >> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >> >> This was somewhat successful - I think. I could generate some >> projections, and reconstruct them. However, it just looks like an egg >> and not like a Shepp Logan phantom. See attachment. >> >> However, I'm unsure if this is expected or not. I took some homemade >> projections (of a small cylinder) and converted them into a MHA file >> (using rtkprojections.exe). The file looks correct in ImageJ. The >> dimensions are 370 pixels * 195 pixels * 361 projections >> >> You can get the file here: >> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >> >> The problem is that the reconstruction is wrong (see cylinder_recon). >> It looks like the dimensions are not read correctly, but I am unsure >> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >> I am unsure which dimension that is suppose to be, but neither 195, >> 370 or any other value I could think of works for me. >> >> I hope someone can help me in the right direction. >> >> best >> >> Arvid >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 15:52:10 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 21:52:10 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: <561C0F6A.6080602@uclouvain.be> Hi Arvid, Unfortunately, you cannot do that. You have to obtain the exact geometry of this particular acquisition from the cone beam device you used. If you need help to convert it to the RTK format, well, that's something you can ask for on this mailing list. Can you get the geometry data ? Regards, Cyril Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : > Sure. > > I'll admit I have yet to understand the specifics of the geometry > file. Currently I just used a simulated one because that was what the > SheppLogan example used, and the input projections looked similar. > > Here is a complete list of the commands I executed: > > rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml > > rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ > --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif > > rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o > c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g > c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 > > I did not do anything to the contrast and that is most likely the > issue. I downloaded and installed vv and I can see some (very unclear) > features inside the SheppLogan reconstruction - so that's nice. > However, currently I'm mostly interested in getting the geometry right :) > > best > > On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >> Hi, >> >> You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? >> >> Cheers, >> Louie >> >> Sent from my iOS >> >>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >>> >>> Hi there >>> >>> I hope someone can help me me get started with RTK. >>> >>> First of all I should mention that I have compiled RTK on Windows 7 >>> using Visual Studio 2013. Everything seems to compile and run just >>> fine. >>> >>> Secondly: I tried to reproduce this example: >>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>> >>> This was somewhat successful - I think. I could generate some >>> projections, and reconstruct them. However, it just looks like an egg >>> and not like a Shepp Logan phantom. See attachment. >>> >>> However, I'm unsure if this is expected or not. I took some homemade >>> projections (of a small cylinder) and converted them into a MHA file >>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>> dimensions are 370 pixels * 195 pixels * 361 projections >>> >>> You can get the file here: >>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>> >>> The problem is that the reconstruction is wrong (see cylinder_recon). >>> It looks like the dimensions are not read correctly, but I am unsure >>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>> I am unsure which dimension that is suppose to be, but neither 195, >>> 370 or any other value I could think of works for me. >>> >>> I hope someone can help me in the right direction. >>> >>> best >>> >>> Arvid >>> >>> >>> _______________________________________________ >>> 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 --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From cyril.mory at uclouvain.be Mon Oct 12 16:36:24 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 22:36:24 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: <561C1984.9030509@uclouvain.be> References: <561C1984.9030509@uclouvain.be> Message-ID: <561C19C8.5050304@uclouvain.be> Arvid, You can find a description of the geometry here : http://www.creatis.insa-lyon.fr/~srit/geometry.pdf In rtk/applications, several applications are simple converters from the cone beam manufacturer's raw geometry format to RTK geometry format, so you can also have a look at the code of these apps. If you know that you have an almost parallel beam, you can indeed try to use a dummy geometry file, but be careful: rtksimulatedgeometry generates a cone beam geometry, with large fan and cone angles if you leave the default parameters. You can adjust the 'sdd' and 'sid' options to simulate a very distant source, making rays almost parallel to each other (be careful with numerical precision, though). Hope it helps, Cyril Le 12/10/2015 21:59, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hello Cyril > > Thank you for getting back to me. I do have the geometry (albeit not > right here next to me). > However, my problem was that when I looked in the geometry file, I > didn't find it obvious how to define declare it - is it documented > somewhere? > > That said - the measurements I played around with is measured with an > almost parallel beam. I hoped I could reconstruct it (with minor > artifacts) using a dummy geometry file. > > best > > Arvid > > On Mon, Oct 12, 2015 at 9:52 PM, Cyril Mory wrote: >> Hi Arvid, >> >> Unfortunately, you cannot do that. You have to obtain the exact geometry of >> this particular acquisition from the cone beam device you used. >> If you need help to convert it to the RTK format, well, that's something you >> can ask for on this mailing list. >> Can you get the geometry data ? >> >> Regards, >> Cyril >> >> >> Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : >>> Sure. >>> >>> I'll admit I have yet to understand the specifics of the geometry >>> file. Currently I just used a simulated one because that was what the >>> SheppLogan example used, and the input projections looked similar. >>> >>> Here is a complete list of the commands I executed: >>> >>> rtksimulatedgeometry.exe -n 361 -o >>> c:\Users\aplb\Work\out_dir\geometry360.xml >>> >>> rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ >>> --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif >>> >>> rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o >>> c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g >>> c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 >>> >>> I did not do anything to the contrast and that is most likely the >>> issue. I downloaded and installed vv and I can see some (very unclear) >>> features inside the SheppLogan reconstruction - so that's nice. >>> However, currently I'm mostly interested in getting the geometry right :) >>> >>> best >>> >>> On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >>>> Hi, >>>> >>>> You can specify the size in each dimension. Can you post the arguments >>>> you used for the projections and reconstruction? Did you try to adjust the >>>> contrast of the output? >>>> >>>> Cheers, >>>> Louie >>>> >>>> Sent from my iOS >>>> >>>>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger >>>>> wrote: >>>>> >>>>> Hi there >>>>> >>>>> I hope someone can help me me get started with RTK. >>>>> >>>>> First of all I should mention that I have compiled RTK on Windows 7 >>>>> using Visual Studio 2013. Everything seems to compile and run just >>>>> fine. >>>>> >>>>> Secondly: I tried to reproduce this example: >>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>>>> >>>>> This was somewhat successful - I think. I could generate some >>>>> projections, and reconstruct them. However, it just looks like an egg >>>>> and not like a Shepp Logan phantom. See attachment. >>>>> >>>>> However, I'm unsure if this is expected or not. I took some homemade >>>>> projections (of a small cylinder) and converted them into a MHA file >>>>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>>>> dimensions are 370 pixels * 195 pixels * 361 projections >>>>> >>>>> You can get the file here: >>>>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>>>> >>>>> The problem is that the reconstruction is wrong (see cylinder_recon). >>>>> It looks like the dimensions are not read correctly, but I am unsure >>>>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>>>> I am unsure which dimension that is suppose to be, but neither 195, >>>>> 370 or any other value I could think of works for me. >>>>> >>>>> I hope someone can help me in the right direction. >>>>> >>>>> best >>>>> >>>>> Arvid >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >> >> >> --- >> L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le >> logiciel antivirus Avast. >> https://www.avast.com/antivirus >> --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From gnthibault at gmail.com Wed Oct 14 05:38:46 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Wed, 14 Oct 2015 11:38:46 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter Message-ID: Dear all, I recently had troubles while trying to rewrite my code, linked with libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite well, to using fdk reconstruction method. My first question: is there a general way to enable maximum debug log level at runtime in rtk ? My second question, is more specific: is it normal that I see such error message coming from itk when using FDKConeBeamReconstructionFilter : ExceptionObject caught with fdk->Update() in file [...] itk::ExceptionObject (0x7f377c020cb0) Location: "unknown" File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx Line: 416 Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred during SingleMethodExecute /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): Cannot compute FFT of image with size [2048, 1024, 11]. VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose size in each dimension has a prime factorization consisting of only 2s, 3s, or 5s. I suppose that this error arise while performing ramp filtering, but I see no relation between FFT configuration stated in the error log ( [2048, 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 projections. I also tried with 200 projection and I had the same problem, but with [2048, 1024, 34] Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to the total number of projection in my dataset every time. The revision I am currently using: commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 Merge: 578cf89 09d820c Thank you in advance for your help. Regards Thibault Notargiacomo -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 14 12:58:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 14 Oct 2015 18:58:06 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Hi Thibault, No, there is not really a log system that would allow you debugging at run time. You can compile a debug version that would enable a lot of messages related to the pipeline. For this, I think you need to use NDEBUG at compilation (it's an ITK mechanism that I never use). No, it's not normal that you see an error message. There are two things: - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it only handles power of 2/3/5 dimensions and it's slow. I always advise people to use FFTW by turning on ITK_USE_FFTW options during ITK's compilation. - I don't fully understand why vnl doesn't work either. I understand the first two dimensions, for vnl (which I strongly suggest to not use), I pad to the next power of 2 so 780 * 2 (for zero padding) -> 2048 780 -> 1024 but then, if you use 64 projections, why 11? Are you sure the second input image to FDKConeBeamReconstructionImageFilter has the dimension you want? I would try to connect input 2 to an itk::ImageFileWriter and check what are the dimensions of this image. If you're absolutely sure, then I'll try to reproduce and fix the issue. Simon On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < gnthibault at gmail.com> wrote: > Dear all, > > I recently had troubles while trying to rewrite my code, linked with > libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite > well, to using fdk reconstruction method. > > My first question: is there a general way to enable maximum debug log > level at runtime in rtk ? > > My second question, is more specific: is it normal that I see such error > message coming from itk when using FDKConeBeamReconstructionFilter : > > ExceptionObject caught with fdk->Update() in file [...] > > itk::ExceptionObject (0x7f377c020cb0) > Location: "unknown" > File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx > Line: 416 > Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred > during SingleMethodExecute > > /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: > itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): > Cannot compute FFT of image with size [2048, 1024, 11]. > VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose > size in each dimension has a prime factorization consisting of only 2s, 3s, > or 5s. > > I suppose that this error arise while performing ramp filtering, but I see > no relation between FFT configuration stated in the error log ( [2048, > 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 > projections. > > I also tried with 200 projection and I had the same problem, but with > [2048, 1024, 34] > > Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to > the total number of projection in my dataset every time. > > The revision I am currently using: > commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 > Merge: 578cf89 09d820c > > > Thank you in advance for your help. > > Regards > > Thibault Notargiacomo > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scouser27 at gmail.com Wed Oct 14 16:27:48 2015 From: scouser27 at gmail.com (sco user) Date: Wed, 14 Oct 2015 21:27:48 +0100 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi I'm a new user to RTK. I've been able to perform reconstructions of the Catphan and my own copies of Varian CBCT images with some success. I enabled the CUDA flags when making RTK so as to take advantage of the capabilities of my GPU. When I use --hardware="cuda" with the rtkfdk application, I have found that I must specify the lowmem option in order to get the reconstruction to run successfully. If I don't use lowmem, I get the following error: #### Reconstructing and writing... /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ unknown : Cuda Error : out of memory ExceptionObject caught with writer->Update() in file /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 itk::ExceptionObject (0x18e3460) Location: "unknown" File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h Line: 55 Description: Cuda Error : out of memory #### I take from this that I'm out of memory on the GPU. Is that correct? The GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be in order to get a typical Varian reconstruction to run without the lowmem option. On a side note, I know that the cuda option is working because it's a lot quicker than hardware="cpu", despite only having 96 cuda cores. Another question I'd like to ask is if anyone can shed some light on useful values for I-zero, wpc, scatter etc. With thanks in advance, Dave. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Oct 15 03:09:05 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 15 Oct 2015 09:09:05 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Without the lowmem flag all projection images may be loaded into graphics memory at once causing an out-of-memory issues. You can also check this thread: http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html Regards, Chao 2015-10-14 22:27 GMT+02:00 sco user : > Hi > > I'm a new user to RTK. > I've been able to perform reconstructions of the Catphan and my own copies > of Varian CBCT images with some success. I enabled the CUDA flags when > making RTK so as to take advantage of the capabilities of my GPU. > > When I use --hardware="cuda" with the rtkfdk application, I have found > that I must specify the lowmem option in order to get the reconstruction to > run successfully. If I don't use lowmem, I get the following error: > > #### > Reconstructing and writing... > /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ > unknown : Cuda Error : out of memory > > ExceptionObject caught with writer->Update() in file > /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 > > itk::ExceptionObject (0x18e3460) > Location: "unknown" > File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h > Line: 55 > Description: Cuda Error : out of memory > #### > > I take from this that I'm out of memory on the GPU. Is that correct? The > GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be > in order to get a typical Varian reconstruction to run without the lowmem > option. > > On a side note, I know that the cuda option is working because it's a lot > quicker than hardware="cpu", despite only having 96 cuda cores. > > > Another question I'd like to ask is if anyone can shed some light on > useful values for I-zero, wpc, scatter etc. > > With thanks in advance, > Dave. > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Thu Oct 15 03:52:25 2015 From: itkhelpacc at gmail.com (vishal k) Date: Thu, 15 Oct 2015 13:22:25 +0530 Subject: [Rtk-users] Need some help with Projection of 3D CT data Message-ID: hi, Im working on a CT data set using ITK.. Im trying to come up with a registration algorithm for fluoroscopy image obtained from C-Arm taken at some angle wrt to the patient and the projection of CT data taken at the same angle as that of the C-arm.. i need to change the angles of projection and the focal length of the source from time to time for my study.. I was wondering if i could do that using RTK? If yes, could you tell me where I find information that is relevant to my problem..Thank you Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 15 05:11:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:11:00 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Regarding the parameters (I-zero, wpc, scatter etc), we still need to create wiki pages to describe this (as agreed on during the Jul 31 meeting ). In the meantime, you'll find some info in each filter documentation. You can go to the projection pre-processing filter , look at the (complex) clickable graph and try to navigate in it. For example, I0 is for the LUTbasedVariableI0RawToAttenuationImageFilter and (therefore), inapplicable to Varian data as is. I'll keep the mailing list posted when we add info to the wiki. Good luck, Simon On Thu, Oct 15, 2015 at 9:09 AM, Chao Wu wrote: > Hi Dave, > > Without the lowmem flag all projection images may be loaded into graphics > memory at once causing an out-of-memory issues. > You can also check this thread: > http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html > > Regards, > Chao > > 2015-10-14 22:27 GMT+02:00 sco user : > >> Hi >> >> I'm a new user to RTK. >> I've been able to perform reconstructions of the Catphan and my own >> copies of Varian CBCT images with some success. I enabled the CUDA flags >> when making RTK so as to take advantage of the capabilities of my GPU. >> >> When I use --hardware="cuda" with the rtkfdk application, I have found >> that I must specify the lowmem option in order to get the reconstruction to >> run successfully. If I don't use lowmem, I get the following error: >> >> #### >> Reconstructing and writing... >> /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ >> unknown : Cuda Error : out of memory >> >> ExceptionObject caught with writer->Update() in file >> /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 >> >> itk::ExceptionObject (0x18e3460) >> Location: "unknown" >> File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h >> Line: 55 >> Description: Cuda Error : out of memory >> #### >> >> I take from this that I'm out of memory on the GPU. Is that correct? The >> GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be >> in order to get a typical Varian reconstruction to run without the lowmem >> option. >> >> On a side note, I know that the cuda option is working because it's a lot >> quicker than hardware="cpu", despite only having 96 cuda cores. >> >> >> Another question I'd like to ask is if anyone can shed some light on >> useful values for I-zero, wpc, scatter etc. >> >> With thanks in advance, >> Dave. >> >> >> _______________________________________________ >> 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 Thu Oct 15 05:33:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:33:42 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Yes, RTK can certainly do things like that. Start with a simple geometry following the example Forward projection of the wiki and maybe come back to us with more precise questions? Good luck, Simon On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: > hi, > Im working on a CT data set using ITK.. Im trying to come up with a > registration algorithm for fluoroscopy image obtained from C-Arm taken at > some angle wrt to the patient and the projection of CT data taken at the > same angle as that of the C-arm.. i need to change the angles of projection > and the focal length of the source from time to time for my study.. I was > wondering if i could do that using RTK? If yes, could you tell me where I > find information that is relevant to my problem..Thank you > Regards > > _______________________________________________ > Rtk-users mailing 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 Oct 15 05:49:16 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:49:16 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Hi, Please stick to the mailing list. That's exactly what I understood and my previous answer is still valid. Simon On Thu, Oct 15, 2015 at 11:47 AM, vishal k wrote: > hi Simon, > Thanks for ur advice..sorry i couldn't explain it properly...here my > problem explained in detail.. I have to register 3D ct data with > Fluoroscopy image obtained during surgery.. the problem is that they use > different co-ordinate systems.. I thought since i can obtained the C arm > position using the DICOM tags (source to patient distance etc), i could use > these positions values to obtain forward projection of the CT data.. after > doing this I feel my registering the forward projection image and the > actual fluoroscopy image(obtained during the surgery) would be easier...Please > advice me if there is any better way to deal this problem.. > Regards > Vishal > > On Thu, Oct 15, 2015 at 3:03 PM, Simon Rit > wrote: > >> Yes, RTK can certainly do things like that. Start with a simple geometry >> following the example Forward projection >> of the >> wiki and maybe come back to us with more >> precise questions? >> Good luck, >> Simon >> >> On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: >> >>> hi, >>> Im working on a CT data set using ITK.. Im trying to come up with a >>> registration algorithm for fluoroscopy image obtained from C-Arm taken at >>> some angle wrt to the patient and the projection of CT data taken at the >>> same angle as that of the C-arm.. i need to change the angles of projection >>> and the focal length of the source from time to time for my study.. I was >>> wondering if i could do that using RTK? If yes, could you tell me where I >>> find information that is relevant to my problem..Thank you >>> Regards >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnthibault at gmail.com Thu Oct 15 07:55:17 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Thu, 15 Oct 2015 13:55:17 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Thank you very much Simon for this advice, I should have read more carefully the recent posts about FFTWF / FFTWD. Now that Itk has been rebuilt using these flags, I no longer experience the previous problem. Unfortunately, when reconstructing with the CPU version of FDK, it seems that, although Ramp filtering and backprojection now do work very well, I still have issues with the weighting filter of FDK. As I am not familiar with analytic reconstruction methods, I don't know if the geometric parameters that are generated by the import method of Reg23ProjectionGeometry are consistant with the high variability of the gain factor applied to my projection by FDKWeightProjectionFilter: Just a short example: When using the following geometric parameters: SrcToCenter -1045.84 SrcToDet -1261.02 srcOffX 6.56918 srcOffY 6.56918 ProjOffX -151.44 ProjOffY -151.44 => FDKWeighting filter outputs an image that has a mean of -1.518 with a standard deviation of 2.056 with minimum value of -6.130 and maximum value of 1.871 On a frame where the source offset seems to be a little bit lower, I have the following gemetric parameters: SrcToCenter -1042.66 SrcToDet -1257.4 srcOffX 1.25469 srcOffY 1.25469 ProjOffX -150.321 ProjOffY -150.321 => FDKWeighting filter outputs an image that has a mean of -4.279E-4 with a standard deviation of 5.786E-4 with minimum value of -0.005 and maximum value of 5.268E-4 For comparison, our attenuation images in input of FDK have a mean of 0.8 with a standard deviation of 1.09 with minimum value of -1 and maximum value of 3.262. Here the negative values of attenuation arise from a problem while approximating the I0 in our images, although we should work on that problem, it was not that critical in SART reconstruction. I am surprised by such an important difference in gain applied to projection, given that, when disabling manually this weighting filter in RTK code, RampFiltering and BackProjection alone provided visually good reconstruction results. If you have any idea of what could have gone wrong in the process of importing geometry and/or applying weighting filter, I would be glad to hear it. Thank you in advance. Kind regards Thibault Notargiacomo 2015-10-14 18:58 GMT+02:00 Simon Rit : > Hi Thibault, > No, there is not really a log system that would allow you debugging at run > time. You can compile a debug version that would enable a lot of messages > related to the pipeline. For this, I think you need to use NDEBUG at > compilation (it's an ITK mechanism that I never use). > No, it's not normal that you see an error message. There are two things: > - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it > only handles power of 2/3/5 dimensions and it's slow. I always advise > people to use FFTW by turning on ITK_USE_FFTW options during ITK's > compilation. > - I don't fully understand why vnl doesn't work either. I understand the > first two dimensions, for vnl (which I strongly suggest to not use), I pad > to the next power of 2 so > 780 * 2 (for zero padding) -> 2048 > 780 -> 1024 > but then, if you use 64 projections, why 11? Are you sure the second input > image to FDKConeBeamReconstructionImageFilter has the dimension you want? I > would try to connect input 2 to an itk::ImageFileWriter and check what are > the dimensions of this image. If you're absolutely sure, then I'll try to > reproduce and fix the issue. > Simon > > On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < > gnthibault at gmail.com> wrote: > >> Dear all, >> >> I recently had troubles while trying to rewrite my code, linked with >> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >> well, to using fdk reconstruction method. >> >> My first question: is there a general way to enable maximum debug log >> level at runtime in rtk ? >> >> My second question, is more specific: is it normal that I see such error >> message coming from itk when using FDKConeBeamReconstructionFilter : >> >> ExceptionObject caught with fdk->Update() in file [...] >> >> itk::ExceptionObject (0x7f377c020cb0) >> Location: "unknown" >> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >> Line: 416 >> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >> during SingleMethodExecute >> >> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >> Cannot compute FFT of image with size [2048, 1024, 11]. >> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >> size in each dimension has a prime factorization consisting of only 2s, 3s, >> or 5s. >> >> I suppose that this error arise while performing ramp filtering, but I >> see no relation between FFT configuration stated in the error log ( [2048, >> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >> projections. >> >> I also tried with 200 projection and I had the same problem, but with >> [2048, 1024, 34] >> >> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >> to the total number of projection in my dataset every time. >> >> The revision I am currently using: >> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >> Merge: 578cf89 09d820c >> >> >> Thank you in advance for your help. >> >> Regards >> >> Thibault Notargiacomo >> >> _______________________________________________ >> Rtk-users mailing 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 Oct 15 10:50:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 16:50:30 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Interesting... I never used a geometry with negative sdd and sid but that's the issue here in my opinion. I did a quick test with positive and negative sdd/sid and that does not work for me either. Can you make them positive somehow? BTW, do you still use a modified version of the reg23 and can you share it? Thanks, Simon PS: the script I used for the test: rtksimulatedgeometry \ -o g \ -n 360 \ --sdd 1500 \ --sid 1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o pos.mha -g g rtksimulatedgeometry \ -o g \ -n 360 \ --sdd -1500 \ --sid -1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o neg.mha -g g On Thu, Oct 15, 2015 at 1:55 PM, Notargiacomo Thibault wrote: > Thank you very much Simon for this advice, I should have read more > carefully the recent posts about FFTWF / FFTWD. > > Now that Itk has been rebuilt using these flags, I no longer experience > the previous problem. > Unfortunately, when reconstructing with the CPU version of FDK, it seems > that, although Ramp filtering and backprojection now do work very well, I > still have issues with the weighting filter of FDK. > > As I am not familiar with analytic reconstruction methods, I don't know if > the geometric parameters that are generated by the import method of > Reg23ProjectionGeometry are consistant with the high variability of the > gain factor applied to my projection by FDKWeightProjectionFilter: > > Just a short example: > When using the following geometric parameters: > > SrcToCenter -1045.84 > SrcToDet -1261.02 > srcOffX 6.56918 > srcOffY 6.56918 > ProjOffX -151.44 > ProjOffY -151.44 > > => FDKWeighting filter outputs an image that has a mean of -1.518 with a > standard deviation of 2.056 with minimum value of -6.130 and maximum > value of 1.871 > > > On a frame where the source offset seems to be a little bit lower, I have > the following gemetric parameters: > > SrcToCenter -1042.66 > SrcToDet -1257.4 > srcOffX 1.25469 > srcOffY 1.25469 > ProjOffX -150.321 > ProjOffY -150.321 > > => FDKWeighting filter outputs an image that has a mean of -4.279E-4 > with a standard deviation of 5.786E-4 with minimum value of -0.005 and > maximum value of 5.268E-4 > > For comparison, our attenuation images in input of FDK have a mean of 0.8 > with a standard deviation of 1.09 with minimum value of -1 and maximum > value of 3.262. > > Here the negative values of attenuation arise from a problem while > approximating the I0 in our images, although we should work on that > problem, it was not that critical in SART reconstruction. > > I am surprised by such an important difference in gain applied to > projection, given that, when disabling manually this weighting filter in > RTK code, RampFiltering and BackProjection alone provided visually good > reconstruction results. > > If you have any idea of what could have gone wrong in the process of > importing geometry and/or applying weighting filter, I would be glad to > hear it. > > Thank you in advance. > > Kind regards > > Thibault Notargiacomo > > > > > > > > > 2015-10-14 18:58 GMT+02:00 Simon Rit : > >> Hi Thibault, >> No, there is not really a log system that would allow you debugging at >> run time. You can compile a debug version that would enable a lot of >> messages related to the pipeline. For this, I think you need to use NDEBUG >> at compilation (it's an ITK mechanism that I never use). >> No, it's not normal that you see an error message. There are two things: >> - the FFT of itk (compiled by default, based on vnl) is really bad IMO: >> it only handles power of 2/3/5 dimensions and it's slow. I always advise >> people to use FFTW by turning on ITK_USE_FFTW options during ITK's >> compilation. >> - I don't fully understand why vnl doesn't work either. I understand the >> first two dimensions, for vnl (which I strongly suggest to not use), I pad >> to the next power of 2 so >> 780 * 2 (for zero padding) -> 2048 >> 780 -> 1024 >> but then, if you use 64 projections, why 11? Are you sure the second >> input image to FDKConeBeamReconstructionImageFilter has the dimension you >> want? I would try to connect input 2 to an itk::ImageFileWriter and check >> what are the dimensions of this image. If you're absolutely sure, then I'll >> try to reproduce and fix the issue. >> Simon >> >> On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < >> gnthibault at gmail.com> wrote: >> >>> Dear all, >>> >>> I recently had troubles while trying to rewrite my code, linked with >>> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >>> well, to using fdk reconstruction method. >>> >>> My first question: is there a general way to enable maximum debug log >>> level at runtime in rtk ? >>> >>> My second question, is more specific: is it normal that I see such error >>> message coming from itk when using FDKConeBeamReconstructionFilter : >>> >>> ExceptionObject caught with fdk->Update() in file [...] >>> >>> itk::ExceptionObject (0x7f377c020cb0) >>> Location: "unknown" >>> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >>> Line: 416 >>> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >>> during SingleMethodExecute >>> >>> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >>> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >>> Cannot compute FFT of image with size [2048, 1024, 11]. >>> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >>> size in each dimension has a prime factorization consisting of only 2s, 3s, >>> or 5s. >>> >>> I suppose that this error arise while performing ramp filtering, but I >>> see no relation between FFT configuration stated in the error log ( [2048, >>> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >>> projections. >>> >>> I also tried with 200 projection and I had the same problem, but with >>> [2048, 1024, 34] >>> >>> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >>> to the total number of projection in my dataset every time. >>> >>> The revision I am currently using: >>> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >>> Merge: 578cf89 09d820c >>> >>> >>> Thank you in advance for your help. >>> >>> Regards >>> >>> Thibault Notargiacomo >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 03:12:36 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 09:12:36 +0200 Subject: [Rtk-users] Question about the geometry Message-ID: Dear all. Hello again. I writing to you again because I need some help to understand how to declare the geometry of the system. Cyril redirected me towards this document ( http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a lot, but unfortunately it has not been enough to make me reconstruct a tomogram. I have attached a drawing of my setup (setup.jpg). The source-to-detector distance is around 1600 mm. I just rotate the sample instead of the source, and the sample-detector distance is 15 cm which makes the isocenter distance 1450. The field of view is around 2 cm. The aligned projections are located here: https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 and the raw tiffs are here: https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 I would say the input data looks as nice, but when reconstructing I'm still just getting noise: This is how I perform my "reconstruction" # 361 projections from 0 to 360 degrees. The source-detector distance is 1.6 m and the # sample-detector distance is 15 cm # I have tried with many variations of --ssd and --sid but I think they all look the same rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o c:\Work\out_dir\geometry_real.xml # make a mha file out of the tiff files rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output c:\Work\out_dir\cylinder-a.mha --regexp .tif # "Reconstruct" the data. rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 The result can be viewed in the recon_result.PNG attachment. The reconstrcution can be found here: https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 Can someone please help me what I am doing wrong? best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: setup.jpg Type: image/jpeg Size: 29527 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: recon_result.PNG Type: image/png Size: 239196 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 06:09:04 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 12:09:04 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Is the origin and spacing of your projection data correct? What is your projection pixel size? Regards, Chao 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger : > Dear all. Hello again. > > I writing to you again because I need some help to understand how to > declare the geometry of the system. > > Cyril redirected me towards this document ( > http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > lot, but unfortunately it has not been enough to make me reconstruct a > tomogram. > > I have attached a drawing of my setup (setup.jpg). The > source-to-detector distance is around 1600 mm. I just rotate the > sample instead of the source, and the sample-detector distance is 15 > cm which makes the isocenter distance 1450. The field of view is > around 2 cm. > > The aligned projections are located here: > https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > and the raw tiffs are here: > https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > > I would say the input data looks as nice, but when reconstructing I'm > still just getting noise: > > This is how I perform my "reconstruction" > > # 361 projections from 0 to 360 degrees. The source-detector distance > is 1.6 m and the > # sample-detector distance is 15 cm > # I have tried with many variations of --ssd and --sid but I think > they all look the same > rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > c:\Work\out_dir\geometry_real.xml > > # make a mha file out of the tiff files > rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > c:\Work\out_dir\cylinder-a.mha --regexp .tif > > # "Reconstruct" the data. > rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha -g > c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > > The result can be viewed in the recon_result.PNG attachment. > The reconstrcution can be found here: > https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > > Can someone please help me what I am doing wrong? > > best > > Arvid > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 07:15:25 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 13:15:25 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao. Thank you for the reply. However, I'm not quite sure what you mean by origin and spacing. A pixel on the detector is ~200 microns, and the sample is magnified around 1.3 times. I do understand that having a correct geometry is important to get an output image with correct dimensions, but I do not understand it's so difficult for me to make a single successful reconstruction (possibly with a dummy geometry). best Arvid PS: Just to validate the data I'm testing on I installed Octave and created a sinogram I then ran through its iradon implementation. It seemed to work quite nicely (see attachments). On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > Hi Arvid, > > Is the origin and spacing of your projection data correct? What is your > projection pixel size? > > Regards, Chao > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > : >> >> Dear all. Hello again. >> >> I writing to you again because I need some help to understand how to >> declare the geometry of the system. >> >> Cyril redirected me towards this document ( >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> lot, but unfortunately it has not been enough to make me reconstruct a >> tomogram. >> >> I have attached a drawing of my setup (setup.jpg). The >> source-to-detector distance is around 1600 mm. I just rotate the >> sample instead of the source, and the sample-detector distance is 15 >> cm which makes the isocenter distance 1450. The field of view is >> around 2 cm. >> >> The aligned projections are located here: >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> and the raw tiffs are here: >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> I would say the input data looks as nice, but when reconstructing I'm >> still just getting noise: >> >> This is how I perform my "reconstruction" >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> is 1.6 m and the >> # sample-detector distance is 15 cm >> # I have tried with many variations of --ssd and --sid but I think >> they all look the same >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> c:\Work\out_dir\geometry_real.xml >> >> # make a mha file out of the tiff files >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> # "Reconstruct" the data. >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> The result can be viewed in the recon_result.PNG attachment. >> The reconstrcution can be found here: >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> Can someone please help me what I am doing wrong? >> >> best >> >> Arvid >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: Capture.JPG Type: image/jpeg Size: 58155 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 08:03:16 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 14:03:16 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Since you know how important a correct geometry is, you should understand why you need projection origin and spacing. CT geometry has more parameters than sid and sdd. How big the detector pixel size (spacing) and how the detector is places w.r.t. the central ray (origin) also play a role in the geometry. And in-plane/out-of-plane rotations etc. In your dataset the correct spacing and origin information is not stored correctly in the projection data, so the total geometry is wrong. I have tested your data with the following command line and it gives meaningful image. The newspacing and neworigin arguments force rtkfdk to accept spacing and origin information of projections from command line instead of from the data. Also I change the spacing of the volume from 2 to 0.2 because your object is small. rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 Apparently there is still some misalignment between this guessed geometry and the real geometry, which you need to figure out with your own hardware. Regards, Chao 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Hi Chao. > > Thank you for the reply. However, I'm not quite sure what you mean by > origin and spacing. > A pixel on the detector is ~200 microns, and the sample is magnified > around 1.3 times. > > I do understand that having a correct geometry is important to get an > output image with correct dimensions, but I do not understand it's so > difficult for me to make a single successful reconstruction (possibly > with a dummy geometry). > > best > > Arvid > > PS: Just to validate the data I'm testing on I installed Octave and > created a sinogram I then ran through its iradon implementation. It > seemed to work quite nicely (see attachments). > > On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > > Hi Arvid, > > > > Is the origin and spacing of your projection data correct? What is your > > projection pixel size? > > > > Regards, Chao > > > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Dear all. Hello again. > >> > >> I writing to you again because I need some help to understand how to > >> declare the geometry of the system. > >> > >> Cyril redirected me towards this document ( > >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> lot, but unfortunately it has not been enough to make me reconstruct a > >> tomogram. > >> > >> I have attached a drawing of my setup (setup.jpg). The > >> source-to-detector distance is around 1600 mm. I just rotate the > >> sample instead of the source, and the sample-detector distance is 15 > >> cm which makes the isocenter distance 1450. The field of view is > >> around 2 cm. > >> > >> The aligned projections are located here: > >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> and the raw tiffs are here: > >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> > >> I would say the input data looks as nice, but when reconstructing I'm > >> still just getting noise: > >> > >> This is how I perform my "reconstruction" > >> > >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> is 1.6 m and the > >> # sample-detector distance is 15 cm > >> # I have tried with many variations of --ssd and --sid but I think > >> they all look the same > >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> c:\Work\out_dir\geometry_real.xml > >> > >> # make a mha file out of the tiff files > >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> > >> # "Reconstruct" the data. > >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> > >> The result can be viewed in the recon_result.PNG attachment. > >> The reconstrcution can be found here: > >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> > >> Can someone please help me what I am doing wrong? > >> > >> best > >> > >> Arvid > >> > >> _______________________________________________ > >> Rtk-users mailing 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 Fri Oct 16 08:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 16 Oct 2015 14:15:43 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Thanks a lot Chao, I'm so glad that someone else than me did this! Just as a side note, Arvid, if you don't understand what is the origin and the spacing, look at the ITK software guide section 4.1.4, this is VERY important. Simon On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > Hi Arvid, > > Since you know how important a correct geometry is, you should understand > why you need projection origin and spacing. > CT geometry has more parameters than sid and sdd. How big the detector > pixel size (spacing) and how the detector is places w.r.t. the central ray > (origin) also play a role in the geometry. And in-plane/out-of-plane > rotations etc. > In your dataset the correct spacing and origin information is not stored > correctly in the projection data, so the total geometry is wrong. > > I have tested your data with the following command line and it gives > meaningful image. The newspacing and neworigin arguments force rtkfdk to > accept spacing and origin information of projections from command line > instead of from the data. Also I change the spacing of the volume from 2 to > 0.2 because your object is small. > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha > -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 > --newspacing=0.2 --neworigin=-20,-20 > > Apparently there is still some misalignment between this guessed geometry > and the real geometry, which you need to figure out with your own hardware. > > Regards, > Chao > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < > bottiger at gmail.com>: > >> Hi Chao. >> >> Thank you for the reply. However, I'm not quite sure what you mean by >> origin and spacing. >> A pixel on the detector is ~200 microns, and the sample is magnified >> around 1.3 times. >> >> I do understand that having a correct geometry is important to get an >> output image with correct dimensions, but I do not understand it's so >> difficult for me to make a single successful reconstruction (possibly >> with a dummy geometry). >> >> best >> >> Arvid >> >> PS: Just to validate the data I'm testing on I installed Octave and >> created a sinogram I then ran through its iradon implementation. It >> seemed to work quite nicely (see attachments). >> >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >> > Hi Arvid, >> > >> > Is the origin and spacing of your projection data correct? What is your >> > projection pixel size? >> > >> > Regards, Chao >> > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> > : >> >> >> >> Dear all. Hello again. >> >> >> >> I writing to you again because I need some help to understand how to >> >> declare the geometry of the system. >> >> >> >> Cyril redirected me towards this document ( >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> >> lot, but unfortunately it has not been enough to make me reconstruct a >> >> tomogram. >> >> >> >> I have attached a drawing of my setup (setup.jpg). The >> >> source-to-detector distance is around 1600 mm. I just rotate the >> >> sample instead of the source, and the sample-detector distance is 15 >> >> cm which makes the isocenter distance 1450. The field of view is >> >> around 2 cm. >> >> >> >> The aligned projections are located here: >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> >> and the raw tiffs are here: >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> >> >> I would say the input data looks as nice, but when reconstructing I'm >> >> still just getting noise: >> >> >> >> This is how I perform my "reconstruction" >> >> >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> >> is 1.6 m and the >> >> # sample-detector distance is 15 cm >> >> # I have tried with many variations of --ssd and --sid but I think >> >> they all look the same >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> >> c:\Work\out_dir\geometry_real.xml >> >> >> >> # make a mha file out of the tiff files >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> >> >> # "Reconstruct" the data. >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> >> c:\Work\out_dir\cylinder_a_recon.mha -g >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> >> >> The result can be viewed in the recon_result.PNG attachment. >> >> The reconstrcution can be found here: >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> >> >> Can someone please help me what I am doing wrong? >> >> >> >> best >> >> >> >> Arvid >> >> >> >> _______________________________________________ >> >> 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 bottiger at gmail.com Fri Oct 16 08:33:38 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 14:33:38 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao Wu Thank you very much! This is definitely something I can use in order to move forward. I'm not trying to make the best possible reconstruction out of this dataset, but just have something that works so I can start playing around and get familiar with RTK. Which I do have now. And to Simon: Thanks for the link. bets Arvid On Fri, Oct 16, 2015 at 2:15 PM, Simon Rit wrote: > Thanks a lot Chao, I'm so glad that someone else than me did this! > Just as a side note, Arvid, if you don't understand what is the origin and > the spacing, look at the ITK software guide section 4.1.4, this is VERY > important. > Simon > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: >> >> Hi Arvid, >> >> Since you know how important a correct geometry is, you should understand >> why you need projection origin and spacing. >> CT geometry has more parameters than sid and sdd. How big the detector >> pixel size (spacing) and how the detector is places w.r.t. the central ray >> (origin) also play a role in the geometry. And in-plane/out-of-plane >> rotations etc. >> In your dataset the correct spacing and origin information is not stored >> correctly in the projection data, so the total geometry is wrong. >> >> I have tested your data with the following command line and it gives >> meaningful image. The newspacing and neworigin arguments force rtkfdk to >> accept spacing and origin information of projections from command line >> instead of from the data. Also I change the spacing of the volume from 2 to >> 0.2 because your object is small. >> >> rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml >> --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 >> >> Apparently there is still some misalignment between this guessed geometry >> and the real geometry, which you need to figure out with your own hardware. >> >> Regards, >> Chao >> >> >> 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> : >>> >>> Hi Chao. >>> >>> Thank you for the reply. However, I'm not quite sure what you mean by >>> origin and spacing. >>> A pixel on the detector is ~200 microns, and the sample is magnified >>> around 1.3 times. >>> >>> I do understand that having a correct geometry is important to get an >>> output image with correct dimensions, but I do not understand it's so >>> difficult for me to make a single successful reconstruction (possibly >>> with a dummy geometry). >>> >>> best >>> >>> Arvid >>> >>> PS: Just to validate the data I'm testing on I installed Octave and >>> created a sinogram I then ran through its iradon implementation. It >>> seemed to work quite nicely (see attachments). >>> >>> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >>> > Hi Arvid, >>> > >>> > Is the origin and spacing of your projection data correct? What is your >>> > projection pixel size? >>> > >>> > Regards, Chao >>> > >>> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >>> > : >>> >> >>> >> Dear all. Hello again. >>> >> >>> >> I writing to you again because I need some help to understand how to >>> >> declare the geometry of the system. >>> >> >>> >> Cyril redirected me towards this document ( >>> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >>> >> lot, but unfortunately it has not been enough to make me reconstruct a >>> >> tomogram. >>> >> >>> >> I have attached a drawing of my setup (setup.jpg). The >>> >> source-to-detector distance is around 1600 mm. I just rotate the >>> >> sample instead of the source, and the sample-detector distance is 15 >>> >> cm which makes the isocenter distance 1450. The field of view is >>> >> around 2 cm. >>> >> >>> >> The aligned projections are located here: >>> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >>> >> and the raw tiffs are here: >>> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >>> >> >>> >> I would say the input data looks as nice, but when reconstructing I'm >>> >> still just getting noise: >>> >> >>> >> This is how I perform my "reconstruction" >>> >> >>> >> # 361 projections from 0 to 360 degrees. The source-detector distance >>> >> is 1.6 m and the >>> >> # sample-detector distance is 15 cm >>> >> # I have tried with many variations of --ssd and --sid but I think >>> >> they all look the same >>> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >>> >> c:\Work\out_dir\geometry_real.xml >>> >> >>> >> # make a mha file out of the tiff files >>> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >>> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >>> >> >>> >> # "Reconstruct" the data. >>> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >>> >> c:\Work\out_dir\cylinder_a_recon.mha -g >>> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >>> >> >>> >> The result can be viewed in the recon_result.PNG attachment. >>> >> The reconstrcution can be found here: >>> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >>> >> >>> >> Can someone please help me what I am doing wrong? >>> >> >>> >> best >>> >> >>> >> Arvid >>> >> >>> >> _______________________________________________ >>> >> 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 simon.rit at creatis.insa-lyon.fr Tue Oct 20 14:38:24 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 20 Oct 2015 20:38:24 +0200 Subject: [Rtk-users] using RTK with projection matrices and projection images In-Reply-To: References: Message-ID: Dear Shiras Abdurahman, It's better to email the mailing so that everybody can participate our discussion. We developped a tool to do this a while ago but it's never made it to the public repo. I have enclosed it if you want to have a look but it does what you want I think. The part of interest for you is how the variable matProj is converted to an RTK geometry. We'll try to clean it and push it to the main repo in November if you can't figure out how to use it. Good luck! Simon On Tue, Oct 20, 2015 at 5:07 PM, shiras abdurahman < shiras.abdurahman at gmail.com> wrote: > Dear Dr. Rit, > > My name is Shiras Abdurahman and I am a PhD student at ovgu Magdeburg, > Germany. Currently, I am working in tomographic reconstruction and I > started to using RTK. I have projection images and corresponding projection > matrices. I want to reconstruct volume with RTK. Is it possible to set > projection matrices directly and reconstruct the volume. Or do I need to > decompose first and get intrinsic and extrinsic parameters especially > rotation angles and use addProjection function? > I know that geometry can be read from xml file. > > Thank you for your time and patience. > > With regards, > Shiras Abdurahman > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rtkthales.cxx Type: text/x-c++src Size: 9360 bytes Desc: not available URL: From wuchao04 at gmail.com Mon Oct 26 16:30:58 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 26 Oct 2015 21:30:58 +0100 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Well, that's just some guess. I assume the central ray goes towards the center of your detector, so the origin should be denoted as somewhere near (- half_width, - half_height) in millimeter. Then I just fine-tune it manually a little bit to get a little bit better results... Regards, Chao 2015-10-26 19:44 GMT+01:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Dear Chao. > > I am very thankful for the help you provided me some days ago on the > RTK mailing list. However, I have a quick followup question for you, > which I have not been able to learn by reading the (very long) manual > another user provided me with. > > I am now working on another dataset, and get similar artifact when > reconstructing. Could you please help understand why you picked the > parameters you did? I guess the "spacing" is pixel size, but why did > why you pick "neworigin" to be -20,-20 ? > > best > > Arvid > > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > > Hi Arvid, > > > > Since you know how important a correct geometry is, you should understand > > why you need projection origin and spacing. > > CT geometry has more parameters than sid and sdd. How big the detector > pixel > > size (spacing) and how the detector is places w.r.t. the central ray > > (origin) also play a role in the geometry. And in-plane/out-of-plane > > rotations etc. > > In your dataset the correct spacing and origin information is not stored > > correctly in the projection data, so the total geometry is wrong. > > > > I have tested your data with the following command line and it gives > > meaningful image. The newspacing and neworigin arguments force rtkfdk to > > accept spacing and origin information of projections from command line > > instead of from the data. Also I change the spacing of the volume from 2 > to > > 0.2 because your object is small. > > > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > > c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml > > --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 > > > > Apparently there is still some misalignment between this guessed geometry > > and the real geometry, which you need to figure out with your own > hardware. > > > > Regards, > > Chao > > > > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Hi Chao. > >> > >> Thank you for the reply. However, I'm not quite sure what you mean by > >> origin and spacing. > >> A pixel on the detector is ~200 microns, and the sample is magnified > >> around 1.3 times. > >> > >> I do understand that having a correct geometry is important to get an > >> output image with correct dimensions, but I do not understand it's so > >> difficult for me to make a single successful reconstruction (possibly > >> with a dummy geometry). > >> > >> best > >> > >> Arvid > >> > >> PS: Just to validate the data I'm testing on I installed Octave and > >> created a sinogram I then ran through its iradon implementation. It > >> seemed to work quite nicely (see attachments). > >> > >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > >> > Hi Arvid, > >> > > >> > Is the origin and spacing of your projection data correct? What is > your > >> > projection pixel size? > >> > > >> > Regards, Chao > >> > > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > >> > : > >> >> > >> >> Dear all. Hello again. > >> >> > >> >> I writing to you again because I need some help to understand how to > >> >> declare the geometry of the system. > >> >> > >> >> Cyril redirected me towards this document ( > >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> >> lot, but unfortunately it has not been enough to make me reconstruct > a > >> >> tomogram. > >> >> > >> >> I have attached a drawing of my setup (setup.jpg). The > >> >> source-to-detector distance is around 1600 mm. I just rotate the > >> >> sample instead of the source, and the sample-detector distance is 15 > >> >> cm which makes the isocenter distance 1450. The field of view is > >> >> around 2 cm. > >> >> > >> >> The aligned projections are located here: > >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> >> and the raw tiffs are here: > >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> >> > >> >> I would say the input data looks as nice, but when reconstructing I'm > >> >> still just getting noise: > >> >> > >> >> This is how I perform my "reconstruction" > >> >> > >> >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> >> is 1.6 m and the > >> >> # sample-detector distance is 15 cm > >> >> # I have tried with many variations of --ssd and --sid but I think > >> >> they all look the same > >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> >> c:\Work\out_dir\geometry_real.xml > >> >> > >> >> # make a mha file out of the tiff files > >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> >> > >> >> # "Reconstruct" the data. > >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> >> > >> >> The result can be viewed in the recon_result.PNG attachment. > >> >> The reconstrcution can be found here: > >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> >> > >> >> Can someone please help me what I am doing wrong? > >> >> > >> >> best > >> >> > >> >> Arvid > >> >> > >> >> _______________________________________________ > >> >> Rtk-users mailing 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 Wed Oct 28 11:47:13 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Wed, 28 Oct 2015 16:47:13 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter Message-ID: <5630EE01.5070900@cppm.in2p3.fr> Hello everyone, I have a question/suggestion about the set of rtkDraw*ImageFilter. This filter are written as additive filters: for example, in rtkDrawEllipsoidImageFilter.txx, we can find for(..) itOut.Set( ellipsoid.density + itIn.Get() ) instead of for(..) itOut.Set( ellipsoid.density ) I think it can be more flexible the second option, because we can always associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. Moreover, the rtkDrawGeometricPhantomImageFilter class already uses itkAddImageFilter in order to have additive filters (which is redundant in current situation). What do you think ? Regards From shiraska at gmail.com Wed Oct 28 13:12:36 2015 From: shiraska at gmail.com (Shiras Abdurahman) Date: Wed, 28 Oct 2015 18:12:36 +0100 Subject: [Rtk-users] Filtered projection images Message-ID: Hi, I want to access processed projections especially filtered projections which are used for backprojection. Is it possible in RTK? Shiras -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 28 15:52:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:52:10 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: <5630EE01.5070900@cppm.in2p3.fr> References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: Hi Mathieu, Thanks for pointing this out. I agree that it might not be the best solution, yet one could argue that you could simply create a constant image with 0 to do what you'd like from the current implementation. My main problem is that I just tried to do what you suggest and some tests then fail... which shows the obvious, it's not a backward compatible change. I see two solutions: - keep it as is and you use ConstantImageFilter + we remove useless add filters, - a more complex but maybe more elegant solution: add a third template parameter for the operation that would allow the user to do what he'd like in a functor. That's what's done with filters that derive from itk::UnaryImageFilter . The default would be itk::Add2 but we could find or implement another one that simply discards the pixel value. What do you think? Simon PS: looking in the code, I just found that rtk::DrawConeImageFilter is not consistent with the others, it was always setting to 0 outside... that's been fixed! On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont wrote: > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. This > filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can always > associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is redundant in > current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > Rtk-users mailing 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 Oct 28 15:53:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:53:25 +0100 Subject: [Rtk-users] Filtered projection images In-Reply-To: References: Message-ID: Hi, I guess you mean filtered projections that are used in filtered backprojections algorithm? The filter you are looking for is rtk::FFTRampImageFilter which implements the ramp filter. There is a command line tool that can do it, rtkramp. Regards, Simon On Wed, Oct 28, 2015 at 6:12 PM, Shiras Abdurahman wrote: > Hi, > > I want to access processed projections especially filtered projections > which are used for backprojection. Is it possible in RTK? > > Shiras > > _______________________________________________ > Rtk-users mailing 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 Fri Oct 30 06:56:50 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Fri, 30 Oct 2015 11:56:50 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: <56334CF2.8070902@cppm.in2p3.fr> Hi, In case of your first solution, you can not chain several Draw*ImageFilters. For example, if you want to create small cylinders in a big cylinder. Your second solution is better. One another solution can be a thing like itk:SpatialObject but more simpler. An rtk::SpatialObject which one function (isInside(point)). We create a rtkDrawImageFilter class and implement ThreadedGenerateData like this : DrawImageFilter::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType itkNotUsed(threadId) { ... while( !itOut.IsAtEnd() ) { this->GetInput()->TransformIndexToPhysicalPoint(itOut.GetIndex(), point); if(m_rtkSpatialObject.isInside(point) itOut.Set(m_rtkFillFunctor(density, itIn.Get()); ... } DrawConeImageFilter class can be a child of this new DrawImageFilter (with new methods like setAngle, SetRadius which will adjust the rtkConeSpatialObject) This solution suppress duplicated code in Draw*ImageFilter::ThreadedGenerateData and makes easier implementation of another type of filling. On 28/10/2015 20:52, Simon Rit wrote: > Hi Mathieu, > Thanks for pointing this out. I agree that it might not be the best > solution, yet one could argue that you could simply create a constant > image with 0 to do what you'd like from the current implementation. My > main problem is that I just tried to do what you suggest and some tests > then fail... which shows the obvious, it's not a backward compatible change. > I see two solutions: > - keep it as is and you use ConstantImageFilter + we remove useless add > filters, > - a more complex but maybe more elegant solution: add a third template > parameter for the operation that would allow the user to do what he'd > like in a functor. That's what's done with filters that derive from > itk::UnaryImageFilter > . > The default would be itk::Add2 but we could find or implement another > one that simply discards the pixel value. > What do you think? > Simon > > PS: looking in the code, I just found that rtk::DrawConeImageFilter is > not consistent with the others, it was always setting to 0 outside... > that's been fixed! > > On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont > wrote: > > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. > This filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can > always associate Draw*ImageFilter and itkAddImageFilter to get an > additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is > redundant in current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > 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 Oct 1 02:18:53 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 08:18:53 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng wrote: > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: From cyril.mory at uclouvain.be Thu Oct 1 04:02:23 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Thu, 01 Oct 2015 10:02:23 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> Message-ID: <560CE88F.5030807@uclouvain.be> Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I'm using windows system (windows7 64 with VS 2013) and > I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with "ITK + FFTW" in > windows system? > > I'm just trying to use *rtkextractshroudsignal* and it seems to > require FFTW library externally. > > When I tried to use FFTW 3.3.4, I've encountered link errors as shown > below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > I'm running on Ubuntu 14.04 LTS and used the distribution library > (FFTW 3.3.3). If you're running on a Debian-based linux system, you > can also install the full development library set using the following > command: */sudo apt-get install libfftw3-3 libfftw3-dev/*. Then just > make sure that these libraries are being used by rerunning CCMake. > > I'm not quite sure about the error being thrown in your build, but > perhaps one of the main developers would be able to provide some more > insight into the issue. > > Hope this helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK > with those options on as you suggested. > > I've tried to use the up-to-date version of FFTW (3.3.4), but it > seems that it doesn't work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved external > symbol __imp_fftw_execute referenced in function "protected: > virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully using in > which system(Windows or Linux)? > > Thanks. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 6:56 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the inclusion of the > Fast Fourier Transform components. This requires compilation with > the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn't compile that way > initially, and it took a little bit of time to figure out. > > Hope that helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I'm now compiling itk-4.8 to use that feature since I've found > my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 4:31 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success since my > initial posting -- in fact I'm currently working on a new > method for accomplishing this task in certain challenging cases. > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase > signal output when called using the '-p' flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA/* > > From what I've experienced, this generally provides a good > signal [0,1) characterizing the respiratory phase using the > default settings. Occasionally, I've run into issues where > the default 'unsharpness' parameter needs to be adjusted to > give a clear signal (by appending the*--unsharp ##*flag to the > command). On more challenging shroud images -- notably, those > with little detectable signal from background -- additional > contrast-enhancement by pre-processing of the shroud has > assisted in signal extraction. > > I hope that helps -- and please let me know how it works out > for you. > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I've encountered exactly same issue and it would > be highly appreciated if you can share with me your > updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:*Rtk-users > [mailto:rtk-users-bounces at public.kitware.com]*On Behalf > Of*Joel Beaudry > *Sent:*Tuesday, March 17, 2015 5:25 PM > *To:*Matthew J. Riblett > > *Cc:*rtk-users at public.kitware.com > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but > I've had good success with using a Hilbert function in > python (scipy). I'm sure that Matlab has an equivalent > function, and maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett > > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a straightforward method > of going from the results of the rtkamsterdamshroud > and rtkextractshroudsignal applications to a [0,1) > phase signal for performing motion-compensated > reconstruction. I've been following along with the > MC-CBCT Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is used to > process the should signal prior to feeding it back > into the reconstruction application, but there is no > mention of how this is accomplished. I'm trying to > implement this into an automated workflow and I'd love > to know how this was accomplished. > > Thanks! > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > _______________________________________________ > 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 WEICHENG.SHEN at leidos.com Thu Oct 1 10:57:56 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Thu, 1 Oct 2015 14:57:56 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: image004.png Type: image/png Size: 15591 bytes Desc: image004.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 15591 bytes Desc: image001.png URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 1 11:23:48 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 17:23:48 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng wrote: > Hello Simon, > > > > Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside > RTK, the following error message appears: > > > > > ================================================================================================ > > > > CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): > By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project > has asked CMake to find a package configuration file provided by > "Gengetopt", but CMake did not find one. > > Could not find a package configuration file provided by "Gengetopt" with > any of the following names: > > GengetoptConfig.cmake > gengetopt-config.cmake > > Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set > "Gengetopt_DIR" to a directory containing one of the above files. If > "Gengetopt" provides a separate development package or SDK, be sure it has > been installed. > > > > > ================================================================================================ > > > > It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake > or gengetopt-config.cmake. I did a manual search for these files in the RTK > directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH > in the cmake GUI when performing configuration. The value of > CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln > file can now be successfully generated. > > > > Next I need to build the project using Visual Studio 2013. > > > > Thanks you very much for your help! > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Thursday, October 01, 2015 2:19 AM > *To:* Shen, Weicheng > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Unknown CMake command "WRAP_GGO" > > > > Hi, > > WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use > WRAP_GGO in an external project you need to do the same as in > applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the > easiest, to start with, is to build the rtktutorialapplication in the RTK > project. > > Let us know if that answered your problem, > > Simon > > > > On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: > > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 15591 bytes Desc: not available URL: From theday79 at gmail.com Thu Oct 1 17:33:51 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 1 Oct 2015 17:33:51 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <560CE88F.5030807@uclouvain.be> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> Message-ID: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park ; 'Matthew J. Riblett' ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I'm using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with "ITK + FFTW" in windows system? I'm just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I've encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I'm running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you're running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I'm not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I've tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn't work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn't compile that way initially, and it took a little bit of time to figure out. Hope that helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I'm now compiling itk-4.8 to use that feature since I've found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting - in fact I'm currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the '-p' flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I've experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I've run into issues where the default 'unsharpness' parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images - notably, those with little detectable signal from background - additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps - and please let me know how it works out for you. - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I've encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I've been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I'm trying to implement this into an automated workflow and I'd love to know how this was accomplished. Thanks! - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 joelbeaudry at gmail.com Thu Oct 1 17:40:30 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Thu, 1 Oct 2015 14:40:30 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Cyril, After trying out a few attempts, it seems like some values play nicer than others. Could it be an issue with floating point comparisons with the spacing and/or origins? It might explain why certain values seem to work (1.5) and others do not (0.88). I'll look at what values are being compared and get back to you. Thanks, Joel On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry wrote: > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 > spacing) and re-creating a mask off of that. So the motion mask should have > the same dimensions, spacing, and origin as the intended 4D image since I'm > using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating > my mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I created for > 160 (2), worked but not the case of 512 (0.88), and let you know what I > find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > wrote: > >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the small paragraph after >> the cuda command line : >> >> Note that the reconstructed volume in this example does not fully contain >> the attenuating object, causing hyper-attenuation artifacts on the borders >> of the result. To avoid these artifacts, reconstruct a larger volume >> (--dimension 256) should be fine. *Note that you will have to resize >> your motion mask as well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and allow any motion mask, >> but until I do, you can resize your motion mask using the CLITK tools ( >> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other datasets and it >> seems to be working. I need to increase the resolution and play around with >> the parameters now. >> >> I haven't had time to test it too much, but I do get an error when >> attempting to reconstruct with different dimensions. I'm using Cuda, and >> haven't tried it with just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >> AverageOutOfROIImageFilter: information of ROI image does not match input >> image" >> >> I'll be able to test some other things later and list more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line parameters AND data). Can >>> you restart it from scratch and let me know if you still have problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>> coordinates >>> - the regularization parameters (gamma space and gamma time) were way >>> too high. The regularization with a high gamma-time caused frames to be >>> identical, while it should only discourage variations >>> >>> I hope it works, now. If it doesn't work for you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and indeed, there are >>> several mistakes in it. I am working on correcting them. I'll keep you >>> posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>> >>> Hi RTK-users, >>> >>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>> example. The 5 frames should show some differences pertaining to patient >>> motion but the ones that I'm producing are identical, so no motion is >>> visible. >>> >>> Has anyone been able to follow the example and the provided dataset to >>> create a 4D image? >>> >>> Thanks, >>> Joel >>> >>> >>> _______________________________________________ >>> 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 Fri Oct 2 02:44:21 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 2 Oct 2015 08:44:21 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Joel, Can you explain how you created your mask? Looking at the code, it seems to me that if you create a 4D image with RTK, create a mask from this image with exactly the same meta info and pass it to ROOSTER, that should work in all cases. If I were you, I would compare the two mhd files (of the mask and the 4D image you used to create it) and verify that the meta info is exactly the same. For ROOSTER, I suggest to add an interpolation when the information is not inconsistent, e.g., in the main() function. I can do it if you agree Cyril. Simon On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry wrote: > Hi Cyril, > > After trying out a few attempts, it seems like some values play nicer than > others. Could it be an issue with floating point comparisons with the > spacing and/or origins? It might explain why certain values seem to work > (1.5) and others do not (0.88). I'll look at what values are being compared > and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >> spacing) and re-creating a mask off of that. So the motion mask should have >> the same dimensions, spacing, and origin as the intended 4D image since I'm >> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >> my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the mask I created >> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >> find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> Good to hear it's working now. >>> The error you get is explained on the wiki in the small paragraph after >>> the cuda command line : >>> >>> Note that the reconstructed volume in this example does not fully >>> contain the attenuating object, causing hyper-attenuation artifacts on the >>> borders of the result. To avoid these artifacts, reconstruct a larger >>> volume (--dimension 256) should be fine. *Note that you will have to >>> resize your motion mask as well, as 3D the motion mask is expected to have >>> the same size, spacing and origin as the first 3 dimensions of the 4D >>> output. * >>> >>> I guess I should take some time to fix that, and allow any motion mask, >>> but until I do, you can resize your motion mask using the CLITK tools ( >>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>> >>> Cyril >>> >>> >>> >>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other datasets and it >>> seems to be working. I need to increase the resolution and play around with >>> the parameters now. >>> >>> I haven't had time to test it too much, but I do get an error when >>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>> haven't tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>> AverageOutOfROIImageFilter: information of ROI image does not match input >>> image" >>> >>> I'll be able to test some other things later and list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> I have fixed the wiki example (command line parameters AND data). Can >>>> you restart it from scratch and let me know if you still have problems ? >>>> >>>> Roughly, the problems were the following: >>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>> coordinates >>>> - the regularization parameters (gamma space and gamma time) were way >>>> too high. The regularization with a high gamma-time caused frames to be >>>> identical, while it should only discourage variations >>>> >>>> I hope it works, now. If it doesn't work for you, please keep asking >>>> Cyril >>>> >>>> >>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki example, and indeed, there are >>>> several mistakes in it. I am working on correcting them. I'll keep you >>>> posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>> example. The 5 frames should show some differences pertaining to patient >>>> motion but the ones that I'm producing are identical, so no motion is >>>> visible. >>>> >>>> Has anyone been able to follow the example and the provided dataset to >>>> create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 cyril.mory at uclouvain.be Fri Oct 2 03:53:14 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 02 Oct 2015 09:53:14 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: <560E37EA.1060702@uclouvain.be> Indeed, resampling the mask if needed, to the correct size, spacing, origin and direction, seems the simplest way to deal with this issue. But I would do it in the filter rather than in the application, so that anything built on top of ROOSTER (i.e. incremental ROOSTER, or the rtkfourdroostertest) also benefits from it. Feel free to do it if you want, otherwise I'll take care of it next week :) On 10/02/2015 08:44 AM, Simon Rit wrote: > Hi Joel, > Can you explain how you created your mask? Looking at the code, it > seems to me that if you create a 4D image with RTK, create a mask from > this image with exactly the same meta info and pass it to ROOSTER, > that should work in all cases. If I were you, I would compare the two > mhd files (of the mask and the 4D image you used to create it) and > verify that the meta info is exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is > not inconsistent, e.g., in the main() function. I can do it if you > agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > > Hi Cyril, > > After trying out a few attempts, it seems like some values play > nicer than others. Could it be an issue with floating point > comparisons with the spacing and/or origins? It might explain why > certain values seem to work (1.5) and others do not (0.88). I'll > look at what values are being compared and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > > wrote: > > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions > 512 (0.88 spacing) and re-creating a mask off of that. So the > motion mask should have the same dimensions, spacing, and > origin as the intended 4D image since I'm using 4D rooster > with --dimension 512 --spacing 0.88. Perhaps I'm creating my > mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I > created for 160 (2), worked but not the case of 512 (0.88), > and let you know what I find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > > wrote: > > Hi Joel, > > Good to hear it's working now. > The error you get is explained on the wiki in the small > paragraph after the cuda command line : > > Note that the reconstructed volume in this example does > not fully contain the attenuating object, causing > hyper-attenuation artifacts on the borders of the result. > To avoid these artifacts, reconstruct a larger volume > (--dimension 256) should be fine. *Note that you will have > to resize your motion mask as well, as 3D the motion mask > is expected to have the same size, spacing and origin as > the first 3 dimensions of the 4D output. * > > I guess I should take some time to fix that, and allow any > motion mask, but until I do, you can resize your motion > mask using the CLITK tools > (http://www.creatis.insa-lyon.fr/rio/vv) or any method > that suits you. > > Cyril > > > > On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other >> datasets and it seems to be working. I need to increase >> the resolution and play around with the parameters now. >> >> I haven't had time to test it too much, but I do get an >> error when attempting to reconstruct with different >> dimensions. I'm using Cuda, and haven't tried it with >> just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws >> "In AverageOutOfROIImageFilter: information of ROI image >> does not match input image" >> >> I'll be able to test some other things later and list >> more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> I have fixed the wiki example (command line >> parameters AND data). Can you restart it from scratch >> and let me know if you still have problems ? >> >> Roughly, the problems were the following: >> - the "mm_50.mha" motion mask file was not aligned >> with the CBCT coordinates >> - the regularization parameters (gamma space and >> gamma time) were way too high. The regularization >> with a high gamma-time caused frames to be identical, >> while it should only discourage variations >> >> I hope it works, now. If it doesn't work for you, >> please keep asking >> Cyril >> >> >> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and >>> indeed, there are several mistakes in it. I am >>> working on correcting them. I'll keep you posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the >>>> 4DROOSTERReconstruction example. The 5 frames >>>> should show some differences pertaining to patient >>>> motion but the ones that I'm producing are >>>> identical, so no motion is visible. >>>> >>>> Has anyone been able to follow the example and the >>>> provided dataset to create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 joelbeaudry at gmail.com Fri Oct 2 12:31:38 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Fri, 2 Oct 2015 09:31:38 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: <560E37EA.1060702@uclouvain.be> References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: Hi Simon and Cyril, @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) and then use itkSnap to create a mask from that 3D image. I then use that mask as the input for ROOSTER, to which I again use the same spacing/dimensions. For some values it seems to work and other it doesn't. I'm wondering if itkSnap is truncating the spacing/dimension/origins when I save my mask, and perhaps why something like (160,2,-159) works but (511,0.88,-224.84). I'll take a look at the metadata. I'll try resampling my masks and like you said that should probably fix my issues. Thanks for the help, Joel On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory wrote: > Indeed, resampling the mask if needed, to the correct size, spacing, > origin and direction, seems the simplest way to deal with this issue. > But I would do it in the filter rather than in the application, so that > anything built on top of ROOSTER (i.e. incremental ROOSTER, or the > rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: > > Hi Joel, > Can you explain how you created your mask? Looking at the code, it seems > to me that if you create a 4D image with RTK, create a mask from this image > with exactly the same meta info and pass it to ROOSTER, that should work in > all cases. If I were you, I would compare the two mhd files (of the mask > and the 4D image you used to create it) and verify that the meta info is > exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is not > inconsistent, e.g., in the main() function. I can do it if you agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values play nicer >> than others. Could it be an issue with floating point comparisons with the >> spacing and/or origins? It might explain why certain values seem to work >> (1.5) and others do not (0.88). I'll look at what values are being compared >> and get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> wrote: >> >>> Hi Cyril, >>> >>> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >>> spacing) and re-creating a mask off of that. So the motion mask should have >>> the same dimensions, spacing, and origin as the intended 4D image since I'm >>> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >>> my mask incorrectly? >>> >>> I'll try and fiddle with it a bit later and see why the mask I created >>> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >>> find. >>> >>> Thanks again, >>> Joel >>> >>> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> Good to hear it's working now. >>>> The error you get is explained on the wiki in the small paragraph after >>>> the cuda command line : >>>> >>>> Note that the reconstructed volume in this example does not fully >>>> contain the attenuating object, causing hyper-attenuation artifacts on the >>>> borders of the result. To avoid these artifacts, reconstruct a larger >>>> volume (--dimension 256) should be fine. *Note that you will have to >>>> resize your motion mask as well, as 3D the motion mask is expected to have >>>> the same size, spacing and origin as the first 3 dimensions of the 4D >>>> output. * >>>> >>>> I guess I should take some time to fix that, and allow any motion mask, >>>> but until I do, you can resize your motion mask using the CLITK tools ( >>>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>>> >>>> Cyril >>>> >>>> >>>> >>>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>>> >>>> Hi Cyril, >>>> >>>> Works like a charm, thanks! I tried it on some other datasets and it >>>> seems to be working. I need to increase the resolution and play around with >>>> the parameters now. >>>> >>>> I haven't had time to test it too much, but I do get an error when >>>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>>> haven't tried it with just cpu reconstruction yet. >>>> >>>> i.e.) >>>> --dimension 160 --spacing 2 -> works >>>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>>> AverageOutOfROIImageFilter: information of ROI image does not match input >>>> image" >>>> >>>> I'll be able to test some other things later and list more details. >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> >>>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>>> wrote: >>>> >>>>> Hi Joel, >>>>> >>>>> I have fixed the wiki example (command line parameters AND data). Can >>>>> you restart it from scratch and let me know if you still have problems ? >>>>> >>>>> Roughly, the problems were the following: >>>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>>> coordinates >>>>> - the regularization parameters (gamma space and gamma time) were way >>>>> too high. The regularization with a high gamma-time caused frames to be >>>>> identical, while it should only discourage variations >>>>> >>>>> I hope it works, now. If it doesn't work for you, please keep asking >>>>> Cyril >>>>> >>>>> >>>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>>> >>>>> Hi Joel, >>>>> >>>>> I have just tried to reproduce the wiki example, and indeed, there are >>>>> several mistakes in it. I am working on correcting them. I'll keep you >>>>> posted. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>>> example. The 5 frames should show some differences pertaining to patient >>>>> motion but the ones that I'm producing are identical, so no motion is >>>>> visible. >>>>> >>>>> Has anyone been able to follow the example and the provided dataset to >>>>> create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 WEICHENG.SHEN at leidos.com Fri Oct 2 22:11:05 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Sat, 3 Oct 2015 02:11:05 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977222@EMP-EXMR104.corp.leidos.com> Hi Simon, Yes, if I run the CMake at the root of RTK, the example builds successfully. Thanks you very much! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 11:24 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng > wrote: Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: 15587 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 15591 bytes Desc: image002.png URL: From simon.rit at creatis.insa-lyon.fr Mon Oct 5 01:45:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 5 Oct 2015 07:45:06 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Oct 5 13:53:11 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 5 Oct 2015 13:53:11 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error1_using_ITK_FFT.png Type: image/png Size: 17214 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error in code.png Type: image/png Size: 21974 bytes Desc: not available URL: From cyril.mory at uclouvain.be Tue Oct 6 08:08:35 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Tue, 06 Oct 2015 14:08:35 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: <5613B9C3.4070309@uclouvain.be> Hi Joel, I have just pushed a fix for this issue: in the 4DROOSTER filter, I have added a resample filter between the ROI input and the AverageOutOfROIImageFilter. On my side, it runs fine. Let me know if it fixes the issue on your side. Thanks for pointing this out, Cyril On 10/02/2015 06:31 PM, Joel Beaudry wrote: > Hi Simon and Cyril, > > @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) > and then use itkSnap to create a mask from that 3D image. I then use > that mask as the input for ROOSTER, to which I again use the same > spacing/dimensions. For some values it seems to work and other it > doesn't. I'm wondering if itkSnap is truncating the > spacing/dimension/origins when I save my mask, and perhaps why > something like (160,2,-159) works but (511,0.88,-224.84). I'll take a > look at the metadata. > > I'll try resampling my masks and like you said that should probably > fix my issues. > > Thanks for the help, > Joel > > On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory > wrote: > > Indeed, resampling the mask if needed, to the correct size, > spacing, origin and direction, seems the simplest way to deal with > this issue. > But I would do it in the filter rather than in the application, so > that anything built on top of ROOSTER (i.e. incremental ROOSTER, > or the rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it > next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: >> Hi Joel, >> Can you explain how you created your mask? Looking at the code, >> it seems to me that if you create a 4D image with RTK, create a >> mask from this image with exactly the same meta info and pass it >> to ROOSTER, that should work in all cases. If I were you, I would >> compare the two mhd files (of the mask and the 4D image you used >> to create it) and verify that the meta info is exactly the same. >> For ROOSTER, I suggest to add an interpolation when the >> information is not inconsistent, e.g., in the main() function. I >> can do it if you agree Cyril. >> Simon >> >> On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values >> play nicer than others. Could it be an issue with floating >> point comparisons with the spacing and/or origins? It might >> explain why certain values seem to work (1.5) and others do >> not (0.88). I'll look at what values are being compared and >> get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with >> dimensions 512 (0.88 spacing) and re-creating a mask off >> of that. So the motion mask should have the same >> dimensions, spacing, and origin as the intended 4D image >> since I'm using 4D rooster with --dimension 512 --spacing >> 0.88. Perhaps I'm creating my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the >> mask I created for 160 (2), worked but not the case of >> 512 (0.88), and let you know what I find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the >> small paragraph after the cuda command line : >> >> Note that the reconstructed volume in this example >> does not fully contain the attenuating object, >> causing hyper-attenuation artifacts on the borders of >> the result. To avoid these artifacts, reconstruct a >> larger volume (--dimension 256) should be fine. *Note >> that you will have to resize your motion mask as >> well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 >> dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and >> allow any motion mask, but until I do, you can resize >> your motion mask using the CLITK tools >> (http://www.creatis.insa-lyon.fr/rio/vv) or any >> method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other >>> datasets and it seems to be working. I need to >>> increase the resolution and play around with the >>> parameters now. >>> >>> I haven't had time to test it too much, but I do get >>> an error when attempting to reconstruct with >>> different dimensions. I'm using Cuda, and haven't >>> tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> >>> throws "In AverageOutOfROIImageFilter: information >>> of ROI image does not match input image" >>> >>> I'll be able to test some other things later and >>> list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> >> > wrote: >>> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line >>> parameters AND data). Can you restart it from >>> scratch and let me know if you still have >>> problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not >>> aligned with the CBCT coordinates >>> - the regularization parameters (gamma space and >>> gamma time) were way too high. The >>> regularization with a high gamma-time caused >>> frames to be identical, while it should only >>> discourage variations >>> >>> I hope it works, now. If it doesn't work for >>> you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki >>>> example, and indeed, there are several mistakes >>>> in it. I am working on correcting them. I'll >>>> keep you posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the >>>>> 4DROOSTERReconstruction example. The 5 frames >>>>> should show some differences pertaining to >>>>> patient motion but the ones that I'm producing >>>>> are identical, so no motion is visible. >>>>> >>>>> Has anyone been able to follow the example and >>>>> the provided dataset to create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 Oct 6 09:11:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 6 Oct 2015 15:11:27 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park wrote: > Hi Simon, > > > > I?ve just tried to build it without FFTW library, as you have asked. > > > > I have encountered an error as shown in the attached pictures in running > ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, making > FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > > > Hope it helps. > > > > Yang > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Thanks a lot Yang for the detailed report, I'm sure that will be helpful > to many people. For my personal information, did you try to compile FFTW > from ITK as well? If it didn't work, could you let us know what was the > problem? > > Simon > > > > > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Tue Oct 6 10:49:55 2015 From: theday79 at gmail.com (Yang K Park) Date: Tue, 6 Oct 2015 10:49:55 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: <001c01d10046$44941080$cdbc3180$@gmail.com> Hi Simon, It seems that I misunderstood before. This time, I?ve followed your suggestion and encountered an error as follows: H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): fatal error C1083: Cannot open include file: 'fftw3.h': No such file or directory I?ve tested this with itk4.8.1, which is the most up-to-date release version. It seems that I need to specify the external fftw header file (fftw3.h), but the user interface for input does not appear in CMake unless I set ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. I hope this report can help itk developers resolve the issue. Thanks. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Tuesday, October 06, 2015 9:11 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com ] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park > Cc: Cyril Mory >; Matthew J. Riblett >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Tue Oct 6 11:00:16 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Tue, 6 Oct 2015 17:00:16 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <001c01d10046$44941080$cdbc3180$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> <001c01d10046$44941080$cdbc3180$@gmail.com> Message-ID: <5613E200.4050001@kitware.com> Yang, Simon, As I mentioned previously, you cannot build ITK with FFTW on Windows without setting ITK_USE_SYSTEM_FFTW=ON. You should get a warning in CMake specifying this. So the only solution to build ITK with FFTW on Windows is to use an externally compiled version of FFTW. Julien On 06/10/2015 16:49, Yang K Park wrote: > Hi Simon, > > It seems that I misunderstood before. This time, I?ve followed your > suggestion and encountered an error as follows: > > H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): > fatal error C1083: Cannot open include file: 'fftw3.h': No such file or > directory > > I?ve tested this with itk4.8.1, which is the most up-to-date release > version. > > It seems that I need to specify the external fftw header file (fftw3.h), > but the user interface for input does not appear in CMake unless I set > ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. > > I hope this report can help itk developers resolve the issue. > > Thanks. > > Yang > > *From:*simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of > *Simon Rit > *Sent:* Tuesday, October 06, 2015 9:11 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett > ; rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks Yang. I think I wasn't clear but what I meant was not to disable > FFTW but to compile and use FFTW in ITK by using > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=OFF > > instead of what I think you used > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=ON > > Julien Jomier from Kitware told me that both configurations worked for > him but your initial message suggests that the first did not work for > you. If you can confirm and explain your config (ITK version, compiler, > etc.). > > Simon > > PS: your test is useful anyway, I'll try to make the error message > clearer when FFTW is not used. > > On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: > > Hi Simon, > > I?ve just tried to build it without FFTW library, as you have asked. > > I have encountered an error as shown in the attached pictures in > running ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, > making FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > Hope it helps. > > Yang > > *From:*simon.rit at gmail.com > [mailto:simon.rit at gmail.com ] *On Behalf > Of *Simon Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > > *Cc:* Cyril Mory >; Matthew J. Riblett > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks a lot Yang for the detailed report, I'm sure that will be > helpful to many people. For my personal information, did you try to > compile FFTW from ITK as well? If it didn't work, could you let us > know what was the problem? > > Simon > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: > > Hi Cyril, > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally > succeeded. > > Following is the final version of my instruction. > > Thanks. > > Yang > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very > convenient! I really like it. Thanks for your hard works on this. > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > 1.Prepare fftw library files > > a.Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b.Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c.Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command > Prompt) > > d.Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e.Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > 2.Cmake for ITK > > a.Configure > > b.Turn on the following and reconfigure > > i.ITK_USE_SYSTEM_FFTW (mandatory to make the following options > appear) > > c.Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i.FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 > > ii.FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii.FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv.FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. > > d."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e.Reconfigure, Generate > > 3.Build ITK with Visual Studio > > a.In both Debug and Release > > 4.Cmake for RTK > > a.Default settings were used. > > b."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > 5.Build RTK using Visual Studio > > 6.Copy dll files to RTK bin folders > > a.Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b.To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7.Build RTK with Visual Studio > > *From:*Cyril Mory [mailto:cyril.mory at uclouvain.be > ] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park >; 'Matthew J. Riblett' > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam > Shroud > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just > have to activate it in the CMake options. On Windows, you cannot > do that. I do not have a clue why, but you cannot. You have to > install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled > DLLs from http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the > .lib files (that is absolutely necessary). You may have to run > the "lib.exe" program from the VS developer prompt instead of > the standard windows cmd.exe prompt. Specify you CPU > architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, > and you should be fine. I have successfully compiled this with > BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it > matters. > > If it works for you, then you might want to play around with the > other FFTW .lib files, and send on this mailing list a more > complete set of CMAKE options that works. I have tried some > other combinations without success, so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS > 2013) and I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with ?ITK + > FFTW? in windows system? > > I?m just trying to use *rtkextractshroudsignal* and it seems > to require FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors > as shown below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > I?m running on Ubuntu 14.04 LTS and used the distribution > library (FFTW 3.3.3). If you?re running on a Debian-based > linux system, you can also install the full development > library set using the following command: */sudo apt-get > install libfftw3-3 libfftw3-dev/*. Then just make sure that > these libraries are being used by rerunning CCMake. > > I?m not quite sure about the error being thrown in your > build, but perhaps one of the main developers would be able > to provide some more insight into the issue. > > Hope this helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to > compile ITK with those options on as you suggested. > > I?ve tried to use the up-to-date version of FFTW > (3.3.4), but it seems that it doesn?t work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved > external symbol __imp_fftw_execute referenced in > function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully > using in which system(Windows or Linux)? > > Thanks. > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the > inclusion of the Fast Fourier Transform components. > This requires compilation with the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that > way initially, and it took a little bit of time to > figure out. > > Hope that helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since > I?ve found my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data > from Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success > since my initial posting ? in fact I?m currently > working on a new method for accomplishing this task > in certain challenging cases. > > The most recent version of RTK provides an update to > the rtkextractshroudsignal application which > provides a phase signal output when called using the > ?-p? flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o > raw_signal.txt -p phase_signal.txt --method > LINEAR_BETWEEN_MINIMA/* > > From what I?ve experienced, this generally provides > a good signal [0,1) characterizing the respiratory > phase using the default settings. Occasionally, > I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear > signal (by appending the *--unsharp ##* flag to the > command). On more challenging shroud images ? > notably, those with little detectable signal from > background ? additional contrast-enhancement by > pre-processing of the shroud has assisted in signal > extraction. > > I hope that helps ? and please let me know how it > works out for you. > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue > and it would be highly appreciated if you can > share with me your updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical > School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:* Rtk-users > [mailto:rtk-users-bounces at public.kitware.com] > *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > > > *Cc:* rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal > data from Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab > script, but I've had good success with using a > Hilbert function in python (scipy). I'm sure > that Matlab has an equivalent function, and > maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. > Riblett > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a > straightforward method of going from the > results of the rtkamsterdamshroud and > rtkextractshroudsignal applications to a > [0,1) phase signal for performing > motion-compensated reconstruction. I?ve > been following along with the MC-CBCT > Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is > used to process the should signal prior to > feeding it back into the reconstruction > application, but there is no mention of how > this is accomplished. I?m trying to > implement this into an automated workflow > and I?d love to know how this was accomplished. > > Thanks! > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > > MCV Office Phone: +1.804.628.4858 > > > > _______________________________________________ > 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 > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From bottiger at gmail.com Mon Oct 12 05:42:20 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 11:42:20 +0200 Subject: [Rtk-users] Reconstruction problems Message-ID: Hi there I hope someone can help me me get started with RTK. First of all I should mention that I have compiled RTK on Windows 7 using Visual Studio 2013. Everything seems to compile and run just fine. Secondly: I tried to reproduce this example: http://wiki.openrtk.org/index.php/RTK/Scripts/FDK This was somewhat successful - I think. I could generate some projections, and reconstruct them. However, it just looks like an egg and not like a Shepp Logan phantom. See attachment. However, I'm unsure if this is expected or not. I took some homemade projections (of a small cylinder) and converted them into a MHA file (using rtkprojections.exe). The file looks correct in ImageJ. The dimensions are 370 pixels * 195 pixels * 361 projections You can get the file here: https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 The problem is that the reconstruction is wrong (see cylinder_recon). It looks like the dimensions are not read correctly, but I am unsure how I fix that? The rtkfdk.exe has a single --dimension parameter, but I am unsure which dimension that is suppose to be, but neither 195, 370 or any other value I could think of works for me. I hope someone can help me in the right direction. best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: SheppLogan.PNG Type: image/png Size: 150153 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cylinder_recon.PNG Type: image/png Size: 128472 bytes Desc: not available URL: From ghostcz at hotmail.com Mon Oct 12 05:54:44 2015 From: ghostcz at hotmail.com (louie L) Date: Mon, 12 Oct 2015 11:54:44 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Hi, You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? Cheers, Louie Sent from my iOS > On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 05:59:38 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 11:59:38 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: References: Message-ID: <561B848A.9090406@uclouvain.be> Hi Arvid, Well, you're on the right track :-) Your Shepp Logan reconstruction looks fine, I guess it is just a visualization problem: you can use vv http://www.creatis.insa-lyon.fr/rio/vv to open it and you will be able to change the "window" and "level" settings in visualization. Regarding the cylinder, can you send your geometry file too ? Regards Cyril Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Mon Oct 12 06:35:27 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:35:27 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: <561B848A.9090406@uclouvain.be> References: <561B848A.9090406@uclouvain.be> Message-ID: Hey Cyril I just wrote another e-mail about how I generated the geometry file (it's just simulated). But just in case I'll attach it here: best Arvid On Mon, Oct 12, 2015 at 11:59 AM, Cyril Mory wrote: > Hi Arvid, > > Well, you're on the right track :-) > Your Shepp Logan reconstruction looks fine, I guess it is just a > visualization problem: you can use vv > http://www.creatis.insa-lyon.fr/rio/vv > to open it and you will be able to change the "window" and "level" > settings in visualization. > > Regarding the cylinder, can you send your geometry file too ? > > Regards > Cyril > > Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example:http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here:https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > > > ------------------------------ > [image: Avast logo] > > L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le > logiciel antivirus Avast. > www.avast.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry360.xml Type: text/xml Size: 134495 bytes Desc: not available URL: From bottiger at gmail.com Mon Oct 12 06:36:03 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:36:03 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Sure. I'll admit I have yet to understand the specifics of the geometry file. Currently I just used a simulated one because that was what the SheppLogan example used, and the input projections looked similar. Here is a complete list of the commands I executed: rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 I did not do anything to the contrast and that is most likely the issue. I downloaded and installed vv and I can see some (very unclear) features inside the SheppLogan reconstruction - so that's nice. However, currently I'm mostly interested in getting the geometry right :) best On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: > Hi, > > You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? > > Cheers, > Louie > > Sent from my iOS > >> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >> >> Hi there >> >> I hope someone can help me me get started with RTK. >> >> First of all I should mention that I have compiled RTK on Windows 7 >> using Visual Studio 2013. Everything seems to compile and run just >> fine. >> >> Secondly: I tried to reproduce this example: >> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >> >> This was somewhat successful - I think. I could generate some >> projections, and reconstruct them. However, it just looks like an egg >> and not like a Shepp Logan phantom. See attachment. >> >> However, I'm unsure if this is expected or not. I took some homemade >> projections (of a small cylinder) and converted them into a MHA file >> (using rtkprojections.exe). The file looks correct in ImageJ. The >> dimensions are 370 pixels * 195 pixels * 361 projections >> >> You can get the file here: >> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >> >> The problem is that the reconstruction is wrong (see cylinder_recon). >> It looks like the dimensions are not read correctly, but I am unsure >> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >> I am unsure which dimension that is suppose to be, but neither 195, >> 370 or any other value I could think of works for me. >> >> I hope someone can help me in the right direction. >> >> best >> >> Arvid >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 15:52:10 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 21:52:10 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: <561C0F6A.6080602@uclouvain.be> Hi Arvid, Unfortunately, you cannot do that. You have to obtain the exact geometry of this particular acquisition from the cone beam device you used. If you need help to convert it to the RTK format, well, that's something you can ask for on this mailing list. Can you get the geometry data ? Regards, Cyril Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : > Sure. > > I'll admit I have yet to understand the specifics of the geometry > file. Currently I just used a simulated one because that was what the > SheppLogan example used, and the input projections looked similar. > > Here is a complete list of the commands I executed: > > rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml > > rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ > --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif > > rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o > c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g > c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 > > I did not do anything to the contrast and that is most likely the > issue. I downloaded and installed vv and I can see some (very unclear) > features inside the SheppLogan reconstruction - so that's nice. > However, currently I'm mostly interested in getting the geometry right :) > > best > > On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >> Hi, >> >> You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? >> >> Cheers, >> Louie >> >> Sent from my iOS >> >>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >>> >>> Hi there >>> >>> I hope someone can help me me get started with RTK. >>> >>> First of all I should mention that I have compiled RTK on Windows 7 >>> using Visual Studio 2013. Everything seems to compile and run just >>> fine. >>> >>> Secondly: I tried to reproduce this example: >>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>> >>> This was somewhat successful - I think. I could generate some >>> projections, and reconstruct them. However, it just looks like an egg >>> and not like a Shepp Logan phantom. See attachment. >>> >>> However, I'm unsure if this is expected or not. I took some homemade >>> projections (of a small cylinder) and converted them into a MHA file >>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>> dimensions are 370 pixels * 195 pixels * 361 projections >>> >>> You can get the file here: >>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>> >>> The problem is that the reconstruction is wrong (see cylinder_recon). >>> It looks like the dimensions are not read correctly, but I am unsure >>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>> I am unsure which dimension that is suppose to be, but neither 195, >>> 370 or any other value I could think of works for me. >>> >>> I hope someone can help me in the right direction. >>> >>> best >>> >>> Arvid >>> >>> >>> _______________________________________________ >>> 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 --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From cyril.mory at uclouvain.be Mon Oct 12 16:36:24 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 22:36:24 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: <561C1984.9030509@uclouvain.be> References: <561C1984.9030509@uclouvain.be> Message-ID: <561C19C8.5050304@uclouvain.be> Arvid, You can find a description of the geometry here : http://www.creatis.insa-lyon.fr/~srit/geometry.pdf In rtk/applications, several applications are simple converters from the cone beam manufacturer's raw geometry format to RTK geometry format, so you can also have a look at the code of these apps. If you know that you have an almost parallel beam, you can indeed try to use a dummy geometry file, but be careful: rtksimulatedgeometry generates a cone beam geometry, with large fan and cone angles if you leave the default parameters. You can adjust the 'sdd' and 'sid' options to simulate a very distant source, making rays almost parallel to each other (be careful with numerical precision, though). Hope it helps, Cyril Le 12/10/2015 21:59, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hello Cyril > > Thank you for getting back to me. I do have the geometry (albeit not > right here next to me). > However, my problem was that when I looked in the geometry file, I > didn't find it obvious how to define declare it - is it documented > somewhere? > > That said - the measurements I played around with is measured with an > almost parallel beam. I hoped I could reconstruct it (with minor > artifacts) using a dummy geometry file. > > best > > Arvid > > On Mon, Oct 12, 2015 at 9:52 PM, Cyril Mory wrote: >> Hi Arvid, >> >> Unfortunately, you cannot do that. You have to obtain the exact geometry of >> this particular acquisition from the cone beam device you used. >> If you need help to convert it to the RTK format, well, that's something you >> can ask for on this mailing list. >> Can you get the geometry data ? >> >> Regards, >> Cyril >> >> >> Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : >>> Sure. >>> >>> I'll admit I have yet to understand the specifics of the geometry >>> file. Currently I just used a simulated one because that was what the >>> SheppLogan example used, and the input projections looked similar. >>> >>> Here is a complete list of the commands I executed: >>> >>> rtksimulatedgeometry.exe -n 361 -o >>> c:\Users\aplb\Work\out_dir\geometry360.xml >>> >>> rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ >>> --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif >>> >>> rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o >>> c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g >>> c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 >>> >>> I did not do anything to the contrast and that is most likely the >>> issue. I downloaded and installed vv and I can see some (very unclear) >>> features inside the SheppLogan reconstruction - so that's nice. >>> However, currently I'm mostly interested in getting the geometry right :) >>> >>> best >>> >>> On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >>>> Hi, >>>> >>>> You can specify the size in each dimension. Can you post the arguments >>>> you used for the projections and reconstruction? Did you try to adjust the >>>> contrast of the output? >>>> >>>> Cheers, >>>> Louie >>>> >>>> Sent from my iOS >>>> >>>>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger >>>>> wrote: >>>>> >>>>> Hi there >>>>> >>>>> I hope someone can help me me get started with RTK. >>>>> >>>>> First of all I should mention that I have compiled RTK on Windows 7 >>>>> using Visual Studio 2013. Everything seems to compile and run just >>>>> fine. >>>>> >>>>> Secondly: I tried to reproduce this example: >>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>>>> >>>>> This was somewhat successful - I think. I could generate some >>>>> projections, and reconstruct them. However, it just looks like an egg >>>>> and not like a Shepp Logan phantom. See attachment. >>>>> >>>>> However, I'm unsure if this is expected or not. I took some homemade >>>>> projections (of a small cylinder) and converted them into a MHA file >>>>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>>>> dimensions are 370 pixels * 195 pixels * 361 projections >>>>> >>>>> You can get the file here: >>>>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>>>> >>>>> The problem is that the reconstruction is wrong (see cylinder_recon). >>>>> It looks like the dimensions are not read correctly, but I am unsure >>>>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>>>> I am unsure which dimension that is suppose to be, but neither 195, >>>>> 370 or any other value I could think of works for me. >>>>> >>>>> I hope someone can help me in the right direction. >>>>> >>>>> best >>>>> >>>>> Arvid >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >> >> >> --- >> L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le >> logiciel antivirus Avast. >> https://www.avast.com/antivirus >> --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From gnthibault at gmail.com Wed Oct 14 05:38:46 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Wed, 14 Oct 2015 11:38:46 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter Message-ID: Dear all, I recently had troubles while trying to rewrite my code, linked with libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite well, to using fdk reconstruction method. My first question: is there a general way to enable maximum debug log level at runtime in rtk ? My second question, is more specific: is it normal that I see such error message coming from itk when using FDKConeBeamReconstructionFilter : ExceptionObject caught with fdk->Update() in file [...] itk::ExceptionObject (0x7f377c020cb0) Location: "unknown" File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx Line: 416 Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred during SingleMethodExecute /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): Cannot compute FFT of image with size [2048, 1024, 11]. VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose size in each dimension has a prime factorization consisting of only 2s, 3s, or 5s. I suppose that this error arise while performing ramp filtering, but I see no relation between FFT configuration stated in the error log ( [2048, 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 projections. I also tried with 200 projection and I had the same problem, but with [2048, 1024, 34] Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to the total number of projection in my dataset every time. The revision I am currently using: commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 Merge: 578cf89 09d820c Thank you in advance for your help. Regards Thibault Notargiacomo -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 14 12:58:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 14 Oct 2015 18:58:06 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Hi Thibault, No, there is not really a log system that would allow you debugging at run time. You can compile a debug version that would enable a lot of messages related to the pipeline. For this, I think you need to use NDEBUG at compilation (it's an ITK mechanism that I never use). No, it's not normal that you see an error message. There are two things: - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it only handles power of 2/3/5 dimensions and it's slow. I always advise people to use FFTW by turning on ITK_USE_FFTW options during ITK's compilation. - I don't fully understand why vnl doesn't work either. I understand the first two dimensions, for vnl (which I strongly suggest to not use), I pad to the next power of 2 so 780 * 2 (for zero padding) -> 2048 780 -> 1024 but then, if you use 64 projections, why 11? Are you sure the second input image to FDKConeBeamReconstructionImageFilter has the dimension you want? I would try to connect input 2 to an itk::ImageFileWriter and check what are the dimensions of this image. If you're absolutely sure, then I'll try to reproduce and fix the issue. Simon On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < gnthibault at gmail.com> wrote: > Dear all, > > I recently had troubles while trying to rewrite my code, linked with > libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite > well, to using fdk reconstruction method. > > My first question: is there a general way to enable maximum debug log > level at runtime in rtk ? > > My second question, is more specific: is it normal that I see such error > message coming from itk when using FDKConeBeamReconstructionFilter : > > ExceptionObject caught with fdk->Update() in file [...] > > itk::ExceptionObject (0x7f377c020cb0) > Location: "unknown" > File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx > Line: 416 > Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred > during SingleMethodExecute > > /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: > itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): > Cannot compute FFT of image with size [2048, 1024, 11]. > VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose > size in each dimension has a prime factorization consisting of only 2s, 3s, > or 5s. > > I suppose that this error arise while performing ramp filtering, but I see > no relation between FFT configuration stated in the error log ( [2048, > 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 > projections. > > I also tried with 200 projection and I had the same problem, but with > [2048, 1024, 34] > > Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to > the total number of projection in my dataset every time. > > The revision I am currently using: > commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 > Merge: 578cf89 09d820c > > > Thank you in advance for your help. > > Regards > > Thibault Notargiacomo > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scouser27 at gmail.com Wed Oct 14 16:27:48 2015 From: scouser27 at gmail.com (sco user) Date: Wed, 14 Oct 2015 21:27:48 +0100 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi I'm a new user to RTK. I've been able to perform reconstructions of the Catphan and my own copies of Varian CBCT images with some success. I enabled the CUDA flags when making RTK so as to take advantage of the capabilities of my GPU. When I use --hardware="cuda" with the rtkfdk application, I have found that I must specify the lowmem option in order to get the reconstruction to run successfully. If I don't use lowmem, I get the following error: #### Reconstructing and writing... /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ unknown : Cuda Error : out of memory ExceptionObject caught with writer->Update() in file /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 itk::ExceptionObject (0x18e3460) Location: "unknown" File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h Line: 55 Description: Cuda Error : out of memory #### I take from this that I'm out of memory on the GPU. Is that correct? The GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be in order to get a typical Varian reconstruction to run without the lowmem option. On a side note, I know that the cuda option is working because it's a lot quicker than hardware="cpu", despite only having 96 cuda cores. Another question I'd like to ask is if anyone can shed some light on useful values for I-zero, wpc, scatter etc. With thanks in advance, Dave. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Oct 15 03:09:05 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 15 Oct 2015 09:09:05 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Without the lowmem flag all projection images may be loaded into graphics memory at once causing an out-of-memory issues. You can also check this thread: http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html Regards, Chao 2015-10-14 22:27 GMT+02:00 sco user : > Hi > > I'm a new user to RTK. > I've been able to perform reconstructions of the Catphan and my own copies > of Varian CBCT images with some success. I enabled the CUDA flags when > making RTK so as to take advantage of the capabilities of my GPU. > > When I use --hardware="cuda" with the rtkfdk application, I have found > that I must specify the lowmem option in order to get the reconstruction to > run successfully. If I don't use lowmem, I get the following error: > > #### > Reconstructing and writing... > /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ > unknown : Cuda Error : out of memory > > ExceptionObject caught with writer->Update() in file > /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 > > itk::ExceptionObject (0x18e3460) > Location: "unknown" > File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h > Line: 55 > Description: Cuda Error : out of memory > #### > > I take from this that I'm out of memory on the GPU. Is that correct? The > GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be > in order to get a typical Varian reconstruction to run without the lowmem > option. > > On a side note, I know that the cuda option is working because it's a lot > quicker than hardware="cpu", despite only having 96 cuda cores. > > > Another question I'd like to ask is if anyone can shed some light on > useful values for I-zero, wpc, scatter etc. > > With thanks in advance, > Dave. > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Thu Oct 15 03:52:25 2015 From: itkhelpacc at gmail.com (vishal k) Date: Thu, 15 Oct 2015 13:22:25 +0530 Subject: [Rtk-users] Need some help with Projection of 3D CT data Message-ID: hi, Im working on a CT data set using ITK.. Im trying to come up with a registration algorithm for fluoroscopy image obtained from C-Arm taken at some angle wrt to the patient and the projection of CT data taken at the same angle as that of the C-arm.. i need to change the angles of projection and the focal length of the source from time to time for my study.. I was wondering if i could do that using RTK? If yes, could you tell me where I find information that is relevant to my problem..Thank you Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 15 05:11:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:11:00 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Regarding the parameters (I-zero, wpc, scatter etc), we still need to create wiki pages to describe this (as agreed on during the Jul 31 meeting ). In the meantime, you'll find some info in each filter documentation. You can go to the projection pre-processing filter , look at the (complex) clickable graph and try to navigate in it. For example, I0 is for the LUTbasedVariableI0RawToAttenuationImageFilter and (therefore), inapplicable to Varian data as is. I'll keep the mailing list posted when we add info to the wiki. Good luck, Simon On Thu, Oct 15, 2015 at 9:09 AM, Chao Wu wrote: > Hi Dave, > > Without the lowmem flag all projection images may be loaded into graphics > memory at once causing an out-of-memory issues. > You can also check this thread: > http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html > > Regards, > Chao > > 2015-10-14 22:27 GMT+02:00 sco user : > >> Hi >> >> I'm a new user to RTK. >> I've been able to perform reconstructions of the Catphan and my own >> copies of Varian CBCT images with some success. I enabled the CUDA flags >> when making RTK so as to take advantage of the capabilities of my GPU. >> >> When I use --hardware="cuda" with the rtkfdk application, I have found >> that I must specify the lowmem option in order to get the reconstruction to >> run successfully. If I don't use lowmem, I get the following error: >> >> #### >> Reconstructing and writing... >> /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ >> unknown : Cuda Error : out of memory >> >> ExceptionObject caught with writer->Update() in file >> /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 >> >> itk::ExceptionObject (0x18e3460) >> Location: "unknown" >> File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h >> Line: 55 >> Description: Cuda Error : out of memory >> #### >> >> I take from this that I'm out of memory on the GPU. Is that correct? The >> GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be >> in order to get a typical Varian reconstruction to run without the lowmem >> option. >> >> On a side note, I know that the cuda option is working because it's a lot >> quicker than hardware="cpu", despite only having 96 cuda cores. >> >> >> Another question I'd like to ask is if anyone can shed some light on >> useful values for I-zero, wpc, scatter etc. >> >> With thanks in advance, >> Dave. >> >> >> _______________________________________________ >> 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 Thu Oct 15 05:33:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:33:42 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Yes, RTK can certainly do things like that. Start with a simple geometry following the example Forward projection of the wiki and maybe come back to us with more precise questions? Good luck, Simon On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: > hi, > Im working on a CT data set using ITK.. Im trying to come up with a > registration algorithm for fluoroscopy image obtained from C-Arm taken at > some angle wrt to the patient and the projection of CT data taken at the > same angle as that of the C-arm.. i need to change the angles of projection > and the focal length of the source from time to time for my study.. I was > wondering if i could do that using RTK? If yes, could you tell me where I > find information that is relevant to my problem..Thank you > Regards > > _______________________________________________ > Rtk-users mailing 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 Oct 15 05:49:16 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:49:16 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Hi, Please stick to the mailing list. That's exactly what I understood and my previous answer is still valid. Simon On Thu, Oct 15, 2015 at 11:47 AM, vishal k wrote: > hi Simon, > Thanks for ur advice..sorry i couldn't explain it properly...here my > problem explained in detail.. I have to register 3D ct data with > Fluoroscopy image obtained during surgery.. the problem is that they use > different co-ordinate systems.. I thought since i can obtained the C arm > position using the DICOM tags (source to patient distance etc), i could use > these positions values to obtain forward projection of the CT data.. after > doing this I feel my registering the forward projection image and the > actual fluoroscopy image(obtained during the surgery) would be easier...Please > advice me if there is any better way to deal this problem.. > Regards > Vishal > > On Thu, Oct 15, 2015 at 3:03 PM, Simon Rit > wrote: > >> Yes, RTK can certainly do things like that. Start with a simple geometry >> following the example Forward projection >> of the >> wiki and maybe come back to us with more >> precise questions? >> Good luck, >> Simon >> >> On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: >> >>> hi, >>> Im working on a CT data set using ITK.. Im trying to come up with a >>> registration algorithm for fluoroscopy image obtained from C-Arm taken at >>> some angle wrt to the patient and the projection of CT data taken at the >>> same angle as that of the C-arm.. i need to change the angles of projection >>> and the focal length of the source from time to time for my study.. I was >>> wondering if i could do that using RTK? If yes, could you tell me where I >>> find information that is relevant to my problem..Thank you >>> Regards >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnthibault at gmail.com Thu Oct 15 07:55:17 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Thu, 15 Oct 2015 13:55:17 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Thank you very much Simon for this advice, I should have read more carefully the recent posts about FFTWF / FFTWD. Now that Itk has been rebuilt using these flags, I no longer experience the previous problem. Unfortunately, when reconstructing with the CPU version of FDK, it seems that, although Ramp filtering and backprojection now do work very well, I still have issues with the weighting filter of FDK. As I am not familiar with analytic reconstruction methods, I don't know if the geometric parameters that are generated by the import method of Reg23ProjectionGeometry are consistant with the high variability of the gain factor applied to my projection by FDKWeightProjectionFilter: Just a short example: When using the following geometric parameters: SrcToCenter -1045.84 SrcToDet -1261.02 srcOffX 6.56918 srcOffY 6.56918 ProjOffX -151.44 ProjOffY -151.44 => FDKWeighting filter outputs an image that has a mean of -1.518 with a standard deviation of 2.056 with minimum value of -6.130 and maximum value of 1.871 On a frame where the source offset seems to be a little bit lower, I have the following gemetric parameters: SrcToCenter -1042.66 SrcToDet -1257.4 srcOffX 1.25469 srcOffY 1.25469 ProjOffX -150.321 ProjOffY -150.321 => FDKWeighting filter outputs an image that has a mean of -4.279E-4 with a standard deviation of 5.786E-4 with minimum value of -0.005 and maximum value of 5.268E-4 For comparison, our attenuation images in input of FDK have a mean of 0.8 with a standard deviation of 1.09 with minimum value of -1 and maximum value of 3.262. Here the negative values of attenuation arise from a problem while approximating the I0 in our images, although we should work on that problem, it was not that critical in SART reconstruction. I am surprised by such an important difference in gain applied to projection, given that, when disabling manually this weighting filter in RTK code, RampFiltering and BackProjection alone provided visually good reconstruction results. If you have any idea of what could have gone wrong in the process of importing geometry and/or applying weighting filter, I would be glad to hear it. Thank you in advance. Kind regards Thibault Notargiacomo 2015-10-14 18:58 GMT+02:00 Simon Rit : > Hi Thibault, > No, there is not really a log system that would allow you debugging at run > time. You can compile a debug version that would enable a lot of messages > related to the pipeline. For this, I think you need to use NDEBUG at > compilation (it's an ITK mechanism that I never use). > No, it's not normal that you see an error message. There are two things: > - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it > only handles power of 2/3/5 dimensions and it's slow. I always advise > people to use FFTW by turning on ITK_USE_FFTW options during ITK's > compilation. > - I don't fully understand why vnl doesn't work either. I understand the > first two dimensions, for vnl (which I strongly suggest to not use), I pad > to the next power of 2 so > 780 * 2 (for zero padding) -> 2048 > 780 -> 1024 > but then, if you use 64 projections, why 11? Are you sure the second input > image to FDKConeBeamReconstructionImageFilter has the dimension you want? I > would try to connect input 2 to an itk::ImageFileWriter and check what are > the dimensions of this image. If you're absolutely sure, then I'll try to > reproduce and fix the issue. > Simon > > On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < > gnthibault at gmail.com> wrote: > >> Dear all, >> >> I recently had troubles while trying to rewrite my code, linked with >> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >> well, to using fdk reconstruction method. >> >> My first question: is there a general way to enable maximum debug log >> level at runtime in rtk ? >> >> My second question, is more specific: is it normal that I see such error >> message coming from itk when using FDKConeBeamReconstructionFilter : >> >> ExceptionObject caught with fdk->Update() in file [...] >> >> itk::ExceptionObject (0x7f377c020cb0) >> Location: "unknown" >> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >> Line: 416 >> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >> during SingleMethodExecute >> >> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >> Cannot compute FFT of image with size [2048, 1024, 11]. >> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >> size in each dimension has a prime factorization consisting of only 2s, 3s, >> or 5s. >> >> I suppose that this error arise while performing ramp filtering, but I >> see no relation between FFT configuration stated in the error log ( [2048, >> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >> projections. >> >> I also tried with 200 projection and I had the same problem, but with >> [2048, 1024, 34] >> >> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >> to the total number of projection in my dataset every time. >> >> The revision I am currently using: >> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >> Merge: 578cf89 09d820c >> >> >> Thank you in advance for your help. >> >> Regards >> >> Thibault Notargiacomo >> >> _______________________________________________ >> Rtk-users mailing 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 Oct 15 10:50:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 16:50:30 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Interesting... I never used a geometry with negative sdd and sid but that's the issue here in my opinion. I did a quick test with positive and negative sdd/sid and that does not work for me either. Can you make them positive somehow? BTW, do you still use a modified version of the reg23 and can you share it? Thanks, Simon PS: the script I used for the test: rtksimulatedgeometry \ -o g \ -n 360 \ --sdd 1500 \ --sid 1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o pos.mha -g g rtksimulatedgeometry \ -o g \ -n 360 \ --sdd -1500 \ --sid -1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o neg.mha -g g On Thu, Oct 15, 2015 at 1:55 PM, Notargiacomo Thibault wrote: > Thank you very much Simon for this advice, I should have read more > carefully the recent posts about FFTWF / FFTWD. > > Now that Itk has been rebuilt using these flags, I no longer experience > the previous problem. > Unfortunately, when reconstructing with the CPU version of FDK, it seems > that, although Ramp filtering and backprojection now do work very well, I > still have issues with the weighting filter of FDK. > > As I am not familiar with analytic reconstruction methods, I don't know if > the geometric parameters that are generated by the import method of > Reg23ProjectionGeometry are consistant with the high variability of the > gain factor applied to my projection by FDKWeightProjectionFilter: > > Just a short example: > When using the following geometric parameters: > > SrcToCenter -1045.84 > SrcToDet -1261.02 > srcOffX 6.56918 > srcOffY 6.56918 > ProjOffX -151.44 > ProjOffY -151.44 > > => FDKWeighting filter outputs an image that has a mean of -1.518 with a > standard deviation of 2.056 with minimum value of -6.130 and maximum > value of 1.871 > > > On a frame where the source offset seems to be a little bit lower, I have > the following gemetric parameters: > > SrcToCenter -1042.66 > SrcToDet -1257.4 > srcOffX 1.25469 > srcOffY 1.25469 > ProjOffX -150.321 > ProjOffY -150.321 > > => FDKWeighting filter outputs an image that has a mean of -4.279E-4 > with a standard deviation of 5.786E-4 with minimum value of -0.005 and > maximum value of 5.268E-4 > > For comparison, our attenuation images in input of FDK have a mean of 0.8 > with a standard deviation of 1.09 with minimum value of -1 and maximum > value of 3.262. > > Here the negative values of attenuation arise from a problem while > approximating the I0 in our images, although we should work on that > problem, it was not that critical in SART reconstruction. > > I am surprised by such an important difference in gain applied to > projection, given that, when disabling manually this weighting filter in > RTK code, RampFiltering and BackProjection alone provided visually good > reconstruction results. > > If you have any idea of what could have gone wrong in the process of > importing geometry and/or applying weighting filter, I would be glad to > hear it. > > Thank you in advance. > > Kind regards > > Thibault Notargiacomo > > > > > > > > > 2015-10-14 18:58 GMT+02:00 Simon Rit : > >> Hi Thibault, >> No, there is not really a log system that would allow you debugging at >> run time. You can compile a debug version that would enable a lot of >> messages related to the pipeline. For this, I think you need to use NDEBUG >> at compilation (it's an ITK mechanism that I never use). >> No, it's not normal that you see an error message. There are two things: >> - the FFT of itk (compiled by default, based on vnl) is really bad IMO: >> it only handles power of 2/3/5 dimensions and it's slow. I always advise >> people to use FFTW by turning on ITK_USE_FFTW options during ITK's >> compilation. >> - I don't fully understand why vnl doesn't work either. I understand the >> first two dimensions, for vnl (which I strongly suggest to not use), I pad >> to the next power of 2 so >> 780 * 2 (for zero padding) -> 2048 >> 780 -> 1024 >> but then, if you use 64 projections, why 11? Are you sure the second >> input image to FDKConeBeamReconstructionImageFilter has the dimension you >> want? I would try to connect input 2 to an itk::ImageFileWriter and check >> what are the dimensions of this image. If you're absolutely sure, then I'll >> try to reproduce and fix the issue. >> Simon >> >> On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < >> gnthibault at gmail.com> wrote: >> >>> Dear all, >>> >>> I recently had troubles while trying to rewrite my code, linked with >>> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >>> well, to using fdk reconstruction method. >>> >>> My first question: is there a general way to enable maximum debug log >>> level at runtime in rtk ? >>> >>> My second question, is more specific: is it normal that I see such error >>> message coming from itk when using FDKConeBeamReconstructionFilter : >>> >>> ExceptionObject caught with fdk->Update() in file [...] >>> >>> itk::ExceptionObject (0x7f377c020cb0) >>> Location: "unknown" >>> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >>> Line: 416 >>> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >>> during SingleMethodExecute >>> >>> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >>> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >>> Cannot compute FFT of image with size [2048, 1024, 11]. >>> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >>> size in each dimension has a prime factorization consisting of only 2s, 3s, >>> or 5s. >>> >>> I suppose that this error arise while performing ramp filtering, but I >>> see no relation between FFT configuration stated in the error log ( [2048, >>> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >>> projections. >>> >>> I also tried with 200 projection and I had the same problem, but with >>> [2048, 1024, 34] >>> >>> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >>> to the total number of projection in my dataset every time. >>> >>> The revision I am currently using: >>> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >>> Merge: 578cf89 09d820c >>> >>> >>> Thank you in advance for your help. >>> >>> Regards >>> >>> Thibault Notargiacomo >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 03:12:36 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 09:12:36 +0200 Subject: [Rtk-users] Question about the geometry Message-ID: Dear all. Hello again. I writing to you again because I need some help to understand how to declare the geometry of the system. Cyril redirected me towards this document ( http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a lot, but unfortunately it has not been enough to make me reconstruct a tomogram. I have attached a drawing of my setup (setup.jpg). The source-to-detector distance is around 1600 mm. I just rotate the sample instead of the source, and the sample-detector distance is 15 cm which makes the isocenter distance 1450. The field of view is around 2 cm. The aligned projections are located here: https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 and the raw tiffs are here: https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 I would say the input data looks as nice, but when reconstructing I'm still just getting noise: This is how I perform my "reconstruction" # 361 projections from 0 to 360 degrees. The source-detector distance is 1.6 m and the # sample-detector distance is 15 cm # I have tried with many variations of --ssd and --sid but I think they all look the same rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o c:\Work\out_dir\geometry_real.xml # make a mha file out of the tiff files rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output c:\Work\out_dir\cylinder-a.mha --regexp .tif # "Reconstruct" the data. rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 The result can be viewed in the recon_result.PNG attachment. The reconstrcution can be found here: https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 Can someone please help me what I am doing wrong? best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: setup.jpg Type: image/jpeg Size: 29527 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: recon_result.PNG Type: image/png Size: 239196 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 06:09:04 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 12:09:04 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Is the origin and spacing of your projection data correct? What is your projection pixel size? Regards, Chao 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger : > Dear all. Hello again. > > I writing to you again because I need some help to understand how to > declare the geometry of the system. > > Cyril redirected me towards this document ( > http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > lot, but unfortunately it has not been enough to make me reconstruct a > tomogram. > > I have attached a drawing of my setup (setup.jpg). The > source-to-detector distance is around 1600 mm. I just rotate the > sample instead of the source, and the sample-detector distance is 15 > cm which makes the isocenter distance 1450. The field of view is > around 2 cm. > > The aligned projections are located here: > https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > and the raw tiffs are here: > https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > > I would say the input data looks as nice, but when reconstructing I'm > still just getting noise: > > This is how I perform my "reconstruction" > > # 361 projections from 0 to 360 degrees. The source-detector distance > is 1.6 m and the > # sample-detector distance is 15 cm > # I have tried with many variations of --ssd and --sid but I think > they all look the same > rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > c:\Work\out_dir\geometry_real.xml > > # make a mha file out of the tiff files > rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > c:\Work\out_dir\cylinder-a.mha --regexp .tif > > # "Reconstruct" the data. > rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha -g > c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > > The result can be viewed in the recon_result.PNG attachment. > The reconstrcution can be found here: > https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > > Can someone please help me what I am doing wrong? > > best > > Arvid > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 07:15:25 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 13:15:25 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao. Thank you for the reply. However, I'm not quite sure what you mean by origin and spacing. A pixel on the detector is ~200 microns, and the sample is magnified around 1.3 times. I do understand that having a correct geometry is important to get an output image with correct dimensions, but I do not understand it's so difficult for me to make a single successful reconstruction (possibly with a dummy geometry). best Arvid PS: Just to validate the data I'm testing on I installed Octave and created a sinogram I then ran through its iradon implementation. It seemed to work quite nicely (see attachments). On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > Hi Arvid, > > Is the origin and spacing of your projection data correct? What is your > projection pixel size? > > Regards, Chao > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > : >> >> Dear all. Hello again. >> >> I writing to you again because I need some help to understand how to >> declare the geometry of the system. >> >> Cyril redirected me towards this document ( >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> lot, but unfortunately it has not been enough to make me reconstruct a >> tomogram. >> >> I have attached a drawing of my setup (setup.jpg). The >> source-to-detector distance is around 1600 mm. I just rotate the >> sample instead of the source, and the sample-detector distance is 15 >> cm which makes the isocenter distance 1450. The field of view is >> around 2 cm. >> >> The aligned projections are located here: >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> and the raw tiffs are here: >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> I would say the input data looks as nice, but when reconstructing I'm >> still just getting noise: >> >> This is how I perform my "reconstruction" >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> is 1.6 m and the >> # sample-detector distance is 15 cm >> # I have tried with many variations of --ssd and --sid but I think >> they all look the same >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> c:\Work\out_dir\geometry_real.xml >> >> # make a mha file out of the tiff files >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> # "Reconstruct" the data. >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> The result can be viewed in the recon_result.PNG attachment. >> The reconstrcution can be found here: >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> Can someone please help me what I am doing wrong? >> >> best >> >> Arvid >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: Capture.JPG Type: image/jpeg Size: 58155 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 08:03:16 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 14:03:16 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Since you know how important a correct geometry is, you should understand why you need projection origin and spacing. CT geometry has more parameters than sid and sdd. How big the detector pixel size (spacing) and how the detector is places w.r.t. the central ray (origin) also play a role in the geometry. And in-plane/out-of-plane rotations etc. In your dataset the correct spacing and origin information is not stored correctly in the projection data, so the total geometry is wrong. I have tested your data with the following command line and it gives meaningful image. The newspacing and neworigin arguments force rtkfdk to accept spacing and origin information of projections from command line instead of from the data. Also I change the spacing of the volume from 2 to 0.2 because your object is small. rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 Apparently there is still some misalignment between this guessed geometry and the real geometry, which you need to figure out with your own hardware. Regards, Chao 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Hi Chao. > > Thank you for the reply. However, I'm not quite sure what you mean by > origin and spacing. > A pixel on the detector is ~200 microns, and the sample is magnified > around 1.3 times. > > I do understand that having a correct geometry is important to get an > output image with correct dimensions, but I do not understand it's so > difficult for me to make a single successful reconstruction (possibly > with a dummy geometry). > > best > > Arvid > > PS: Just to validate the data I'm testing on I installed Octave and > created a sinogram I then ran through its iradon implementation. It > seemed to work quite nicely (see attachments). > > On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > > Hi Arvid, > > > > Is the origin and spacing of your projection data correct? What is your > > projection pixel size? > > > > Regards, Chao > > > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Dear all. Hello again. > >> > >> I writing to you again because I need some help to understand how to > >> declare the geometry of the system. > >> > >> Cyril redirected me towards this document ( > >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> lot, but unfortunately it has not been enough to make me reconstruct a > >> tomogram. > >> > >> I have attached a drawing of my setup (setup.jpg). The > >> source-to-detector distance is around 1600 mm. I just rotate the > >> sample instead of the source, and the sample-detector distance is 15 > >> cm which makes the isocenter distance 1450. The field of view is > >> around 2 cm. > >> > >> The aligned projections are located here: > >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> and the raw tiffs are here: > >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> > >> I would say the input data looks as nice, but when reconstructing I'm > >> still just getting noise: > >> > >> This is how I perform my "reconstruction" > >> > >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> is 1.6 m and the > >> # sample-detector distance is 15 cm > >> # I have tried with many variations of --ssd and --sid but I think > >> they all look the same > >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> c:\Work\out_dir\geometry_real.xml > >> > >> # make a mha file out of the tiff files > >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> > >> # "Reconstruct" the data. > >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> > >> The result can be viewed in the recon_result.PNG attachment. > >> The reconstrcution can be found here: > >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> > >> Can someone please help me what I am doing wrong? > >> > >> best > >> > >> Arvid > >> > >> _______________________________________________ > >> Rtk-users mailing 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 Fri Oct 16 08:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 16 Oct 2015 14:15:43 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Thanks a lot Chao, I'm so glad that someone else than me did this! Just as a side note, Arvid, if you don't understand what is the origin and the spacing, look at the ITK software guide section 4.1.4, this is VERY important. Simon On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > Hi Arvid, > > Since you know how important a correct geometry is, you should understand > why you need projection origin and spacing. > CT geometry has more parameters than sid and sdd. How big the detector > pixel size (spacing) and how the detector is places w.r.t. the central ray > (origin) also play a role in the geometry. And in-plane/out-of-plane > rotations etc. > In your dataset the correct spacing and origin information is not stored > correctly in the projection data, so the total geometry is wrong. > > I have tested your data with the following command line and it gives > meaningful image. The newspacing and neworigin arguments force rtkfdk to > accept spacing and origin information of projections from command line > instead of from the data. Also I change the spacing of the volume from 2 to > 0.2 because your object is small. > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha > -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 > --newspacing=0.2 --neworigin=-20,-20 > > Apparently there is still some misalignment between this guessed geometry > and the real geometry, which you need to figure out with your own hardware. > > Regards, > Chao > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < > bottiger at gmail.com>: > >> Hi Chao. >> >> Thank you for the reply. However, I'm not quite sure what you mean by >> origin and spacing. >> A pixel on the detector is ~200 microns, and the sample is magnified >> around 1.3 times. >> >> I do understand that having a correct geometry is important to get an >> output image with correct dimensions, but I do not understand it's so >> difficult for me to make a single successful reconstruction (possibly >> with a dummy geometry). >> >> best >> >> Arvid >> >> PS: Just to validate the data I'm testing on I installed Octave and >> created a sinogram I then ran through its iradon implementation. It >> seemed to work quite nicely (see attachments). >> >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >> > Hi Arvid, >> > >> > Is the origin and spacing of your projection data correct? What is your >> > projection pixel size? >> > >> > Regards, Chao >> > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> > : >> >> >> >> Dear all. Hello again. >> >> >> >> I writing to you again because I need some help to understand how to >> >> declare the geometry of the system. >> >> >> >> Cyril redirected me towards this document ( >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> >> lot, but unfortunately it has not been enough to make me reconstruct a >> >> tomogram. >> >> >> >> I have attached a drawing of my setup (setup.jpg). The >> >> source-to-detector distance is around 1600 mm. I just rotate the >> >> sample instead of the source, and the sample-detector distance is 15 >> >> cm which makes the isocenter distance 1450. The field of view is >> >> around 2 cm. >> >> >> >> The aligned projections are located here: >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> >> and the raw tiffs are here: >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> >> >> I would say the input data looks as nice, but when reconstructing I'm >> >> still just getting noise: >> >> >> >> This is how I perform my "reconstruction" >> >> >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> >> is 1.6 m and the >> >> # sample-detector distance is 15 cm >> >> # I have tried with many variations of --ssd and --sid but I think >> >> they all look the same >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> >> c:\Work\out_dir\geometry_real.xml >> >> >> >> # make a mha file out of the tiff files >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> >> >> # "Reconstruct" the data. >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> >> c:\Work\out_dir\cylinder_a_recon.mha -g >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> >> >> The result can be viewed in the recon_result.PNG attachment. >> >> The reconstrcution can be found here: >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> >> >> Can someone please help me what I am doing wrong? >> >> >> >> best >> >> >> >> Arvid >> >> >> >> _______________________________________________ >> >> 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 bottiger at gmail.com Fri Oct 16 08:33:38 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 14:33:38 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao Wu Thank you very much! This is definitely something I can use in order to move forward. I'm not trying to make the best possible reconstruction out of this dataset, but just have something that works so I can start playing around and get familiar with RTK. Which I do have now. And to Simon: Thanks for the link. bets Arvid On Fri, Oct 16, 2015 at 2:15 PM, Simon Rit wrote: > Thanks a lot Chao, I'm so glad that someone else than me did this! > Just as a side note, Arvid, if you don't understand what is the origin and > the spacing, look at the ITK software guide section 4.1.4, this is VERY > important. > Simon > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: >> >> Hi Arvid, >> >> Since you know how important a correct geometry is, you should understand >> why you need projection origin and spacing. >> CT geometry has more parameters than sid and sdd. How big the detector >> pixel size (spacing) and how the detector is places w.r.t. the central ray >> (origin) also play a role in the geometry. And in-plane/out-of-plane >> rotations etc. >> In your dataset the correct spacing and origin information is not stored >> correctly in the projection data, so the total geometry is wrong. >> >> I have tested your data with the following command line and it gives >> meaningful image. The newspacing and neworigin arguments force rtkfdk to >> accept spacing and origin information of projections from command line >> instead of from the data. Also I change the spacing of the volume from 2 to >> 0.2 because your object is small. >> >> rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml >> --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 >> >> Apparently there is still some misalignment between this guessed geometry >> and the real geometry, which you need to figure out with your own hardware. >> >> Regards, >> Chao >> >> >> 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> : >>> >>> Hi Chao. >>> >>> Thank you for the reply. However, I'm not quite sure what you mean by >>> origin and spacing. >>> A pixel on the detector is ~200 microns, and the sample is magnified >>> around 1.3 times. >>> >>> I do understand that having a correct geometry is important to get an >>> output image with correct dimensions, but I do not understand it's so >>> difficult for me to make a single successful reconstruction (possibly >>> with a dummy geometry). >>> >>> best >>> >>> Arvid >>> >>> PS: Just to validate the data I'm testing on I installed Octave and >>> created a sinogram I then ran through its iradon implementation. It >>> seemed to work quite nicely (see attachments). >>> >>> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >>> > Hi Arvid, >>> > >>> > Is the origin and spacing of your projection data correct? What is your >>> > projection pixel size? >>> > >>> > Regards, Chao >>> > >>> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >>> > : >>> >> >>> >> Dear all. Hello again. >>> >> >>> >> I writing to you again because I need some help to understand how to >>> >> declare the geometry of the system. >>> >> >>> >> Cyril redirected me towards this document ( >>> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >>> >> lot, but unfortunately it has not been enough to make me reconstruct a >>> >> tomogram. >>> >> >>> >> I have attached a drawing of my setup (setup.jpg). The >>> >> source-to-detector distance is around 1600 mm. I just rotate the >>> >> sample instead of the source, and the sample-detector distance is 15 >>> >> cm which makes the isocenter distance 1450. The field of view is >>> >> around 2 cm. >>> >> >>> >> The aligned projections are located here: >>> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >>> >> and the raw tiffs are here: >>> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >>> >> >>> >> I would say the input data looks as nice, but when reconstructing I'm >>> >> still just getting noise: >>> >> >>> >> This is how I perform my "reconstruction" >>> >> >>> >> # 361 projections from 0 to 360 degrees. The source-detector distance >>> >> is 1.6 m and the >>> >> # sample-detector distance is 15 cm >>> >> # I have tried with many variations of --ssd and --sid but I think >>> >> they all look the same >>> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >>> >> c:\Work\out_dir\geometry_real.xml >>> >> >>> >> # make a mha file out of the tiff files >>> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >>> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >>> >> >>> >> # "Reconstruct" the data. >>> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >>> >> c:\Work\out_dir\cylinder_a_recon.mha -g >>> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >>> >> >>> >> The result can be viewed in the recon_result.PNG attachment. >>> >> The reconstrcution can be found here: >>> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >>> >> >>> >> Can someone please help me what I am doing wrong? >>> >> >>> >> best >>> >> >>> >> Arvid >>> >> >>> >> _______________________________________________ >>> >> 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 simon.rit at creatis.insa-lyon.fr Tue Oct 20 14:38:24 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 20 Oct 2015 20:38:24 +0200 Subject: [Rtk-users] using RTK with projection matrices and projection images In-Reply-To: References: Message-ID: Dear Shiras Abdurahman, It's better to email the mailing so that everybody can participate our discussion. We developped a tool to do this a while ago but it's never made it to the public repo. I have enclosed it if you want to have a look but it does what you want I think. The part of interest for you is how the variable matProj is converted to an RTK geometry. We'll try to clean it and push it to the main repo in November if you can't figure out how to use it. Good luck! Simon On Tue, Oct 20, 2015 at 5:07 PM, shiras abdurahman < shiras.abdurahman at gmail.com> wrote: > Dear Dr. Rit, > > My name is Shiras Abdurahman and I am a PhD student at ovgu Magdeburg, > Germany. Currently, I am working in tomographic reconstruction and I > started to using RTK. I have projection images and corresponding projection > matrices. I want to reconstruct volume with RTK. Is it possible to set > projection matrices directly and reconstruct the volume. Or do I need to > decompose first and get intrinsic and extrinsic parameters especially > rotation angles and use addProjection function? > I know that geometry can be read from xml file. > > Thank you for your time and patience. > > With regards, > Shiras Abdurahman > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rtkthales.cxx Type: text/x-c++src Size: 9360 bytes Desc: not available URL: From wuchao04 at gmail.com Mon Oct 26 16:30:58 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 26 Oct 2015 21:30:58 +0100 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Well, that's just some guess. I assume the central ray goes towards the center of your detector, so the origin should be denoted as somewhere near (- half_width, - half_height) in millimeter. Then I just fine-tune it manually a little bit to get a little bit better results... Regards, Chao 2015-10-26 19:44 GMT+01:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Dear Chao. > > I am very thankful for the help you provided me some days ago on the > RTK mailing list. However, I have a quick followup question for you, > which I have not been able to learn by reading the (very long) manual > another user provided me with. > > I am now working on another dataset, and get similar artifact when > reconstructing. Could you please help understand why you picked the > parameters you did? I guess the "spacing" is pixel size, but why did > why you pick "neworigin" to be -20,-20 ? > > best > > Arvid > > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > > Hi Arvid, > > > > Since you know how important a correct geometry is, you should understand > > why you need projection origin and spacing. > > CT geometry has more parameters than sid and sdd. How big the detector > pixel > > size (spacing) and how the detector is places w.r.t. the central ray > > (origin) also play a role in the geometry. And in-plane/out-of-plane > > rotations etc. > > In your dataset the correct spacing and origin information is not stored > > correctly in the projection data, so the total geometry is wrong. > > > > I have tested your data with the following command line and it gives > > meaningful image. The newspacing and neworigin arguments force rtkfdk to > > accept spacing and origin information of projections from command line > > instead of from the data. Also I change the spacing of the volume from 2 > to > > 0.2 because your object is small. > > > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > > c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml > > --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 > > > > Apparently there is still some misalignment between this guessed geometry > > and the real geometry, which you need to figure out with your own > hardware. > > > > Regards, > > Chao > > > > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Hi Chao. > >> > >> Thank you for the reply. However, I'm not quite sure what you mean by > >> origin and spacing. > >> A pixel on the detector is ~200 microns, and the sample is magnified > >> around 1.3 times. > >> > >> I do understand that having a correct geometry is important to get an > >> output image with correct dimensions, but I do not understand it's so > >> difficult for me to make a single successful reconstruction (possibly > >> with a dummy geometry). > >> > >> best > >> > >> Arvid > >> > >> PS: Just to validate the data I'm testing on I installed Octave and > >> created a sinogram I then ran through its iradon implementation. It > >> seemed to work quite nicely (see attachments). > >> > >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > >> > Hi Arvid, > >> > > >> > Is the origin and spacing of your projection data correct? What is > your > >> > projection pixel size? > >> > > >> > Regards, Chao > >> > > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > >> > : > >> >> > >> >> Dear all. Hello again. > >> >> > >> >> I writing to you again because I need some help to understand how to > >> >> declare the geometry of the system. > >> >> > >> >> Cyril redirected me towards this document ( > >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> >> lot, but unfortunately it has not been enough to make me reconstruct > a > >> >> tomogram. > >> >> > >> >> I have attached a drawing of my setup (setup.jpg). The > >> >> source-to-detector distance is around 1600 mm. I just rotate the > >> >> sample instead of the source, and the sample-detector distance is 15 > >> >> cm which makes the isocenter distance 1450. The field of view is > >> >> around 2 cm. > >> >> > >> >> The aligned projections are located here: > >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> >> and the raw tiffs are here: > >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> >> > >> >> I would say the input data looks as nice, but when reconstructing I'm > >> >> still just getting noise: > >> >> > >> >> This is how I perform my "reconstruction" > >> >> > >> >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> >> is 1.6 m and the > >> >> # sample-detector distance is 15 cm > >> >> # I have tried with many variations of --ssd and --sid but I think > >> >> they all look the same > >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> >> c:\Work\out_dir\geometry_real.xml > >> >> > >> >> # make a mha file out of the tiff files > >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> >> > >> >> # "Reconstruct" the data. > >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> >> > >> >> The result can be viewed in the recon_result.PNG attachment. > >> >> The reconstrcution can be found here: > >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> >> > >> >> Can someone please help me what I am doing wrong? > >> >> > >> >> best > >> >> > >> >> Arvid > >> >> > >> >> _______________________________________________ > >> >> Rtk-users mailing 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 Wed Oct 28 11:47:13 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Wed, 28 Oct 2015 16:47:13 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter Message-ID: <5630EE01.5070900@cppm.in2p3.fr> Hello everyone, I have a question/suggestion about the set of rtkDraw*ImageFilter. This filter are written as additive filters: for example, in rtkDrawEllipsoidImageFilter.txx, we can find for(..) itOut.Set( ellipsoid.density + itIn.Get() ) instead of for(..) itOut.Set( ellipsoid.density ) I think it can be more flexible the second option, because we can always associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. Moreover, the rtkDrawGeometricPhantomImageFilter class already uses itkAddImageFilter in order to have additive filters (which is redundant in current situation). What do you think ? Regards From shiraska at gmail.com Wed Oct 28 13:12:36 2015 From: shiraska at gmail.com (Shiras Abdurahman) Date: Wed, 28 Oct 2015 18:12:36 +0100 Subject: [Rtk-users] Filtered projection images Message-ID: Hi, I want to access processed projections especially filtered projections which are used for backprojection. Is it possible in RTK? Shiras -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 28 15:52:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:52:10 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: <5630EE01.5070900@cppm.in2p3.fr> References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: Hi Mathieu, Thanks for pointing this out. I agree that it might not be the best solution, yet one could argue that you could simply create a constant image with 0 to do what you'd like from the current implementation. My main problem is that I just tried to do what you suggest and some tests then fail... which shows the obvious, it's not a backward compatible change. I see two solutions: - keep it as is and you use ConstantImageFilter + we remove useless add filters, - a more complex but maybe more elegant solution: add a third template parameter for the operation that would allow the user to do what he'd like in a functor. That's what's done with filters that derive from itk::UnaryImageFilter . The default would be itk::Add2 but we could find or implement another one that simply discards the pixel value. What do you think? Simon PS: looking in the code, I just found that rtk::DrawConeImageFilter is not consistent with the others, it was always setting to 0 outside... that's been fixed! On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont wrote: > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. This > filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can always > associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is redundant in > current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > Rtk-users mailing 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 Oct 28 15:53:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:53:25 +0100 Subject: [Rtk-users] Filtered projection images In-Reply-To: References: Message-ID: Hi, I guess you mean filtered projections that are used in filtered backprojections algorithm? The filter you are looking for is rtk::FFTRampImageFilter which implements the ramp filter. There is a command line tool that can do it, rtkramp. Regards, Simon On Wed, Oct 28, 2015 at 6:12 PM, Shiras Abdurahman wrote: > Hi, > > I want to access processed projections especially filtered projections > which are used for backprojection. Is it possible in RTK? > > Shiras > > _______________________________________________ > Rtk-users mailing 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 Fri Oct 30 06:56:50 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Fri, 30 Oct 2015 11:56:50 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: <56334CF2.8070902@cppm.in2p3.fr> Hi, In case of your first solution, you can not chain several Draw*ImageFilters. For example, if you want to create small cylinders in a big cylinder. Your second solution is better. One another solution can be a thing like itk:SpatialObject but more simpler. An rtk::SpatialObject which one function (isInside(point)). We create a rtkDrawImageFilter class and implement ThreadedGenerateData like this : DrawImageFilter::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType itkNotUsed(threadId) { ... while( !itOut.IsAtEnd() ) { this->GetInput()->TransformIndexToPhysicalPoint(itOut.GetIndex(), point); if(m_rtkSpatialObject.isInside(point) itOut.Set(m_rtkFillFunctor(density, itIn.Get()); ... } DrawConeImageFilter class can be a child of this new DrawImageFilter (with new methods like setAngle, SetRadius which will adjust the rtkConeSpatialObject) This solution suppress duplicated code in Draw*ImageFilter::ThreadedGenerateData and makes easier implementation of another type of filling. On 28/10/2015 20:52, Simon Rit wrote: > Hi Mathieu, > Thanks for pointing this out. I agree that it might not be the best > solution, yet one could argue that you could simply create a constant > image with 0 to do what you'd like from the current implementation. My > main problem is that I just tried to do what you suggest and some tests > then fail... which shows the obvious, it's not a backward compatible change. > I see two solutions: > - keep it as is and you use ConstantImageFilter + we remove useless add > filters, > - a more complex but maybe more elegant solution: add a third template > parameter for the operation that would allow the user to do what he'd > like in a functor. That's what's done with filters that derive from > itk::UnaryImageFilter > . > The default would be itk::Add2 but we could find or implement another > one that simply discards the pixel value. > What do you think? > Simon > > PS: looking in the code, I just found that rtk::DrawConeImageFilter is > not consistent with the others, it was always setting to 0 outside... > that's been fixed! > > On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont > wrote: > > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. > This filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can > always associate Draw*ImageFilter and itkAddImageFilter to get an > additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is > redundant in current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > 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 Oct 1 02:18:53 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 08:18:53 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng wrote: > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: From cyril.mory at uclouvain.be Thu Oct 1 04:02:23 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Thu, 01 Oct 2015 10:02:23 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> Message-ID: <560CE88F.5030807@uclouvain.be> Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I'm using windows system (windows7 64 with VS 2013) and > I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with "ITK + FFTW" in > windows system? > > I'm just trying to use *rtkextractshroudsignal* and it seems to > require FFTW library externally. > > When I tried to use FFTW 3.3.4, I've encountered link errors as shown > below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > I'm running on Ubuntu 14.04 LTS and used the distribution library > (FFTW 3.3.3). If you're running on a Debian-based linux system, you > can also install the full development library set using the following > command: */sudo apt-get install libfftw3-3 libfftw3-dev/*. Then just > make sure that these libraries are being used by rerunning CCMake. > > I'm not quite sure about the error being thrown in your build, but > perhaps one of the main developers would be able to provide some more > insight into the issue. > > Hope this helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK > with those options on as you suggested. > > I've tried to use the up-to-date version of FFTW (3.3.4), but it > seems that it doesn't work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved external > symbol __imp_fftw_execute referenced in function "protected: > virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully using in > which system(Windows or Linux)? > > Thanks. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 6:56 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the inclusion of the > Fast Fourier Transform components. This requires compilation with > the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn't compile that way > initially, and it took a little bit of time to figure out. > > Hope that helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I'm now compiling itk-4.8 to use that feature since I've found > my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 4:31 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success since my > initial posting -- in fact I'm currently working on a new > method for accomplishing this task in certain challenging cases. > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase > signal output when called using the '-p' flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA/* > > From what I've experienced, this generally provides a good > signal [0,1) characterizing the respiratory phase using the > default settings. Occasionally, I've run into issues where > the default 'unsharpness' parameter needs to be adjusted to > give a clear signal (by appending the*--unsharp ##*flag to the > command). On more challenging shroud images -- notably, those > with little detectable signal from background -- additional > contrast-enhancement by pre-processing of the shroud has > assisted in signal extraction. > > I hope that helps -- and please let me know how it works out > for you. > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I've encountered exactly same issue and it would > be highly appreciated if you can share with me your > updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:*Rtk-users > [mailto:rtk-users-bounces at public.kitware.com]*On Behalf > Of*Joel Beaudry > *Sent:*Tuesday, March 17, 2015 5:25 PM > *To:*Matthew J. Riblett > > *Cc:*rtk-users at public.kitware.com > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but > I've had good success with using a Hilbert function in > python (scipy). I'm sure that Matlab has an equivalent > function, and maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett > > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a straightforward method > of going from the results of the rtkamsterdamshroud > and rtkextractshroudsignal applications to a [0,1) > phase signal for performing motion-compensated > reconstruction. I've been following along with the > MC-CBCT Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is used to > process the should signal prior to feeding it back > into the reconstruction application, but there is no > mention of how this is accomplished. I'm trying to > implement this into an automated workflow and I'd love > to know how this was accomplished. > > Thanks! > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > _______________________________________________ > 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 WEICHENG.SHEN at leidos.com Thu Oct 1 10:57:56 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Thu, 1 Oct 2015 14:57:56 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: image004.png Type: image/png Size: 15591 bytes Desc: image004.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 15591 bytes Desc: image001.png URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 1 11:23:48 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 17:23:48 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng wrote: > Hello Simon, > > > > Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside > RTK, the following error message appears: > > > > > ================================================================================================ > > > > CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): > By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project > has asked CMake to find a package configuration file provided by > "Gengetopt", but CMake did not find one. > > Could not find a package configuration file provided by "Gengetopt" with > any of the following names: > > GengetoptConfig.cmake > gengetopt-config.cmake > > Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set > "Gengetopt_DIR" to a directory containing one of the above files. If > "Gengetopt" provides a separate development package or SDK, be sure it has > been installed. > > > > > ================================================================================================ > > > > It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake > or gengetopt-config.cmake. I did a manual search for these files in the RTK > directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH > in the cmake GUI when performing configuration. The value of > CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln > file can now be successfully generated. > > > > Next I need to build the project using Visual Studio 2013. > > > > Thanks you very much for your help! > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Thursday, October 01, 2015 2:19 AM > *To:* Shen, Weicheng > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Unknown CMake command "WRAP_GGO" > > > > Hi, > > WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use > WRAP_GGO in an external project you need to do the same as in > applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the > easiest, to start with, is to build the rtktutorialapplication in the RTK > project. > > Let us know if that answered your problem, > > Simon > > > > On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: > > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 15591 bytes Desc: not available URL: From theday79 at gmail.com Thu Oct 1 17:33:51 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 1 Oct 2015 17:33:51 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <560CE88F.5030807@uclouvain.be> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> Message-ID: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park ; 'Matthew J. Riblett' ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I'm using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with "ITK + FFTW" in windows system? I'm just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I've encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I'm running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you're running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I'm not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I've tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn't work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn't compile that way initially, and it took a little bit of time to figure out. Hope that helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I'm now compiling itk-4.8 to use that feature since I've found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting - in fact I'm currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the '-p' flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I've experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I've run into issues where the default 'unsharpness' parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images - notably, those with little detectable signal from background - additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps - and please let me know how it works out for you. - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I've encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I've been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I'm trying to implement this into an automated workflow and I'd love to know how this was accomplished. Thanks! - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 joelbeaudry at gmail.com Thu Oct 1 17:40:30 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Thu, 1 Oct 2015 14:40:30 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Cyril, After trying out a few attempts, it seems like some values play nicer than others. Could it be an issue with floating point comparisons with the spacing and/or origins? It might explain why certain values seem to work (1.5) and others do not (0.88). I'll look at what values are being compared and get back to you. Thanks, Joel On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry wrote: > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 > spacing) and re-creating a mask off of that. So the motion mask should have > the same dimensions, spacing, and origin as the intended 4D image since I'm > using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating > my mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I created for > 160 (2), worked but not the case of 512 (0.88), and let you know what I > find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > wrote: > >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the small paragraph after >> the cuda command line : >> >> Note that the reconstructed volume in this example does not fully contain >> the attenuating object, causing hyper-attenuation artifacts on the borders >> of the result. To avoid these artifacts, reconstruct a larger volume >> (--dimension 256) should be fine. *Note that you will have to resize >> your motion mask as well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and allow any motion mask, >> but until I do, you can resize your motion mask using the CLITK tools ( >> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other datasets and it >> seems to be working. I need to increase the resolution and play around with >> the parameters now. >> >> I haven't had time to test it too much, but I do get an error when >> attempting to reconstruct with different dimensions. I'm using Cuda, and >> haven't tried it with just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >> AverageOutOfROIImageFilter: information of ROI image does not match input >> image" >> >> I'll be able to test some other things later and list more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line parameters AND data). Can >>> you restart it from scratch and let me know if you still have problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>> coordinates >>> - the regularization parameters (gamma space and gamma time) were way >>> too high. The regularization with a high gamma-time caused frames to be >>> identical, while it should only discourage variations >>> >>> I hope it works, now. If it doesn't work for you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and indeed, there are >>> several mistakes in it. I am working on correcting them. I'll keep you >>> posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>> >>> Hi RTK-users, >>> >>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>> example. The 5 frames should show some differences pertaining to patient >>> motion but the ones that I'm producing are identical, so no motion is >>> visible. >>> >>> Has anyone been able to follow the example and the provided dataset to >>> create a 4D image? >>> >>> Thanks, >>> Joel >>> >>> >>> _______________________________________________ >>> 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 Fri Oct 2 02:44:21 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 2 Oct 2015 08:44:21 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Joel, Can you explain how you created your mask? Looking at the code, it seems to me that if you create a 4D image with RTK, create a mask from this image with exactly the same meta info and pass it to ROOSTER, that should work in all cases. If I were you, I would compare the two mhd files (of the mask and the 4D image you used to create it) and verify that the meta info is exactly the same. For ROOSTER, I suggest to add an interpolation when the information is not inconsistent, e.g., in the main() function. I can do it if you agree Cyril. Simon On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry wrote: > Hi Cyril, > > After trying out a few attempts, it seems like some values play nicer than > others. Could it be an issue with floating point comparisons with the > spacing and/or origins? It might explain why certain values seem to work > (1.5) and others do not (0.88). I'll look at what values are being compared > and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >> spacing) and re-creating a mask off of that. So the motion mask should have >> the same dimensions, spacing, and origin as the intended 4D image since I'm >> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >> my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the mask I created >> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >> find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> Good to hear it's working now. >>> The error you get is explained on the wiki in the small paragraph after >>> the cuda command line : >>> >>> Note that the reconstructed volume in this example does not fully >>> contain the attenuating object, causing hyper-attenuation artifacts on the >>> borders of the result. To avoid these artifacts, reconstruct a larger >>> volume (--dimension 256) should be fine. *Note that you will have to >>> resize your motion mask as well, as 3D the motion mask is expected to have >>> the same size, spacing and origin as the first 3 dimensions of the 4D >>> output. * >>> >>> I guess I should take some time to fix that, and allow any motion mask, >>> but until I do, you can resize your motion mask using the CLITK tools ( >>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>> >>> Cyril >>> >>> >>> >>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other datasets and it >>> seems to be working. I need to increase the resolution and play around with >>> the parameters now. >>> >>> I haven't had time to test it too much, but I do get an error when >>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>> haven't tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>> AverageOutOfROIImageFilter: information of ROI image does not match input >>> image" >>> >>> I'll be able to test some other things later and list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> I have fixed the wiki example (command line parameters AND data). Can >>>> you restart it from scratch and let me know if you still have problems ? >>>> >>>> Roughly, the problems were the following: >>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>> coordinates >>>> - the regularization parameters (gamma space and gamma time) were way >>>> too high. The regularization with a high gamma-time caused frames to be >>>> identical, while it should only discourage variations >>>> >>>> I hope it works, now. If it doesn't work for you, please keep asking >>>> Cyril >>>> >>>> >>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki example, and indeed, there are >>>> several mistakes in it. I am working on correcting them. I'll keep you >>>> posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>> example. The 5 frames should show some differences pertaining to patient >>>> motion but the ones that I'm producing are identical, so no motion is >>>> visible. >>>> >>>> Has anyone been able to follow the example and the provided dataset to >>>> create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 cyril.mory at uclouvain.be Fri Oct 2 03:53:14 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 02 Oct 2015 09:53:14 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: <560E37EA.1060702@uclouvain.be> Indeed, resampling the mask if needed, to the correct size, spacing, origin and direction, seems the simplest way to deal with this issue. But I would do it in the filter rather than in the application, so that anything built on top of ROOSTER (i.e. incremental ROOSTER, or the rtkfourdroostertest) also benefits from it. Feel free to do it if you want, otherwise I'll take care of it next week :) On 10/02/2015 08:44 AM, Simon Rit wrote: > Hi Joel, > Can you explain how you created your mask? Looking at the code, it > seems to me that if you create a 4D image with RTK, create a mask from > this image with exactly the same meta info and pass it to ROOSTER, > that should work in all cases. If I were you, I would compare the two > mhd files (of the mask and the 4D image you used to create it) and > verify that the meta info is exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is > not inconsistent, e.g., in the main() function. I can do it if you > agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > > Hi Cyril, > > After trying out a few attempts, it seems like some values play > nicer than others. Could it be an issue with floating point > comparisons with the spacing and/or origins? It might explain why > certain values seem to work (1.5) and others do not (0.88). I'll > look at what values are being compared and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > > wrote: > > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions > 512 (0.88 spacing) and re-creating a mask off of that. So the > motion mask should have the same dimensions, spacing, and > origin as the intended 4D image since I'm using 4D rooster > with --dimension 512 --spacing 0.88. Perhaps I'm creating my > mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I > created for 160 (2), worked but not the case of 512 (0.88), > and let you know what I find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > > wrote: > > Hi Joel, > > Good to hear it's working now. > The error you get is explained on the wiki in the small > paragraph after the cuda command line : > > Note that the reconstructed volume in this example does > not fully contain the attenuating object, causing > hyper-attenuation artifacts on the borders of the result. > To avoid these artifacts, reconstruct a larger volume > (--dimension 256) should be fine. *Note that you will have > to resize your motion mask as well, as 3D the motion mask > is expected to have the same size, spacing and origin as > the first 3 dimensions of the 4D output. * > > I guess I should take some time to fix that, and allow any > motion mask, but until I do, you can resize your motion > mask using the CLITK tools > (http://www.creatis.insa-lyon.fr/rio/vv) or any method > that suits you. > > Cyril > > > > On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other >> datasets and it seems to be working. I need to increase >> the resolution and play around with the parameters now. >> >> I haven't had time to test it too much, but I do get an >> error when attempting to reconstruct with different >> dimensions. I'm using Cuda, and haven't tried it with >> just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws >> "In AverageOutOfROIImageFilter: information of ROI image >> does not match input image" >> >> I'll be able to test some other things later and list >> more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> I have fixed the wiki example (command line >> parameters AND data). Can you restart it from scratch >> and let me know if you still have problems ? >> >> Roughly, the problems were the following: >> - the "mm_50.mha" motion mask file was not aligned >> with the CBCT coordinates >> - the regularization parameters (gamma space and >> gamma time) were way too high. The regularization >> with a high gamma-time caused frames to be identical, >> while it should only discourage variations >> >> I hope it works, now. If it doesn't work for you, >> please keep asking >> Cyril >> >> >> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and >>> indeed, there are several mistakes in it. I am >>> working on correcting them. I'll keep you posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the >>>> 4DROOSTERReconstruction example. The 5 frames >>>> should show some differences pertaining to patient >>>> motion but the ones that I'm producing are >>>> identical, so no motion is visible. >>>> >>>> Has anyone been able to follow the example and the >>>> provided dataset to create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 joelbeaudry at gmail.com Fri Oct 2 12:31:38 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Fri, 2 Oct 2015 09:31:38 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: <560E37EA.1060702@uclouvain.be> References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: Hi Simon and Cyril, @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) and then use itkSnap to create a mask from that 3D image. I then use that mask as the input for ROOSTER, to which I again use the same spacing/dimensions. For some values it seems to work and other it doesn't. I'm wondering if itkSnap is truncating the spacing/dimension/origins when I save my mask, and perhaps why something like (160,2,-159) works but (511,0.88,-224.84). I'll take a look at the metadata. I'll try resampling my masks and like you said that should probably fix my issues. Thanks for the help, Joel On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory wrote: > Indeed, resampling the mask if needed, to the correct size, spacing, > origin and direction, seems the simplest way to deal with this issue. > But I would do it in the filter rather than in the application, so that > anything built on top of ROOSTER (i.e. incremental ROOSTER, or the > rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: > > Hi Joel, > Can you explain how you created your mask? Looking at the code, it seems > to me that if you create a 4D image with RTK, create a mask from this image > with exactly the same meta info and pass it to ROOSTER, that should work in > all cases. If I were you, I would compare the two mhd files (of the mask > and the 4D image you used to create it) and verify that the meta info is > exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is not > inconsistent, e.g., in the main() function. I can do it if you agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values play nicer >> than others. Could it be an issue with floating point comparisons with the >> spacing and/or origins? It might explain why certain values seem to work >> (1.5) and others do not (0.88). I'll look at what values are being compared >> and get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> wrote: >> >>> Hi Cyril, >>> >>> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >>> spacing) and re-creating a mask off of that. So the motion mask should have >>> the same dimensions, spacing, and origin as the intended 4D image since I'm >>> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >>> my mask incorrectly? >>> >>> I'll try and fiddle with it a bit later and see why the mask I created >>> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >>> find. >>> >>> Thanks again, >>> Joel >>> >>> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> Good to hear it's working now. >>>> The error you get is explained on the wiki in the small paragraph after >>>> the cuda command line : >>>> >>>> Note that the reconstructed volume in this example does not fully >>>> contain the attenuating object, causing hyper-attenuation artifacts on the >>>> borders of the result. To avoid these artifacts, reconstruct a larger >>>> volume (--dimension 256) should be fine. *Note that you will have to >>>> resize your motion mask as well, as 3D the motion mask is expected to have >>>> the same size, spacing and origin as the first 3 dimensions of the 4D >>>> output. * >>>> >>>> I guess I should take some time to fix that, and allow any motion mask, >>>> but until I do, you can resize your motion mask using the CLITK tools ( >>>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>>> >>>> Cyril >>>> >>>> >>>> >>>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>>> >>>> Hi Cyril, >>>> >>>> Works like a charm, thanks! I tried it on some other datasets and it >>>> seems to be working. I need to increase the resolution and play around with >>>> the parameters now. >>>> >>>> I haven't had time to test it too much, but I do get an error when >>>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>>> haven't tried it with just cpu reconstruction yet. >>>> >>>> i.e.) >>>> --dimension 160 --spacing 2 -> works >>>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>>> AverageOutOfROIImageFilter: information of ROI image does not match input >>>> image" >>>> >>>> I'll be able to test some other things later and list more details. >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> >>>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>>> wrote: >>>> >>>>> Hi Joel, >>>>> >>>>> I have fixed the wiki example (command line parameters AND data). Can >>>>> you restart it from scratch and let me know if you still have problems ? >>>>> >>>>> Roughly, the problems were the following: >>>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>>> coordinates >>>>> - the regularization parameters (gamma space and gamma time) were way >>>>> too high. The regularization with a high gamma-time caused frames to be >>>>> identical, while it should only discourage variations >>>>> >>>>> I hope it works, now. If it doesn't work for you, please keep asking >>>>> Cyril >>>>> >>>>> >>>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>>> >>>>> Hi Joel, >>>>> >>>>> I have just tried to reproduce the wiki example, and indeed, there are >>>>> several mistakes in it. I am working on correcting them. I'll keep you >>>>> posted. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>>> example. The 5 frames should show some differences pertaining to patient >>>>> motion but the ones that I'm producing are identical, so no motion is >>>>> visible. >>>>> >>>>> Has anyone been able to follow the example and the provided dataset to >>>>> create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 WEICHENG.SHEN at leidos.com Fri Oct 2 22:11:05 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Sat, 3 Oct 2015 02:11:05 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977222@EMP-EXMR104.corp.leidos.com> Hi Simon, Yes, if I run the CMake at the root of RTK, the example builds successfully. Thanks you very much! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 11:24 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng > wrote: Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: 15587 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 15591 bytes Desc: image002.png URL: From simon.rit at creatis.insa-lyon.fr Mon Oct 5 01:45:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 5 Oct 2015 07:45:06 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Oct 5 13:53:11 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 5 Oct 2015 13:53:11 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error1_using_ITK_FFT.png Type: image/png Size: 17214 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error in code.png Type: image/png Size: 21974 bytes Desc: not available URL: From cyril.mory at uclouvain.be Tue Oct 6 08:08:35 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Tue, 06 Oct 2015 14:08:35 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: <5613B9C3.4070309@uclouvain.be> Hi Joel, I have just pushed a fix for this issue: in the 4DROOSTER filter, I have added a resample filter between the ROI input and the AverageOutOfROIImageFilter. On my side, it runs fine. Let me know if it fixes the issue on your side. Thanks for pointing this out, Cyril On 10/02/2015 06:31 PM, Joel Beaudry wrote: > Hi Simon and Cyril, > > @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) > and then use itkSnap to create a mask from that 3D image. I then use > that mask as the input for ROOSTER, to which I again use the same > spacing/dimensions. For some values it seems to work and other it > doesn't. I'm wondering if itkSnap is truncating the > spacing/dimension/origins when I save my mask, and perhaps why > something like (160,2,-159) works but (511,0.88,-224.84). I'll take a > look at the metadata. > > I'll try resampling my masks and like you said that should probably > fix my issues. > > Thanks for the help, > Joel > > On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory > wrote: > > Indeed, resampling the mask if needed, to the correct size, > spacing, origin and direction, seems the simplest way to deal with > this issue. > But I would do it in the filter rather than in the application, so > that anything built on top of ROOSTER (i.e. incremental ROOSTER, > or the rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it > next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: >> Hi Joel, >> Can you explain how you created your mask? Looking at the code, >> it seems to me that if you create a 4D image with RTK, create a >> mask from this image with exactly the same meta info and pass it >> to ROOSTER, that should work in all cases. If I were you, I would >> compare the two mhd files (of the mask and the 4D image you used >> to create it) and verify that the meta info is exactly the same. >> For ROOSTER, I suggest to add an interpolation when the >> information is not inconsistent, e.g., in the main() function. I >> can do it if you agree Cyril. >> Simon >> >> On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values >> play nicer than others. Could it be an issue with floating >> point comparisons with the spacing and/or origins? It might >> explain why certain values seem to work (1.5) and others do >> not (0.88). I'll look at what values are being compared and >> get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with >> dimensions 512 (0.88 spacing) and re-creating a mask off >> of that. So the motion mask should have the same >> dimensions, spacing, and origin as the intended 4D image >> since I'm using 4D rooster with --dimension 512 --spacing >> 0.88. Perhaps I'm creating my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the >> mask I created for 160 (2), worked but not the case of >> 512 (0.88), and let you know what I find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the >> small paragraph after the cuda command line : >> >> Note that the reconstructed volume in this example >> does not fully contain the attenuating object, >> causing hyper-attenuation artifacts on the borders of >> the result. To avoid these artifacts, reconstruct a >> larger volume (--dimension 256) should be fine. *Note >> that you will have to resize your motion mask as >> well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 >> dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and >> allow any motion mask, but until I do, you can resize >> your motion mask using the CLITK tools >> (http://www.creatis.insa-lyon.fr/rio/vv) or any >> method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other >>> datasets and it seems to be working. I need to >>> increase the resolution and play around with the >>> parameters now. >>> >>> I haven't had time to test it too much, but I do get >>> an error when attempting to reconstruct with >>> different dimensions. I'm using Cuda, and haven't >>> tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> >>> throws "In AverageOutOfROIImageFilter: information >>> of ROI image does not match input image" >>> >>> I'll be able to test some other things later and >>> list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> >> > wrote: >>> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line >>> parameters AND data). Can you restart it from >>> scratch and let me know if you still have >>> problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not >>> aligned with the CBCT coordinates >>> - the regularization parameters (gamma space and >>> gamma time) were way too high. The >>> regularization with a high gamma-time caused >>> frames to be identical, while it should only >>> discourage variations >>> >>> I hope it works, now. If it doesn't work for >>> you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki >>>> example, and indeed, there are several mistakes >>>> in it. I am working on correcting them. I'll >>>> keep you posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the >>>>> 4DROOSTERReconstruction example. The 5 frames >>>>> should show some differences pertaining to >>>>> patient motion but the ones that I'm producing >>>>> are identical, so no motion is visible. >>>>> >>>>> Has anyone been able to follow the example and >>>>> the provided dataset to create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 Oct 6 09:11:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 6 Oct 2015 15:11:27 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park wrote: > Hi Simon, > > > > I?ve just tried to build it without FFTW library, as you have asked. > > > > I have encountered an error as shown in the attached pictures in running > ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, making > FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > > > Hope it helps. > > > > Yang > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Thanks a lot Yang for the detailed report, I'm sure that will be helpful > to many people. For my personal information, did you try to compile FFTW > from ITK as well? If it didn't work, could you let us know what was the > problem? > > Simon > > > > > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Tue Oct 6 10:49:55 2015 From: theday79 at gmail.com (Yang K Park) Date: Tue, 6 Oct 2015 10:49:55 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: <001c01d10046$44941080$cdbc3180$@gmail.com> Hi Simon, It seems that I misunderstood before. This time, I?ve followed your suggestion and encountered an error as follows: H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): fatal error C1083: Cannot open include file: 'fftw3.h': No such file or directory I?ve tested this with itk4.8.1, which is the most up-to-date release version. It seems that I need to specify the external fftw header file (fftw3.h), but the user interface for input does not appear in CMake unless I set ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. I hope this report can help itk developers resolve the issue. Thanks. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Tuesday, October 06, 2015 9:11 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com ] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park > Cc: Cyril Mory >; Matthew J. Riblett >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Tue Oct 6 11:00:16 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Tue, 6 Oct 2015 17:00:16 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <001c01d10046$44941080$cdbc3180$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> <001c01d10046$44941080$cdbc3180$@gmail.com> Message-ID: <5613E200.4050001@kitware.com> Yang, Simon, As I mentioned previously, you cannot build ITK with FFTW on Windows without setting ITK_USE_SYSTEM_FFTW=ON. You should get a warning in CMake specifying this. So the only solution to build ITK with FFTW on Windows is to use an externally compiled version of FFTW. Julien On 06/10/2015 16:49, Yang K Park wrote: > Hi Simon, > > It seems that I misunderstood before. This time, I?ve followed your > suggestion and encountered an error as follows: > > H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): > fatal error C1083: Cannot open include file: 'fftw3.h': No such file or > directory > > I?ve tested this with itk4.8.1, which is the most up-to-date release > version. > > It seems that I need to specify the external fftw header file (fftw3.h), > but the user interface for input does not appear in CMake unless I set > ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. > > I hope this report can help itk developers resolve the issue. > > Thanks. > > Yang > > *From:*simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of > *Simon Rit > *Sent:* Tuesday, October 06, 2015 9:11 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett > ; rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks Yang. I think I wasn't clear but what I meant was not to disable > FFTW but to compile and use FFTW in ITK by using > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=OFF > > instead of what I think you used > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=ON > > Julien Jomier from Kitware told me that both configurations worked for > him but your initial message suggests that the first did not work for > you. If you can confirm and explain your config (ITK version, compiler, > etc.). > > Simon > > PS: your test is useful anyway, I'll try to make the error message > clearer when FFTW is not used. > > On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: > > Hi Simon, > > I?ve just tried to build it without FFTW library, as you have asked. > > I have encountered an error as shown in the attached pictures in > running ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, > making FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > Hope it helps. > > Yang > > *From:*simon.rit at gmail.com > [mailto:simon.rit at gmail.com ] *On Behalf > Of *Simon Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > > *Cc:* Cyril Mory >; Matthew J. Riblett > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks a lot Yang for the detailed report, I'm sure that will be > helpful to many people. For my personal information, did you try to > compile FFTW from ITK as well? If it didn't work, could you let us > know what was the problem? > > Simon > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: > > Hi Cyril, > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally > succeeded. > > Following is the final version of my instruction. > > Thanks. > > Yang > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very > convenient! I really like it. Thanks for your hard works on this. > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > 1.Prepare fftw library files > > a.Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b.Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c.Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command > Prompt) > > d.Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e.Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > 2.Cmake for ITK > > a.Configure > > b.Turn on the following and reconfigure > > i.ITK_USE_SYSTEM_FFTW (mandatory to make the following options > appear) > > c.Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i.FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 > > ii.FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii.FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv.FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. > > d."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e.Reconfigure, Generate > > 3.Build ITK with Visual Studio > > a.In both Debug and Release > > 4.Cmake for RTK > > a.Default settings were used. > > b."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > 5.Build RTK using Visual Studio > > 6.Copy dll files to RTK bin folders > > a.Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b.To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7.Build RTK with Visual Studio > > *From:*Cyril Mory [mailto:cyril.mory at uclouvain.be > ] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park >; 'Matthew J. Riblett' > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam > Shroud > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just > have to activate it in the CMake options. On Windows, you cannot > do that. I do not have a clue why, but you cannot. You have to > install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled > DLLs from http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the > .lib files (that is absolutely necessary). You may have to run > the "lib.exe" program from the VS developer prompt instead of > the standard windows cmd.exe prompt. Specify you CPU > architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, > and you should be fine. I have successfully compiled this with > BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it > matters. > > If it works for you, then you might want to play around with the > other FFTW .lib files, and send on this mailing list a more > complete set of CMAKE options that works. I have tried some > other combinations without success, so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS > 2013) and I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with ?ITK + > FFTW? in windows system? > > I?m just trying to use *rtkextractshroudsignal* and it seems > to require FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors > as shown below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > I?m running on Ubuntu 14.04 LTS and used the distribution > library (FFTW 3.3.3). If you?re running on a Debian-based > linux system, you can also install the full development > library set using the following command: */sudo apt-get > install libfftw3-3 libfftw3-dev/*. Then just make sure that > these libraries are being used by rerunning CCMake. > > I?m not quite sure about the error being thrown in your > build, but perhaps one of the main developers would be able > to provide some more insight into the issue. > > Hope this helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to > compile ITK with those options on as you suggested. > > I?ve tried to use the up-to-date version of FFTW > (3.3.4), but it seems that it doesn?t work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved > external symbol __imp_fftw_execute referenced in > function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully > using in which system(Windows or Linux)? > > Thanks. > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the > inclusion of the Fast Fourier Transform components. > This requires compilation with the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that > way initially, and it took a little bit of time to > figure out. > > Hope that helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since > I?ve found my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data > from Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success > since my initial posting ? in fact I?m currently > working on a new method for accomplishing this task > in certain challenging cases. > > The most recent version of RTK provides an update to > the rtkextractshroudsignal application which > provides a phase signal output when called using the > ?-p? flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o > raw_signal.txt -p phase_signal.txt --method > LINEAR_BETWEEN_MINIMA/* > > From what I?ve experienced, this generally provides > a good signal [0,1) characterizing the respiratory > phase using the default settings. Occasionally, > I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear > signal (by appending the *--unsharp ##* flag to the > command). On more challenging shroud images ? > notably, those with little detectable signal from > background ? additional contrast-enhancement by > pre-processing of the shroud has assisted in signal > extraction. > > I hope that helps ? and please let me know how it > works out for you. > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue > and it would be highly appreciated if you can > share with me your updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical > School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:* Rtk-users > [mailto:rtk-users-bounces at public.kitware.com] > *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > > > *Cc:* rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal > data from Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab > script, but I've had good success with using a > Hilbert function in python (scipy). I'm sure > that Matlab has an equivalent function, and > maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. > Riblett > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a > straightforward method of going from the > results of the rtkamsterdamshroud and > rtkextractshroudsignal applications to a > [0,1) phase signal for performing > motion-compensated reconstruction. I?ve > been following along with the MC-CBCT > Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is > used to process the should signal prior to > feeding it back into the reconstruction > application, but there is no mention of how > this is accomplished. I?m trying to > implement this into an automated workflow > and I?d love to know how this was accomplished. > > Thanks! > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > > MCV Office Phone: +1.804.628.4858 > > > > _______________________________________________ > 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 > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From bottiger at gmail.com Mon Oct 12 05:42:20 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 11:42:20 +0200 Subject: [Rtk-users] Reconstruction problems Message-ID: Hi there I hope someone can help me me get started with RTK. First of all I should mention that I have compiled RTK on Windows 7 using Visual Studio 2013. Everything seems to compile and run just fine. Secondly: I tried to reproduce this example: http://wiki.openrtk.org/index.php/RTK/Scripts/FDK This was somewhat successful - I think. I could generate some projections, and reconstruct them. However, it just looks like an egg and not like a Shepp Logan phantom. See attachment. However, I'm unsure if this is expected or not. I took some homemade projections (of a small cylinder) and converted them into a MHA file (using rtkprojections.exe). The file looks correct in ImageJ. The dimensions are 370 pixels * 195 pixels * 361 projections You can get the file here: https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 The problem is that the reconstruction is wrong (see cylinder_recon). It looks like the dimensions are not read correctly, but I am unsure how I fix that? The rtkfdk.exe has a single --dimension parameter, but I am unsure which dimension that is suppose to be, but neither 195, 370 or any other value I could think of works for me. I hope someone can help me in the right direction. best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: SheppLogan.PNG Type: image/png Size: 150153 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cylinder_recon.PNG Type: image/png Size: 128472 bytes Desc: not available URL: From ghostcz at hotmail.com Mon Oct 12 05:54:44 2015 From: ghostcz at hotmail.com (louie L) Date: Mon, 12 Oct 2015 11:54:44 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Hi, You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? Cheers, Louie Sent from my iOS > On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 05:59:38 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 11:59:38 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: References: Message-ID: <561B848A.9090406@uclouvain.be> Hi Arvid, Well, you're on the right track :-) Your Shepp Logan reconstruction looks fine, I guess it is just a visualization problem: you can use vv http://www.creatis.insa-lyon.fr/rio/vv to open it and you will be able to change the "window" and "level" settings in visualization. Regarding the cylinder, can you send your geometry file too ? Regards Cyril Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Mon Oct 12 06:35:27 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:35:27 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: <561B848A.9090406@uclouvain.be> References: <561B848A.9090406@uclouvain.be> Message-ID: Hey Cyril I just wrote another e-mail about how I generated the geometry file (it's just simulated). But just in case I'll attach it here: best Arvid On Mon, Oct 12, 2015 at 11:59 AM, Cyril Mory wrote: > Hi Arvid, > > Well, you're on the right track :-) > Your Shepp Logan reconstruction looks fine, I guess it is just a > visualization problem: you can use vv > http://www.creatis.insa-lyon.fr/rio/vv > to open it and you will be able to change the "window" and "level" > settings in visualization. > > Regarding the cylinder, can you send your geometry file too ? > > Regards > Cyril > > Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example:http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here:https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > > > ------------------------------ > [image: Avast logo] > > L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le > logiciel antivirus Avast. > www.avast.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry360.xml Type: text/xml Size: 134495 bytes Desc: not available URL: From bottiger at gmail.com Mon Oct 12 06:36:03 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:36:03 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Sure. I'll admit I have yet to understand the specifics of the geometry file. Currently I just used a simulated one because that was what the SheppLogan example used, and the input projections looked similar. Here is a complete list of the commands I executed: rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 I did not do anything to the contrast and that is most likely the issue. I downloaded and installed vv and I can see some (very unclear) features inside the SheppLogan reconstruction - so that's nice. However, currently I'm mostly interested in getting the geometry right :) best On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: > Hi, > > You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? > > Cheers, > Louie > > Sent from my iOS > >> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >> >> Hi there >> >> I hope someone can help me me get started with RTK. >> >> First of all I should mention that I have compiled RTK on Windows 7 >> using Visual Studio 2013. Everything seems to compile and run just >> fine. >> >> Secondly: I tried to reproduce this example: >> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >> >> This was somewhat successful - I think. I could generate some >> projections, and reconstruct them. However, it just looks like an egg >> and not like a Shepp Logan phantom. See attachment. >> >> However, I'm unsure if this is expected or not. I took some homemade >> projections (of a small cylinder) and converted them into a MHA file >> (using rtkprojections.exe). The file looks correct in ImageJ. The >> dimensions are 370 pixels * 195 pixels * 361 projections >> >> You can get the file here: >> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >> >> The problem is that the reconstruction is wrong (see cylinder_recon). >> It looks like the dimensions are not read correctly, but I am unsure >> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >> I am unsure which dimension that is suppose to be, but neither 195, >> 370 or any other value I could think of works for me. >> >> I hope someone can help me in the right direction. >> >> best >> >> Arvid >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 15:52:10 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 21:52:10 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: <561C0F6A.6080602@uclouvain.be> Hi Arvid, Unfortunately, you cannot do that. You have to obtain the exact geometry of this particular acquisition from the cone beam device you used. If you need help to convert it to the RTK format, well, that's something you can ask for on this mailing list. Can you get the geometry data ? Regards, Cyril Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : > Sure. > > I'll admit I have yet to understand the specifics of the geometry > file. Currently I just used a simulated one because that was what the > SheppLogan example used, and the input projections looked similar. > > Here is a complete list of the commands I executed: > > rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml > > rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ > --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif > > rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o > c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g > c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 > > I did not do anything to the contrast and that is most likely the > issue. I downloaded and installed vv and I can see some (very unclear) > features inside the SheppLogan reconstruction - so that's nice. > However, currently I'm mostly interested in getting the geometry right :) > > best > > On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >> Hi, >> >> You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? >> >> Cheers, >> Louie >> >> Sent from my iOS >> >>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >>> >>> Hi there >>> >>> I hope someone can help me me get started with RTK. >>> >>> First of all I should mention that I have compiled RTK on Windows 7 >>> using Visual Studio 2013. Everything seems to compile and run just >>> fine. >>> >>> Secondly: I tried to reproduce this example: >>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>> >>> This was somewhat successful - I think. I could generate some >>> projections, and reconstruct them. However, it just looks like an egg >>> and not like a Shepp Logan phantom. See attachment. >>> >>> However, I'm unsure if this is expected or not. I took some homemade >>> projections (of a small cylinder) and converted them into a MHA file >>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>> dimensions are 370 pixels * 195 pixels * 361 projections >>> >>> You can get the file here: >>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>> >>> The problem is that the reconstruction is wrong (see cylinder_recon). >>> It looks like the dimensions are not read correctly, but I am unsure >>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>> I am unsure which dimension that is suppose to be, but neither 195, >>> 370 or any other value I could think of works for me. >>> >>> I hope someone can help me in the right direction. >>> >>> best >>> >>> Arvid >>> >>> >>> _______________________________________________ >>> 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 --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From cyril.mory at uclouvain.be Mon Oct 12 16:36:24 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 22:36:24 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: <561C1984.9030509@uclouvain.be> References: <561C1984.9030509@uclouvain.be> Message-ID: <561C19C8.5050304@uclouvain.be> Arvid, You can find a description of the geometry here : http://www.creatis.insa-lyon.fr/~srit/geometry.pdf In rtk/applications, several applications are simple converters from the cone beam manufacturer's raw geometry format to RTK geometry format, so you can also have a look at the code of these apps. If you know that you have an almost parallel beam, you can indeed try to use a dummy geometry file, but be careful: rtksimulatedgeometry generates a cone beam geometry, with large fan and cone angles if you leave the default parameters. You can adjust the 'sdd' and 'sid' options to simulate a very distant source, making rays almost parallel to each other (be careful with numerical precision, though). Hope it helps, Cyril Le 12/10/2015 21:59, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hello Cyril > > Thank you for getting back to me. I do have the geometry (albeit not > right here next to me). > However, my problem was that when I looked in the geometry file, I > didn't find it obvious how to define declare it - is it documented > somewhere? > > That said - the measurements I played around with is measured with an > almost parallel beam. I hoped I could reconstruct it (with minor > artifacts) using a dummy geometry file. > > best > > Arvid > > On Mon, Oct 12, 2015 at 9:52 PM, Cyril Mory wrote: >> Hi Arvid, >> >> Unfortunately, you cannot do that. You have to obtain the exact geometry of >> this particular acquisition from the cone beam device you used. >> If you need help to convert it to the RTK format, well, that's something you >> can ask for on this mailing list. >> Can you get the geometry data ? >> >> Regards, >> Cyril >> >> >> Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : >>> Sure. >>> >>> I'll admit I have yet to understand the specifics of the geometry >>> file. Currently I just used a simulated one because that was what the >>> SheppLogan example used, and the input projections looked similar. >>> >>> Here is a complete list of the commands I executed: >>> >>> rtksimulatedgeometry.exe -n 361 -o >>> c:\Users\aplb\Work\out_dir\geometry360.xml >>> >>> rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ >>> --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif >>> >>> rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o >>> c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g >>> c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 >>> >>> I did not do anything to the contrast and that is most likely the >>> issue. I downloaded and installed vv and I can see some (very unclear) >>> features inside the SheppLogan reconstruction - so that's nice. >>> However, currently I'm mostly interested in getting the geometry right :) >>> >>> best >>> >>> On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >>>> Hi, >>>> >>>> You can specify the size in each dimension. Can you post the arguments >>>> you used for the projections and reconstruction? Did you try to adjust the >>>> contrast of the output? >>>> >>>> Cheers, >>>> Louie >>>> >>>> Sent from my iOS >>>> >>>>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger >>>>> wrote: >>>>> >>>>> Hi there >>>>> >>>>> I hope someone can help me me get started with RTK. >>>>> >>>>> First of all I should mention that I have compiled RTK on Windows 7 >>>>> using Visual Studio 2013. Everything seems to compile and run just >>>>> fine. >>>>> >>>>> Secondly: I tried to reproduce this example: >>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>>>> >>>>> This was somewhat successful - I think. I could generate some >>>>> projections, and reconstruct them. However, it just looks like an egg >>>>> and not like a Shepp Logan phantom. See attachment. >>>>> >>>>> However, I'm unsure if this is expected or not. I took some homemade >>>>> projections (of a small cylinder) and converted them into a MHA file >>>>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>>>> dimensions are 370 pixels * 195 pixels * 361 projections >>>>> >>>>> You can get the file here: >>>>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>>>> >>>>> The problem is that the reconstruction is wrong (see cylinder_recon). >>>>> It looks like the dimensions are not read correctly, but I am unsure >>>>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>>>> I am unsure which dimension that is suppose to be, but neither 195, >>>>> 370 or any other value I could think of works for me. >>>>> >>>>> I hope someone can help me in the right direction. >>>>> >>>>> best >>>>> >>>>> Arvid >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >> >> >> --- >> L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le >> logiciel antivirus Avast. >> https://www.avast.com/antivirus >> --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From gnthibault at gmail.com Wed Oct 14 05:38:46 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Wed, 14 Oct 2015 11:38:46 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter Message-ID: Dear all, I recently had troubles while trying to rewrite my code, linked with libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite well, to using fdk reconstruction method. My first question: is there a general way to enable maximum debug log level at runtime in rtk ? My second question, is more specific: is it normal that I see such error message coming from itk when using FDKConeBeamReconstructionFilter : ExceptionObject caught with fdk->Update() in file [...] itk::ExceptionObject (0x7f377c020cb0) Location: "unknown" File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx Line: 416 Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred during SingleMethodExecute /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): Cannot compute FFT of image with size [2048, 1024, 11]. VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose size in each dimension has a prime factorization consisting of only 2s, 3s, or 5s. I suppose that this error arise while performing ramp filtering, but I see no relation between FFT configuration stated in the error log ( [2048, 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 projections. I also tried with 200 projection and I had the same problem, but with [2048, 1024, 34] Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to the total number of projection in my dataset every time. The revision I am currently using: commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 Merge: 578cf89 09d820c Thank you in advance for your help. Regards Thibault Notargiacomo -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 14 12:58:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 14 Oct 2015 18:58:06 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Hi Thibault, No, there is not really a log system that would allow you debugging at run time. You can compile a debug version that would enable a lot of messages related to the pipeline. For this, I think you need to use NDEBUG at compilation (it's an ITK mechanism that I never use). No, it's not normal that you see an error message. There are two things: - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it only handles power of 2/3/5 dimensions and it's slow. I always advise people to use FFTW by turning on ITK_USE_FFTW options during ITK's compilation. - I don't fully understand why vnl doesn't work either. I understand the first two dimensions, for vnl (which I strongly suggest to not use), I pad to the next power of 2 so 780 * 2 (for zero padding) -> 2048 780 -> 1024 but then, if you use 64 projections, why 11? Are you sure the second input image to FDKConeBeamReconstructionImageFilter has the dimension you want? I would try to connect input 2 to an itk::ImageFileWriter and check what are the dimensions of this image. If you're absolutely sure, then I'll try to reproduce and fix the issue. Simon On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < gnthibault at gmail.com> wrote: > Dear all, > > I recently had troubles while trying to rewrite my code, linked with > libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite > well, to using fdk reconstruction method. > > My first question: is there a general way to enable maximum debug log > level at runtime in rtk ? > > My second question, is more specific: is it normal that I see such error > message coming from itk when using FDKConeBeamReconstructionFilter : > > ExceptionObject caught with fdk->Update() in file [...] > > itk::ExceptionObject (0x7f377c020cb0) > Location: "unknown" > File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx > Line: 416 > Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred > during SingleMethodExecute > > /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: > itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): > Cannot compute FFT of image with size [2048, 1024, 11]. > VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose > size in each dimension has a prime factorization consisting of only 2s, 3s, > or 5s. > > I suppose that this error arise while performing ramp filtering, but I see > no relation between FFT configuration stated in the error log ( [2048, > 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 > projections. > > I also tried with 200 projection and I had the same problem, but with > [2048, 1024, 34] > > Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to > the total number of projection in my dataset every time. > > The revision I am currently using: > commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 > Merge: 578cf89 09d820c > > > Thank you in advance for your help. > > Regards > > Thibault Notargiacomo > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scouser27 at gmail.com Wed Oct 14 16:27:48 2015 From: scouser27 at gmail.com (sco user) Date: Wed, 14 Oct 2015 21:27:48 +0100 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi I'm a new user to RTK. I've been able to perform reconstructions of the Catphan and my own copies of Varian CBCT images with some success. I enabled the CUDA flags when making RTK so as to take advantage of the capabilities of my GPU. When I use --hardware="cuda" with the rtkfdk application, I have found that I must specify the lowmem option in order to get the reconstruction to run successfully. If I don't use lowmem, I get the following error: #### Reconstructing and writing... /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ unknown : Cuda Error : out of memory ExceptionObject caught with writer->Update() in file /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 itk::ExceptionObject (0x18e3460) Location: "unknown" File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h Line: 55 Description: Cuda Error : out of memory #### I take from this that I'm out of memory on the GPU. Is that correct? The GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be in order to get a typical Varian reconstruction to run without the lowmem option. On a side note, I know that the cuda option is working because it's a lot quicker than hardware="cpu", despite only having 96 cuda cores. Another question I'd like to ask is if anyone can shed some light on useful values for I-zero, wpc, scatter etc. With thanks in advance, Dave. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Oct 15 03:09:05 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 15 Oct 2015 09:09:05 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Without the lowmem flag all projection images may be loaded into graphics memory at once causing an out-of-memory issues. You can also check this thread: http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html Regards, Chao 2015-10-14 22:27 GMT+02:00 sco user : > Hi > > I'm a new user to RTK. > I've been able to perform reconstructions of the Catphan and my own copies > of Varian CBCT images with some success. I enabled the CUDA flags when > making RTK so as to take advantage of the capabilities of my GPU. > > When I use --hardware="cuda" with the rtkfdk application, I have found > that I must specify the lowmem option in order to get the reconstruction to > run successfully. If I don't use lowmem, I get the following error: > > #### > Reconstructing and writing... > /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ > unknown : Cuda Error : out of memory > > ExceptionObject caught with writer->Update() in file > /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 > > itk::ExceptionObject (0x18e3460) > Location: "unknown" > File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h > Line: 55 > Description: Cuda Error : out of memory > #### > > I take from this that I'm out of memory on the GPU. Is that correct? The > GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be > in order to get a typical Varian reconstruction to run without the lowmem > option. > > On a side note, I know that the cuda option is working because it's a lot > quicker than hardware="cpu", despite only having 96 cuda cores. > > > Another question I'd like to ask is if anyone can shed some light on > useful values for I-zero, wpc, scatter etc. > > With thanks in advance, > Dave. > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Thu Oct 15 03:52:25 2015 From: itkhelpacc at gmail.com (vishal k) Date: Thu, 15 Oct 2015 13:22:25 +0530 Subject: [Rtk-users] Need some help with Projection of 3D CT data Message-ID: hi, Im working on a CT data set using ITK.. Im trying to come up with a registration algorithm for fluoroscopy image obtained from C-Arm taken at some angle wrt to the patient and the projection of CT data taken at the same angle as that of the C-arm.. i need to change the angles of projection and the focal length of the source from time to time for my study.. I was wondering if i could do that using RTK? If yes, could you tell me where I find information that is relevant to my problem..Thank you Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 15 05:11:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:11:00 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Regarding the parameters (I-zero, wpc, scatter etc), we still need to create wiki pages to describe this (as agreed on during the Jul 31 meeting ). In the meantime, you'll find some info in each filter documentation. You can go to the projection pre-processing filter , look at the (complex) clickable graph and try to navigate in it. For example, I0 is for the LUTbasedVariableI0RawToAttenuationImageFilter and (therefore), inapplicable to Varian data as is. I'll keep the mailing list posted when we add info to the wiki. Good luck, Simon On Thu, Oct 15, 2015 at 9:09 AM, Chao Wu wrote: > Hi Dave, > > Without the lowmem flag all projection images may be loaded into graphics > memory at once causing an out-of-memory issues. > You can also check this thread: > http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html > > Regards, > Chao > > 2015-10-14 22:27 GMT+02:00 sco user : > >> Hi >> >> I'm a new user to RTK. >> I've been able to perform reconstructions of the Catphan and my own >> copies of Varian CBCT images with some success. I enabled the CUDA flags >> when making RTK so as to take advantage of the capabilities of my GPU. >> >> When I use --hardware="cuda" with the rtkfdk application, I have found >> that I must specify the lowmem option in order to get the reconstruction to >> run successfully. If I don't use lowmem, I get the following error: >> >> #### >> Reconstructing and writing... >> /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ >> unknown : Cuda Error : out of memory >> >> ExceptionObject caught with writer->Update() in file >> /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 >> >> itk::ExceptionObject (0x18e3460) >> Location: "unknown" >> File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h >> Line: 55 >> Description: Cuda Error : out of memory >> #### >> >> I take from this that I'm out of memory on the GPU. Is that correct? The >> GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be >> in order to get a typical Varian reconstruction to run without the lowmem >> option. >> >> On a side note, I know that the cuda option is working because it's a lot >> quicker than hardware="cpu", despite only having 96 cuda cores. >> >> >> Another question I'd like to ask is if anyone can shed some light on >> useful values for I-zero, wpc, scatter etc. >> >> With thanks in advance, >> Dave. >> >> >> _______________________________________________ >> 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 Thu Oct 15 05:33:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:33:42 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Yes, RTK can certainly do things like that. Start with a simple geometry following the example Forward projection of the wiki and maybe come back to us with more precise questions? Good luck, Simon On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: > hi, > Im working on a CT data set using ITK.. Im trying to come up with a > registration algorithm for fluoroscopy image obtained from C-Arm taken at > some angle wrt to the patient and the projection of CT data taken at the > same angle as that of the C-arm.. i need to change the angles of projection > and the focal length of the source from time to time for my study.. I was > wondering if i could do that using RTK? If yes, could you tell me where I > find information that is relevant to my problem..Thank you > Regards > > _______________________________________________ > Rtk-users mailing 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 Oct 15 05:49:16 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:49:16 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Hi, Please stick to the mailing list. That's exactly what I understood and my previous answer is still valid. Simon On Thu, Oct 15, 2015 at 11:47 AM, vishal k wrote: > hi Simon, > Thanks for ur advice..sorry i couldn't explain it properly...here my > problem explained in detail.. I have to register 3D ct data with > Fluoroscopy image obtained during surgery.. the problem is that they use > different co-ordinate systems.. I thought since i can obtained the C arm > position using the DICOM tags (source to patient distance etc), i could use > these positions values to obtain forward projection of the CT data.. after > doing this I feel my registering the forward projection image and the > actual fluoroscopy image(obtained during the surgery) would be easier...Please > advice me if there is any better way to deal this problem.. > Regards > Vishal > > On Thu, Oct 15, 2015 at 3:03 PM, Simon Rit > wrote: > >> Yes, RTK can certainly do things like that. Start with a simple geometry >> following the example Forward projection >> of the >> wiki and maybe come back to us with more >> precise questions? >> Good luck, >> Simon >> >> On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: >> >>> hi, >>> Im working on a CT data set using ITK.. Im trying to come up with a >>> registration algorithm for fluoroscopy image obtained from C-Arm taken at >>> some angle wrt to the patient and the projection of CT data taken at the >>> same angle as that of the C-arm.. i need to change the angles of projection >>> and the focal length of the source from time to time for my study.. I was >>> wondering if i could do that using RTK? If yes, could you tell me where I >>> find information that is relevant to my problem..Thank you >>> Regards >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnthibault at gmail.com Thu Oct 15 07:55:17 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Thu, 15 Oct 2015 13:55:17 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Thank you very much Simon for this advice, I should have read more carefully the recent posts about FFTWF / FFTWD. Now that Itk has been rebuilt using these flags, I no longer experience the previous problem. Unfortunately, when reconstructing with the CPU version of FDK, it seems that, although Ramp filtering and backprojection now do work very well, I still have issues with the weighting filter of FDK. As I am not familiar with analytic reconstruction methods, I don't know if the geometric parameters that are generated by the import method of Reg23ProjectionGeometry are consistant with the high variability of the gain factor applied to my projection by FDKWeightProjectionFilter: Just a short example: When using the following geometric parameters: SrcToCenter -1045.84 SrcToDet -1261.02 srcOffX 6.56918 srcOffY 6.56918 ProjOffX -151.44 ProjOffY -151.44 => FDKWeighting filter outputs an image that has a mean of -1.518 with a standard deviation of 2.056 with minimum value of -6.130 and maximum value of 1.871 On a frame where the source offset seems to be a little bit lower, I have the following gemetric parameters: SrcToCenter -1042.66 SrcToDet -1257.4 srcOffX 1.25469 srcOffY 1.25469 ProjOffX -150.321 ProjOffY -150.321 => FDKWeighting filter outputs an image that has a mean of -4.279E-4 with a standard deviation of 5.786E-4 with minimum value of -0.005 and maximum value of 5.268E-4 For comparison, our attenuation images in input of FDK have a mean of 0.8 with a standard deviation of 1.09 with minimum value of -1 and maximum value of 3.262. Here the negative values of attenuation arise from a problem while approximating the I0 in our images, although we should work on that problem, it was not that critical in SART reconstruction. I am surprised by such an important difference in gain applied to projection, given that, when disabling manually this weighting filter in RTK code, RampFiltering and BackProjection alone provided visually good reconstruction results. If you have any idea of what could have gone wrong in the process of importing geometry and/or applying weighting filter, I would be glad to hear it. Thank you in advance. Kind regards Thibault Notargiacomo 2015-10-14 18:58 GMT+02:00 Simon Rit : > Hi Thibault, > No, there is not really a log system that would allow you debugging at run > time. You can compile a debug version that would enable a lot of messages > related to the pipeline. For this, I think you need to use NDEBUG at > compilation (it's an ITK mechanism that I never use). > No, it's not normal that you see an error message. There are two things: > - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it > only handles power of 2/3/5 dimensions and it's slow. I always advise > people to use FFTW by turning on ITK_USE_FFTW options during ITK's > compilation. > - I don't fully understand why vnl doesn't work either. I understand the > first two dimensions, for vnl (which I strongly suggest to not use), I pad > to the next power of 2 so > 780 * 2 (for zero padding) -> 2048 > 780 -> 1024 > but then, if you use 64 projections, why 11? Are you sure the second input > image to FDKConeBeamReconstructionImageFilter has the dimension you want? I > would try to connect input 2 to an itk::ImageFileWriter and check what are > the dimensions of this image. If you're absolutely sure, then I'll try to > reproduce and fix the issue. > Simon > > On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < > gnthibault at gmail.com> wrote: > >> Dear all, >> >> I recently had troubles while trying to rewrite my code, linked with >> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >> well, to using fdk reconstruction method. >> >> My first question: is there a general way to enable maximum debug log >> level at runtime in rtk ? >> >> My second question, is more specific: is it normal that I see such error >> message coming from itk when using FDKConeBeamReconstructionFilter : >> >> ExceptionObject caught with fdk->Update() in file [...] >> >> itk::ExceptionObject (0x7f377c020cb0) >> Location: "unknown" >> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >> Line: 416 >> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >> during SingleMethodExecute >> >> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >> Cannot compute FFT of image with size [2048, 1024, 11]. >> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >> size in each dimension has a prime factorization consisting of only 2s, 3s, >> or 5s. >> >> I suppose that this error arise while performing ramp filtering, but I >> see no relation between FFT configuration stated in the error log ( [2048, >> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >> projections. >> >> I also tried with 200 projection and I had the same problem, but with >> [2048, 1024, 34] >> >> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >> to the total number of projection in my dataset every time. >> >> The revision I am currently using: >> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >> Merge: 578cf89 09d820c >> >> >> Thank you in advance for your help. >> >> Regards >> >> Thibault Notargiacomo >> >> _______________________________________________ >> Rtk-users mailing 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 Oct 15 10:50:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 16:50:30 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Interesting... I never used a geometry with negative sdd and sid but that's the issue here in my opinion. I did a quick test with positive and negative sdd/sid and that does not work for me either. Can you make them positive somehow? BTW, do you still use a modified version of the reg23 and can you share it? Thanks, Simon PS: the script I used for the test: rtksimulatedgeometry \ -o g \ -n 360 \ --sdd 1500 \ --sid 1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o pos.mha -g g rtksimulatedgeometry \ -o g \ -n 360 \ --sdd -1500 \ --sid -1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o neg.mha -g g On Thu, Oct 15, 2015 at 1:55 PM, Notargiacomo Thibault wrote: > Thank you very much Simon for this advice, I should have read more > carefully the recent posts about FFTWF / FFTWD. > > Now that Itk has been rebuilt using these flags, I no longer experience > the previous problem. > Unfortunately, when reconstructing with the CPU version of FDK, it seems > that, although Ramp filtering and backprojection now do work very well, I > still have issues with the weighting filter of FDK. > > As I am not familiar with analytic reconstruction methods, I don't know if > the geometric parameters that are generated by the import method of > Reg23ProjectionGeometry are consistant with the high variability of the > gain factor applied to my projection by FDKWeightProjectionFilter: > > Just a short example: > When using the following geometric parameters: > > SrcToCenter -1045.84 > SrcToDet -1261.02 > srcOffX 6.56918 > srcOffY 6.56918 > ProjOffX -151.44 > ProjOffY -151.44 > > => FDKWeighting filter outputs an image that has a mean of -1.518 with a > standard deviation of 2.056 with minimum value of -6.130 and maximum > value of 1.871 > > > On a frame where the source offset seems to be a little bit lower, I have > the following gemetric parameters: > > SrcToCenter -1042.66 > SrcToDet -1257.4 > srcOffX 1.25469 > srcOffY 1.25469 > ProjOffX -150.321 > ProjOffY -150.321 > > => FDKWeighting filter outputs an image that has a mean of -4.279E-4 > with a standard deviation of 5.786E-4 with minimum value of -0.005 and > maximum value of 5.268E-4 > > For comparison, our attenuation images in input of FDK have a mean of 0.8 > with a standard deviation of 1.09 with minimum value of -1 and maximum > value of 3.262. > > Here the negative values of attenuation arise from a problem while > approximating the I0 in our images, although we should work on that > problem, it was not that critical in SART reconstruction. > > I am surprised by such an important difference in gain applied to > projection, given that, when disabling manually this weighting filter in > RTK code, RampFiltering and BackProjection alone provided visually good > reconstruction results. > > If you have any idea of what could have gone wrong in the process of > importing geometry and/or applying weighting filter, I would be glad to > hear it. > > Thank you in advance. > > Kind regards > > Thibault Notargiacomo > > > > > > > > > 2015-10-14 18:58 GMT+02:00 Simon Rit : > >> Hi Thibault, >> No, there is not really a log system that would allow you debugging at >> run time. You can compile a debug version that would enable a lot of >> messages related to the pipeline. For this, I think you need to use NDEBUG >> at compilation (it's an ITK mechanism that I never use). >> No, it's not normal that you see an error message. There are two things: >> - the FFT of itk (compiled by default, based on vnl) is really bad IMO: >> it only handles power of 2/3/5 dimensions and it's slow. I always advise >> people to use FFTW by turning on ITK_USE_FFTW options during ITK's >> compilation. >> - I don't fully understand why vnl doesn't work either. I understand the >> first two dimensions, for vnl (which I strongly suggest to not use), I pad >> to the next power of 2 so >> 780 * 2 (for zero padding) -> 2048 >> 780 -> 1024 >> but then, if you use 64 projections, why 11? Are you sure the second >> input image to FDKConeBeamReconstructionImageFilter has the dimension you >> want? I would try to connect input 2 to an itk::ImageFileWriter and check >> what are the dimensions of this image. If you're absolutely sure, then I'll >> try to reproduce and fix the issue. >> Simon >> >> On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < >> gnthibault at gmail.com> wrote: >> >>> Dear all, >>> >>> I recently had troubles while trying to rewrite my code, linked with >>> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >>> well, to using fdk reconstruction method. >>> >>> My first question: is there a general way to enable maximum debug log >>> level at runtime in rtk ? >>> >>> My second question, is more specific: is it normal that I see such error >>> message coming from itk when using FDKConeBeamReconstructionFilter : >>> >>> ExceptionObject caught with fdk->Update() in file [...] >>> >>> itk::ExceptionObject (0x7f377c020cb0) >>> Location: "unknown" >>> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >>> Line: 416 >>> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >>> during SingleMethodExecute >>> >>> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >>> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >>> Cannot compute FFT of image with size [2048, 1024, 11]. >>> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >>> size in each dimension has a prime factorization consisting of only 2s, 3s, >>> or 5s. >>> >>> I suppose that this error arise while performing ramp filtering, but I >>> see no relation between FFT configuration stated in the error log ( [2048, >>> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >>> projections. >>> >>> I also tried with 200 projection and I had the same problem, but with >>> [2048, 1024, 34] >>> >>> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >>> to the total number of projection in my dataset every time. >>> >>> The revision I am currently using: >>> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >>> Merge: 578cf89 09d820c >>> >>> >>> Thank you in advance for your help. >>> >>> Regards >>> >>> Thibault Notargiacomo >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 03:12:36 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 09:12:36 +0200 Subject: [Rtk-users] Question about the geometry Message-ID: Dear all. Hello again. I writing to you again because I need some help to understand how to declare the geometry of the system. Cyril redirected me towards this document ( http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a lot, but unfortunately it has not been enough to make me reconstruct a tomogram. I have attached a drawing of my setup (setup.jpg). The source-to-detector distance is around 1600 mm. I just rotate the sample instead of the source, and the sample-detector distance is 15 cm which makes the isocenter distance 1450. The field of view is around 2 cm. The aligned projections are located here: https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 and the raw tiffs are here: https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 I would say the input data looks as nice, but when reconstructing I'm still just getting noise: This is how I perform my "reconstruction" # 361 projections from 0 to 360 degrees. The source-detector distance is 1.6 m and the # sample-detector distance is 15 cm # I have tried with many variations of --ssd and --sid but I think they all look the same rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o c:\Work\out_dir\geometry_real.xml # make a mha file out of the tiff files rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output c:\Work\out_dir\cylinder-a.mha --regexp .tif # "Reconstruct" the data. rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 The result can be viewed in the recon_result.PNG attachment. The reconstrcution can be found here: https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 Can someone please help me what I am doing wrong? best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: setup.jpg Type: image/jpeg Size: 29527 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: recon_result.PNG Type: image/png Size: 239196 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 06:09:04 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 12:09:04 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Is the origin and spacing of your projection data correct? What is your projection pixel size? Regards, Chao 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger : > Dear all. Hello again. > > I writing to you again because I need some help to understand how to > declare the geometry of the system. > > Cyril redirected me towards this document ( > http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > lot, but unfortunately it has not been enough to make me reconstruct a > tomogram. > > I have attached a drawing of my setup (setup.jpg). The > source-to-detector distance is around 1600 mm. I just rotate the > sample instead of the source, and the sample-detector distance is 15 > cm which makes the isocenter distance 1450. The field of view is > around 2 cm. > > The aligned projections are located here: > https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > and the raw tiffs are here: > https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > > I would say the input data looks as nice, but when reconstructing I'm > still just getting noise: > > This is how I perform my "reconstruction" > > # 361 projections from 0 to 360 degrees. The source-detector distance > is 1.6 m and the > # sample-detector distance is 15 cm > # I have tried with many variations of --ssd and --sid but I think > they all look the same > rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > c:\Work\out_dir\geometry_real.xml > > # make a mha file out of the tiff files > rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > c:\Work\out_dir\cylinder-a.mha --regexp .tif > > # "Reconstruct" the data. > rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha -g > c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > > The result can be viewed in the recon_result.PNG attachment. > The reconstrcution can be found here: > https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > > Can someone please help me what I am doing wrong? > > best > > Arvid > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 07:15:25 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 13:15:25 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao. Thank you for the reply. However, I'm not quite sure what you mean by origin and spacing. A pixel on the detector is ~200 microns, and the sample is magnified around 1.3 times. I do understand that having a correct geometry is important to get an output image with correct dimensions, but I do not understand it's so difficult for me to make a single successful reconstruction (possibly with a dummy geometry). best Arvid PS: Just to validate the data I'm testing on I installed Octave and created a sinogram I then ran through its iradon implementation. It seemed to work quite nicely (see attachments). On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > Hi Arvid, > > Is the origin and spacing of your projection data correct? What is your > projection pixel size? > > Regards, Chao > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > : >> >> Dear all. Hello again. >> >> I writing to you again because I need some help to understand how to >> declare the geometry of the system. >> >> Cyril redirected me towards this document ( >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> lot, but unfortunately it has not been enough to make me reconstruct a >> tomogram. >> >> I have attached a drawing of my setup (setup.jpg). The >> source-to-detector distance is around 1600 mm. I just rotate the >> sample instead of the source, and the sample-detector distance is 15 >> cm which makes the isocenter distance 1450. The field of view is >> around 2 cm. >> >> The aligned projections are located here: >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> and the raw tiffs are here: >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> I would say the input data looks as nice, but when reconstructing I'm >> still just getting noise: >> >> This is how I perform my "reconstruction" >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> is 1.6 m and the >> # sample-detector distance is 15 cm >> # I have tried with many variations of --ssd and --sid but I think >> they all look the same >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> c:\Work\out_dir\geometry_real.xml >> >> # make a mha file out of the tiff files >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> # "Reconstruct" the data. >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> The result can be viewed in the recon_result.PNG attachment. >> The reconstrcution can be found here: >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> Can someone please help me what I am doing wrong? >> >> best >> >> Arvid >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: Capture.JPG Type: image/jpeg Size: 58155 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 08:03:16 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 14:03:16 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Since you know how important a correct geometry is, you should understand why you need projection origin and spacing. CT geometry has more parameters than sid and sdd. How big the detector pixel size (spacing) and how the detector is places w.r.t. the central ray (origin) also play a role in the geometry. And in-plane/out-of-plane rotations etc. In your dataset the correct spacing and origin information is not stored correctly in the projection data, so the total geometry is wrong. I have tested your data with the following command line and it gives meaningful image. The newspacing and neworigin arguments force rtkfdk to accept spacing and origin information of projections from command line instead of from the data. Also I change the spacing of the volume from 2 to 0.2 because your object is small. rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 Apparently there is still some misalignment between this guessed geometry and the real geometry, which you need to figure out with your own hardware. Regards, Chao 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Hi Chao. > > Thank you for the reply. However, I'm not quite sure what you mean by > origin and spacing. > A pixel on the detector is ~200 microns, and the sample is magnified > around 1.3 times. > > I do understand that having a correct geometry is important to get an > output image with correct dimensions, but I do not understand it's so > difficult for me to make a single successful reconstruction (possibly > with a dummy geometry). > > best > > Arvid > > PS: Just to validate the data I'm testing on I installed Octave and > created a sinogram I then ran through its iradon implementation. It > seemed to work quite nicely (see attachments). > > On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > > Hi Arvid, > > > > Is the origin and spacing of your projection data correct? What is your > > projection pixel size? > > > > Regards, Chao > > > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Dear all. Hello again. > >> > >> I writing to you again because I need some help to understand how to > >> declare the geometry of the system. > >> > >> Cyril redirected me towards this document ( > >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> lot, but unfortunately it has not been enough to make me reconstruct a > >> tomogram. > >> > >> I have attached a drawing of my setup (setup.jpg). The > >> source-to-detector distance is around 1600 mm. I just rotate the > >> sample instead of the source, and the sample-detector distance is 15 > >> cm which makes the isocenter distance 1450. The field of view is > >> around 2 cm. > >> > >> The aligned projections are located here: > >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> and the raw tiffs are here: > >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> > >> I would say the input data looks as nice, but when reconstructing I'm > >> still just getting noise: > >> > >> This is how I perform my "reconstruction" > >> > >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> is 1.6 m and the > >> # sample-detector distance is 15 cm > >> # I have tried with many variations of --ssd and --sid but I think > >> they all look the same > >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> c:\Work\out_dir\geometry_real.xml > >> > >> # make a mha file out of the tiff files > >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> > >> # "Reconstruct" the data. > >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> > >> The result can be viewed in the recon_result.PNG attachment. > >> The reconstrcution can be found here: > >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> > >> Can someone please help me what I am doing wrong? > >> > >> best > >> > >> Arvid > >> > >> _______________________________________________ > >> Rtk-users mailing 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 Fri Oct 16 08:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 16 Oct 2015 14:15:43 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Thanks a lot Chao, I'm so glad that someone else than me did this! Just as a side note, Arvid, if you don't understand what is the origin and the spacing, look at the ITK software guide section 4.1.4, this is VERY important. Simon On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > Hi Arvid, > > Since you know how important a correct geometry is, you should understand > why you need projection origin and spacing. > CT geometry has more parameters than sid and sdd. How big the detector > pixel size (spacing) and how the detector is places w.r.t. the central ray > (origin) also play a role in the geometry. And in-plane/out-of-plane > rotations etc. > In your dataset the correct spacing and origin information is not stored > correctly in the projection data, so the total geometry is wrong. > > I have tested your data with the following command line and it gives > meaningful image. The newspacing and neworigin arguments force rtkfdk to > accept spacing and origin information of projections from command line > instead of from the data. Also I change the spacing of the volume from 2 to > 0.2 because your object is small. > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha > -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 > --newspacing=0.2 --neworigin=-20,-20 > > Apparently there is still some misalignment between this guessed geometry > and the real geometry, which you need to figure out with your own hardware. > > Regards, > Chao > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < > bottiger at gmail.com>: > >> Hi Chao. >> >> Thank you for the reply. However, I'm not quite sure what you mean by >> origin and spacing. >> A pixel on the detector is ~200 microns, and the sample is magnified >> around 1.3 times. >> >> I do understand that having a correct geometry is important to get an >> output image with correct dimensions, but I do not understand it's so >> difficult for me to make a single successful reconstruction (possibly >> with a dummy geometry). >> >> best >> >> Arvid >> >> PS: Just to validate the data I'm testing on I installed Octave and >> created a sinogram I then ran through its iradon implementation. It >> seemed to work quite nicely (see attachments). >> >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >> > Hi Arvid, >> > >> > Is the origin and spacing of your projection data correct? What is your >> > projection pixel size? >> > >> > Regards, Chao >> > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> > : >> >> >> >> Dear all. Hello again. >> >> >> >> I writing to you again because I need some help to understand how to >> >> declare the geometry of the system. >> >> >> >> Cyril redirected me towards this document ( >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> >> lot, but unfortunately it has not been enough to make me reconstruct a >> >> tomogram. >> >> >> >> I have attached a drawing of my setup (setup.jpg). The >> >> source-to-detector distance is around 1600 mm. I just rotate the >> >> sample instead of the source, and the sample-detector distance is 15 >> >> cm which makes the isocenter distance 1450. The field of view is >> >> around 2 cm. >> >> >> >> The aligned projections are located here: >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> >> and the raw tiffs are here: >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> >> >> I would say the input data looks as nice, but when reconstructing I'm >> >> still just getting noise: >> >> >> >> This is how I perform my "reconstruction" >> >> >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> >> is 1.6 m and the >> >> # sample-detector distance is 15 cm >> >> # I have tried with many variations of --ssd and --sid but I think >> >> they all look the same >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> >> c:\Work\out_dir\geometry_real.xml >> >> >> >> # make a mha file out of the tiff files >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> >> >> # "Reconstruct" the data. >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> >> c:\Work\out_dir\cylinder_a_recon.mha -g >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> >> >> The result can be viewed in the recon_result.PNG attachment. >> >> The reconstrcution can be found here: >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> >> >> Can someone please help me what I am doing wrong? >> >> >> >> best >> >> >> >> Arvid >> >> >> >> _______________________________________________ >> >> 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 bottiger at gmail.com Fri Oct 16 08:33:38 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 14:33:38 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao Wu Thank you very much! This is definitely something I can use in order to move forward. I'm not trying to make the best possible reconstruction out of this dataset, but just have something that works so I can start playing around and get familiar with RTK. Which I do have now. And to Simon: Thanks for the link. bets Arvid On Fri, Oct 16, 2015 at 2:15 PM, Simon Rit wrote: > Thanks a lot Chao, I'm so glad that someone else than me did this! > Just as a side note, Arvid, if you don't understand what is the origin and > the spacing, look at the ITK software guide section 4.1.4, this is VERY > important. > Simon > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: >> >> Hi Arvid, >> >> Since you know how important a correct geometry is, you should understand >> why you need projection origin and spacing. >> CT geometry has more parameters than sid and sdd. How big the detector >> pixel size (spacing) and how the detector is places w.r.t. the central ray >> (origin) also play a role in the geometry. And in-plane/out-of-plane >> rotations etc. >> In your dataset the correct spacing and origin information is not stored >> correctly in the projection data, so the total geometry is wrong. >> >> I have tested your data with the following command line and it gives >> meaningful image. The newspacing and neworigin arguments force rtkfdk to >> accept spacing and origin information of projections from command line >> instead of from the data. Also I change the spacing of the volume from 2 to >> 0.2 because your object is small. >> >> rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml >> --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 >> >> Apparently there is still some misalignment between this guessed geometry >> and the real geometry, which you need to figure out with your own hardware. >> >> Regards, >> Chao >> >> >> 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> : >>> >>> Hi Chao. >>> >>> Thank you for the reply. However, I'm not quite sure what you mean by >>> origin and spacing. >>> A pixel on the detector is ~200 microns, and the sample is magnified >>> around 1.3 times. >>> >>> I do understand that having a correct geometry is important to get an >>> output image with correct dimensions, but I do not understand it's so >>> difficult for me to make a single successful reconstruction (possibly >>> with a dummy geometry). >>> >>> best >>> >>> Arvid >>> >>> PS: Just to validate the data I'm testing on I installed Octave and >>> created a sinogram I then ran through its iradon implementation. It >>> seemed to work quite nicely (see attachments). >>> >>> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >>> > Hi Arvid, >>> > >>> > Is the origin and spacing of your projection data correct? What is your >>> > projection pixel size? >>> > >>> > Regards, Chao >>> > >>> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >>> > : >>> >> >>> >> Dear all. Hello again. >>> >> >>> >> I writing to you again because I need some help to understand how to >>> >> declare the geometry of the system. >>> >> >>> >> Cyril redirected me towards this document ( >>> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >>> >> lot, but unfortunately it has not been enough to make me reconstruct a >>> >> tomogram. >>> >> >>> >> I have attached a drawing of my setup (setup.jpg). The >>> >> source-to-detector distance is around 1600 mm. I just rotate the >>> >> sample instead of the source, and the sample-detector distance is 15 >>> >> cm which makes the isocenter distance 1450. The field of view is >>> >> around 2 cm. >>> >> >>> >> The aligned projections are located here: >>> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >>> >> and the raw tiffs are here: >>> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >>> >> >>> >> I would say the input data looks as nice, but when reconstructing I'm >>> >> still just getting noise: >>> >> >>> >> This is how I perform my "reconstruction" >>> >> >>> >> # 361 projections from 0 to 360 degrees. The source-detector distance >>> >> is 1.6 m and the >>> >> # sample-detector distance is 15 cm >>> >> # I have tried with many variations of --ssd and --sid but I think >>> >> they all look the same >>> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >>> >> c:\Work\out_dir\geometry_real.xml >>> >> >>> >> # make a mha file out of the tiff files >>> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >>> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >>> >> >>> >> # "Reconstruct" the data. >>> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >>> >> c:\Work\out_dir\cylinder_a_recon.mha -g >>> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >>> >> >>> >> The result can be viewed in the recon_result.PNG attachment. >>> >> The reconstrcution can be found here: >>> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >>> >> >>> >> Can someone please help me what I am doing wrong? >>> >> >>> >> best >>> >> >>> >> Arvid >>> >> >>> >> _______________________________________________ >>> >> 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 simon.rit at creatis.insa-lyon.fr Tue Oct 20 14:38:24 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 20 Oct 2015 20:38:24 +0200 Subject: [Rtk-users] using RTK with projection matrices and projection images In-Reply-To: References: Message-ID: Dear Shiras Abdurahman, It's better to email the mailing so that everybody can participate our discussion. We developped a tool to do this a while ago but it's never made it to the public repo. I have enclosed it if you want to have a look but it does what you want I think. The part of interest for you is how the variable matProj is converted to an RTK geometry. We'll try to clean it and push it to the main repo in November if you can't figure out how to use it. Good luck! Simon On Tue, Oct 20, 2015 at 5:07 PM, shiras abdurahman < shiras.abdurahman at gmail.com> wrote: > Dear Dr. Rit, > > My name is Shiras Abdurahman and I am a PhD student at ovgu Magdeburg, > Germany. Currently, I am working in tomographic reconstruction and I > started to using RTK. I have projection images and corresponding projection > matrices. I want to reconstruct volume with RTK. Is it possible to set > projection matrices directly and reconstruct the volume. Or do I need to > decompose first and get intrinsic and extrinsic parameters especially > rotation angles and use addProjection function? > I know that geometry can be read from xml file. > > Thank you for your time and patience. > > With regards, > Shiras Abdurahman > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rtkthales.cxx Type: text/x-c++src Size: 9360 bytes Desc: not available URL: From wuchao04 at gmail.com Mon Oct 26 16:30:58 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 26 Oct 2015 21:30:58 +0100 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Well, that's just some guess. I assume the central ray goes towards the center of your detector, so the origin should be denoted as somewhere near (- half_width, - half_height) in millimeter. Then I just fine-tune it manually a little bit to get a little bit better results... Regards, Chao 2015-10-26 19:44 GMT+01:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Dear Chao. > > I am very thankful for the help you provided me some days ago on the > RTK mailing list. However, I have a quick followup question for you, > which I have not been able to learn by reading the (very long) manual > another user provided me with. > > I am now working on another dataset, and get similar artifact when > reconstructing. Could you please help understand why you picked the > parameters you did? I guess the "spacing" is pixel size, but why did > why you pick "neworigin" to be -20,-20 ? > > best > > Arvid > > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > > Hi Arvid, > > > > Since you know how important a correct geometry is, you should understand > > why you need projection origin and spacing. > > CT geometry has more parameters than sid and sdd. How big the detector > pixel > > size (spacing) and how the detector is places w.r.t. the central ray > > (origin) also play a role in the geometry. And in-plane/out-of-plane > > rotations etc. > > In your dataset the correct spacing and origin information is not stored > > correctly in the projection data, so the total geometry is wrong. > > > > I have tested your data with the following command line and it gives > > meaningful image. The newspacing and neworigin arguments force rtkfdk to > > accept spacing and origin information of projections from command line > > instead of from the data. Also I change the spacing of the volume from 2 > to > > 0.2 because your object is small. > > > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > > c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml > > --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 > > > > Apparently there is still some misalignment between this guessed geometry > > and the real geometry, which you need to figure out with your own > hardware. > > > > Regards, > > Chao > > > > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Hi Chao. > >> > >> Thank you for the reply. However, I'm not quite sure what you mean by > >> origin and spacing. > >> A pixel on the detector is ~200 microns, and the sample is magnified > >> around 1.3 times. > >> > >> I do understand that having a correct geometry is important to get an > >> output image with correct dimensions, but I do not understand it's so > >> difficult for me to make a single successful reconstruction (possibly > >> with a dummy geometry). > >> > >> best > >> > >> Arvid > >> > >> PS: Just to validate the data I'm testing on I installed Octave and > >> created a sinogram I then ran through its iradon implementation. It > >> seemed to work quite nicely (see attachments). > >> > >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > >> > Hi Arvid, > >> > > >> > Is the origin and spacing of your projection data correct? What is > your > >> > projection pixel size? > >> > > >> > Regards, Chao > >> > > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > >> > : > >> >> > >> >> Dear all. Hello again. > >> >> > >> >> I writing to you again because I need some help to understand how to > >> >> declare the geometry of the system. > >> >> > >> >> Cyril redirected me towards this document ( > >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> >> lot, but unfortunately it has not been enough to make me reconstruct > a > >> >> tomogram. > >> >> > >> >> I have attached a drawing of my setup (setup.jpg). The > >> >> source-to-detector distance is around 1600 mm. I just rotate the > >> >> sample instead of the source, and the sample-detector distance is 15 > >> >> cm which makes the isocenter distance 1450. The field of view is > >> >> around 2 cm. > >> >> > >> >> The aligned projections are located here: > >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> >> and the raw tiffs are here: > >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> >> > >> >> I would say the input data looks as nice, but when reconstructing I'm > >> >> still just getting noise: > >> >> > >> >> This is how I perform my "reconstruction" > >> >> > >> >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> >> is 1.6 m and the > >> >> # sample-detector distance is 15 cm > >> >> # I have tried with many variations of --ssd and --sid but I think > >> >> they all look the same > >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> >> c:\Work\out_dir\geometry_real.xml > >> >> > >> >> # make a mha file out of the tiff files > >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> >> > >> >> # "Reconstruct" the data. > >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> >> > >> >> The result can be viewed in the recon_result.PNG attachment. > >> >> The reconstrcution can be found here: > >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> >> > >> >> Can someone please help me what I am doing wrong? > >> >> > >> >> best > >> >> > >> >> Arvid > >> >> > >> >> _______________________________________________ > >> >> Rtk-users mailing 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 Wed Oct 28 11:47:13 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Wed, 28 Oct 2015 16:47:13 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter Message-ID: <5630EE01.5070900@cppm.in2p3.fr> Hello everyone, I have a question/suggestion about the set of rtkDraw*ImageFilter. This filter are written as additive filters: for example, in rtkDrawEllipsoidImageFilter.txx, we can find for(..) itOut.Set( ellipsoid.density + itIn.Get() ) instead of for(..) itOut.Set( ellipsoid.density ) I think it can be more flexible the second option, because we can always associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. Moreover, the rtkDrawGeometricPhantomImageFilter class already uses itkAddImageFilter in order to have additive filters (which is redundant in current situation). What do you think ? Regards From shiraska at gmail.com Wed Oct 28 13:12:36 2015 From: shiraska at gmail.com (Shiras Abdurahman) Date: Wed, 28 Oct 2015 18:12:36 +0100 Subject: [Rtk-users] Filtered projection images Message-ID: Hi, I want to access processed projections especially filtered projections which are used for backprojection. Is it possible in RTK? Shiras -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 28 15:52:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:52:10 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: <5630EE01.5070900@cppm.in2p3.fr> References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: Hi Mathieu, Thanks for pointing this out. I agree that it might not be the best solution, yet one could argue that you could simply create a constant image with 0 to do what you'd like from the current implementation. My main problem is that I just tried to do what you suggest and some tests then fail... which shows the obvious, it's not a backward compatible change. I see two solutions: - keep it as is and you use ConstantImageFilter + we remove useless add filters, - a more complex but maybe more elegant solution: add a third template parameter for the operation that would allow the user to do what he'd like in a functor. That's what's done with filters that derive from itk::UnaryImageFilter . The default would be itk::Add2 but we could find or implement another one that simply discards the pixel value. What do you think? Simon PS: looking in the code, I just found that rtk::DrawConeImageFilter is not consistent with the others, it was always setting to 0 outside... that's been fixed! On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont wrote: > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. This > filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can always > associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is redundant in > current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > Rtk-users mailing 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 Oct 28 15:53:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:53:25 +0100 Subject: [Rtk-users] Filtered projection images In-Reply-To: References: Message-ID: Hi, I guess you mean filtered projections that are used in filtered backprojections algorithm? The filter you are looking for is rtk::FFTRampImageFilter which implements the ramp filter. There is a command line tool that can do it, rtkramp. Regards, Simon On Wed, Oct 28, 2015 at 6:12 PM, Shiras Abdurahman wrote: > Hi, > > I want to access processed projections especially filtered projections > which are used for backprojection. Is it possible in RTK? > > Shiras > > _______________________________________________ > Rtk-users mailing 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 Fri Oct 30 06:56:50 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Fri, 30 Oct 2015 11:56:50 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: <56334CF2.8070902@cppm.in2p3.fr> Hi, In case of your first solution, you can not chain several Draw*ImageFilters. For example, if you want to create small cylinders in a big cylinder. Your second solution is better. One another solution can be a thing like itk:SpatialObject but more simpler. An rtk::SpatialObject which one function (isInside(point)). We create a rtkDrawImageFilter class and implement ThreadedGenerateData like this : DrawImageFilter::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType itkNotUsed(threadId) { ... while( !itOut.IsAtEnd() ) { this->GetInput()->TransformIndexToPhysicalPoint(itOut.GetIndex(), point); if(m_rtkSpatialObject.isInside(point) itOut.Set(m_rtkFillFunctor(density, itIn.Get()); ... } DrawConeImageFilter class can be a child of this new DrawImageFilter (with new methods like setAngle, SetRadius which will adjust the rtkConeSpatialObject) This solution suppress duplicated code in Draw*ImageFilter::ThreadedGenerateData and makes easier implementation of another type of filling. On 28/10/2015 20:52, Simon Rit wrote: > Hi Mathieu, > Thanks for pointing this out. I agree that it might not be the best > solution, yet one could argue that you could simply create a constant > image with 0 to do what you'd like from the current implementation. My > main problem is that I just tried to do what you suggest and some tests > then fail... which shows the obvious, it's not a backward compatible change. > I see two solutions: > - keep it as is and you use ConstantImageFilter + we remove useless add > filters, > - a more complex but maybe more elegant solution: add a third template > parameter for the operation that would allow the user to do what he'd > like in a functor. That's what's done with filters that derive from > itk::UnaryImageFilter > . > The default would be itk::Add2 but we could find or implement another > one that simply discards the pixel value. > What do you think? > Simon > > PS: looking in the code, I just found that rtk::DrawConeImageFilter is > not consistent with the others, it was always setting to 0 outside... > that's been fixed! > > On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont > wrote: > > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. > This filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can > always associate Draw*ImageFilter and itkAddImageFilter to get an > additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is > redundant in current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > 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 Oct 1 02:18:53 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 08:18:53 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng wrote: > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: From cyril.mory at uclouvain.be Thu Oct 1 04:02:23 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Thu, 01 Oct 2015 10:02:23 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> Message-ID: <560CE88F.5030807@uclouvain.be> Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I'm using windows system (windows7 64 with VS 2013) and > I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with "ITK + FFTW" in > windows system? > > I'm just trying to use *rtkextractshroudsignal* and it seems to > require FFTW library externally. > > When I tried to use FFTW 3.3.4, I've encountered link errors as shown > below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > I'm running on Ubuntu 14.04 LTS and used the distribution library > (FFTW 3.3.3). If you're running on a Debian-based linux system, you > can also install the full development library set using the following > command: */sudo apt-get install libfftw3-3 libfftw3-dev/*. Then just > make sure that these libraries are being used by rerunning CCMake. > > I'm not quite sure about the error being thrown in your build, but > perhaps one of the main developers would be able to provide some more > insight into the issue. > > Hope this helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK > with those options on as you suggested. > > I've tried to use the up-to-date version of FFTW (3.3.4), but it > seems that it doesn't work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved external > symbol __imp_fftw_execute referenced in function "protected: > virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully using in > which system(Windows or Linux)? > > Thanks. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 6:56 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the inclusion of the > Fast Fourier Transform components. This requires compilation with > the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn't compile that way > initially, and it took a little bit of time to figure out. > > Hope that helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I'm now compiling itk-4.8 to use that feature since I've found > my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 4:31 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success since my > initial posting -- in fact I'm currently working on a new > method for accomplishing this task in certain challenging cases. > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase > signal output when called using the '-p' flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA/* > > From what I've experienced, this generally provides a good > signal [0,1) characterizing the respiratory phase using the > default settings. Occasionally, I've run into issues where > the default 'unsharpness' parameter needs to be adjusted to > give a clear signal (by appending the*--unsharp ##*flag to the > command). On more challenging shroud images -- notably, those > with little detectable signal from background -- additional > contrast-enhancement by pre-processing of the shroud has > assisted in signal extraction. > > I hope that helps -- and please let me know how it works out > for you. > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I've encountered exactly same issue and it would > be highly appreciated if you can share with me your > updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:*Rtk-users > [mailto:rtk-users-bounces at public.kitware.com]*On Behalf > Of*Joel Beaudry > *Sent:*Tuesday, March 17, 2015 5:25 PM > *To:*Matthew J. Riblett > > *Cc:*rtk-users at public.kitware.com > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but > I've had good success with using a Hilbert function in > python (scipy). I'm sure that Matlab has an equivalent > function, and maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett > > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a straightforward method > of going from the results of the rtkamsterdamshroud > and rtkextractshroudsignal applications to a [0,1) > phase signal for performing motion-compensated > reconstruction. I've been following along with the > MC-CBCT Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is used to > process the should signal prior to feeding it back > into the reconstruction application, but there is no > mention of how this is accomplished. I'm trying to > implement this into an automated workflow and I'd love > to know how this was accomplished. > > Thanks! > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > _______________________________________________ > 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 WEICHENG.SHEN at leidos.com Thu Oct 1 10:57:56 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Thu, 1 Oct 2015 14:57:56 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: image004.png Type: image/png Size: 15591 bytes Desc: image004.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 15591 bytes Desc: image001.png URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 1 11:23:48 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 17:23:48 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng wrote: > Hello Simon, > > > > Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside > RTK, the following error message appears: > > > > > ================================================================================================ > > > > CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): > By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project > has asked CMake to find a package configuration file provided by > "Gengetopt", but CMake did not find one. > > Could not find a package configuration file provided by "Gengetopt" with > any of the following names: > > GengetoptConfig.cmake > gengetopt-config.cmake > > Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set > "Gengetopt_DIR" to a directory containing one of the above files. If > "Gengetopt" provides a separate development package or SDK, be sure it has > been installed. > > > > > ================================================================================================ > > > > It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake > or gengetopt-config.cmake. I did a manual search for these files in the RTK > directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH > in the cmake GUI when performing configuration. The value of > CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln > file can now be successfully generated. > > > > Next I need to build the project using Visual Studio 2013. > > > > Thanks you very much for your help! > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Thursday, October 01, 2015 2:19 AM > *To:* Shen, Weicheng > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Unknown CMake command "WRAP_GGO" > > > > Hi, > > WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use > WRAP_GGO in an external project you need to do the same as in > applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the > easiest, to start with, is to build the rtktutorialapplication in the RTK > project. > > Let us know if that answered your problem, > > Simon > > > > On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: > > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 15591 bytes Desc: not available URL: From theday79 at gmail.com Thu Oct 1 17:33:51 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 1 Oct 2015 17:33:51 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <560CE88F.5030807@uclouvain.be> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> Message-ID: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park ; 'Matthew J. Riblett' ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I'm using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with "ITK + FFTW" in windows system? I'm just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I've encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I'm running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you're running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I'm not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I've tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn't work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn't compile that way initially, and it took a little bit of time to figure out. Hope that helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I'm now compiling itk-4.8 to use that feature since I've found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting - in fact I'm currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the '-p' flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I've experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I've run into issues where the default 'unsharpness' parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images - notably, those with little detectable signal from background - additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps - and please let me know how it works out for you. - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I've encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I've been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I'm trying to implement this into an automated workflow and I'd love to know how this was accomplished. Thanks! - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 joelbeaudry at gmail.com Thu Oct 1 17:40:30 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Thu, 1 Oct 2015 14:40:30 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Cyril, After trying out a few attempts, it seems like some values play nicer than others. Could it be an issue with floating point comparisons with the spacing and/or origins? It might explain why certain values seem to work (1.5) and others do not (0.88). I'll look at what values are being compared and get back to you. Thanks, Joel On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry wrote: > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 > spacing) and re-creating a mask off of that. So the motion mask should have > the same dimensions, spacing, and origin as the intended 4D image since I'm > using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating > my mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I created for > 160 (2), worked but not the case of 512 (0.88), and let you know what I > find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > wrote: > >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the small paragraph after >> the cuda command line : >> >> Note that the reconstructed volume in this example does not fully contain >> the attenuating object, causing hyper-attenuation artifacts on the borders >> of the result. To avoid these artifacts, reconstruct a larger volume >> (--dimension 256) should be fine. *Note that you will have to resize >> your motion mask as well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and allow any motion mask, >> but until I do, you can resize your motion mask using the CLITK tools ( >> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other datasets and it >> seems to be working. I need to increase the resolution and play around with >> the parameters now. >> >> I haven't had time to test it too much, but I do get an error when >> attempting to reconstruct with different dimensions. I'm using Cuda, and >> haven't tried it with just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >> AverageOutOfROIImageFilter: information of ROI image does not match input >> image" >> >> I'll be able to test some other things later and list more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line parameters AND data). Can >>> you restart it from scratch and let me know if you still have problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>> coordinates >>> - the regularization parameters (gamma space and gamma time) were way >>> too high. The regularization with a high gamma-time caused frames to be >>> identical, while it should only discourage variations >>> >>> I hope it works, now. If it doesn't work for you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and indeed, there are >>> several mistakes in it. I am working on correcting them. I'll keep you >>> posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>> >>> Hi RTK-users, >>> >>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>> example. The 5 frames should show some differences pertaining to patient >>> motion but the ones that I'm producing are identical, so no motion is >>> visible. >>> >>> Has anyone been able to follow the example and the provided dataset to >>> create a 4D image? >>> >>> Thanks, >>> Joel >>> >>> >>> _______________________________________________ >>> 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 Fri Oct 2 02:44:21 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 2 Oct 2015 08:44:21 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Joel, Can you explain how you created your mask? Looking at the code, it seems to me that if you create a 4D image with RTK, create a mask from this image with exactly the same meta info and pass it to ROOSTER, that should work in all cases. If I were you, I would compare the two mhd files (of the mask and the 4D image you used to create it) and verify that the meta info is exactly the same. For ROOSTER, I suggest to add an interpolation when the information is not inconsistent, e.g., in the main() function. I can do it if you agree Cyril. Simon On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry wrote: > Hi Cyril, > > After trying out a few attempts, it seems like some values play nicer than > others. Could it be an issue with floating point comparisons with the > spacing and/or origins? It might explain why certain values seem to work > (1.5) and others do not (0.88). I'll look at what values are being compared > and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >> spacing) and re-creating a mask off of that. So the motion mask should have >> the same dimensions, spacing, and origin as the intended 4D image since I'm >> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >> my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the mask I created >> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >> find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> Good to hear it's working now. >>> The error you get is explained on the wiki in the small paragraph after >>> the cuda command line : >>> >>> Note that the reconstructed volume in this example does not fully >>> contain the attenuating object, causing hyper-attenuation artifacts on the >>> borders of the result. To avoid these artifacts, reconstruct a larger >>> volume (--dimension 256) should be fine. *Note that you will have to >>> resize your motion mask as well, as 3D the motion mask is expected to have >>> the same size, spacing and origin as the first 3 dimensions of the 4D >>> output. * >>> >>> I guess I should take some time to fix that, and allow any motion mask, >>> but until I do, you can resize your motion mask using the CLITK tools ( >>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>> >>> Cyril >>> >>> >>> >>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other datasets and it >>> seems to be working. I need to increase the resolution and play around with >>> the parameters now. >>> >>> I haven't had time to test it too much, but I do get an error when >>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>> haven't tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>> AverageOutOfROIImageFilter: information of ROI image does not match input >>> image" >>> >>> I'll be able to test some other things later and list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> I have fixed the wiki example (command line parameters AND data). Can >>>> you restart it from scratch and let me know if you still have problems ? >>>> >>>> Roughly, the problems were the following: >>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>> coordinates >>>> - the regularization parameters (gamma space and gamma time) were way >>>> too high. The regularization with a high gamma-time caused frames to be >>>> identical, while it should only discourage variations >>>> >>>> I hope it works, now. If it doesn't work for you, please keep asking >>>> Cyril >>>> >>>> >>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki example, and indeed, there are >>>> several mistakes in it. I am working on correcting them. I'll keep you >>>> posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>> example. The 5 frames should show some differences pertaining to patient >>>> motion but the ones that I'm producing are identical, so no motion is >>>> visible. >>>> >>>> Has anyone been able to follow the example and the provided dataset to >>>> create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 cyril.mory at uclouvain.be Fri Oct 2 03:53:14 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 02 Oct 2015 09:53:14 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: <560E37EA.1060702@uclouvain.be> Indeed, resampling the mask if needed, to the correct size, spacing, origin and direction, seems the simplest way to deal with this issue. But I would do it in the filter rather than in the application, so that anything built on top of ROOSTER (i.e. incremental ROOSTER, or the rtkfourdroostertest) also benefits from it. Feel free to do it if you want, otherwise I'll take care of it next week :) On 10/02/2015 08:44 AM, Simon Rit wrote: > Hi Joel, > Can you explain how you created your mask? Looking at the code, it > seems to me that if you create a 4D image with RTK, create a mask from > this image with exactly the same meta info and pass it to ROOSTER, > that should work in all cases. If I were you, I would compare the two > mhd files (of the mask and the 4D image you used to create it) and > verify that the meta info is exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is > not inconsistent, e.g., in the main() function. I can do it if you > agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > > Hi Cyril, > > After trying out a few attempts, it seems like some values play > nicer than others. Could it be an issue with floating point > comparisons with the spacing and/or origins? It might explain why > certain values seem to work (1.5) and others do not (0.88). I'll > look at what values are being compared and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > > wrote: > > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions > 512 (0.88 spacing) and re-creating a mask off of that. So the > motion mask should have the same dimensions, spacing, and > origin as the intended 4D image since I'm using 4D rooster > with --dimension 512 --spacing 0.88. Perhaps I'm creating my > mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I > created for 160 (2), worked but not the case of 512 (0.88), > and let you know what I find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > > wrote: > > Hi Joel, > > Good to hear it's working now. > The error you get is explained on the wiki in the small > paragraph after the cuda command line : > > Note that the reconstructed volume in this example does > not fully contain the attenuating object, causing > hyper-attenuation artifacts on the borders of the result. > To avoid these artifacts, reconstruct a larger volume > (--dimension 256) should be fine. *Note that you will have > to resize your motion mask as well, as 3D the motion mask > is expected to have the same size, spacing and origin as > the first 3 dimensions of the 4D output. * > > I guess I should take some time to fix that, and allow any > motion mask, but until I do, you can resize your motion > mask using the CLITK tools > (http://www.creatis.insa-lyon.fr/rio/vv) or any method > that suits you. > > Cyril > > > > On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other >> datasets and it seems to be working. I need to increase >> the resolution and play around with the parameters now. >> >> I haven't had time to test it too much, but I do get an >> error when attempting to reconstruct with different >> dimensions. I'm using Cuda, and haven't tried it with >> just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws >> "In AverageOutOfROIImageFilter: information of ROI image >> does not match input image" >> >> I'll be able to test some other things later and list >> more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> I have fixed the wiki example (command line >> parameters AND data). Can you restart it from scratch >> and let me know if you still have problems ? >> >> Roughly, the problems were the following: >> - the "mm_50.mha" motion mask file was not aligned >> with the CBCT coordinates >> - the regularization parameters (gamma space and >> gamma time) were way too high. The regularization >> with a high gamma-time caused frames to be identical, >> while it should only discourage variations >> >> I hope it works, now. If it doesn't work for you, >> please keep asking >> Cyril >> >> >> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and >>> indeed, there are several mistakes in it. I am >>> working on correcting them. I'll keep you posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the >>>> 4DROOSTERReconstruction example. The 5 frames >>>> should show some differences pertaining to patient >>>> motion but the ones that I'm producing are >>>> identical, so no motion is visible. >>>> >>>> Has anyone been able to follow the example and the >>>> provided dataset to create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 joelbeaudry at gmail.com Fri Oct 2 12:31:38 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Fri, 2 Oct 2015 09:31:38 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: <560E37EA.1060702@uclouvain.be> References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: Hi Simon and Cyril, @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) and then use itkSnap to create a mask from that 3D image. I then use that mask as the input for ROOSTER, to which I again use the same spacing/dimensions. For some values it seems to work and other it doesn't. I'm wondering if itkSnap is truncating the spacing/dimension/origins when I save my mask, and perhaps why something like (160,2,-159) works but (511,0.88,-224.84). I'll take a look at the metadata. I'll try resampling my masks and like you said that should probably fix my issues. Thanks for the help, Joel On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory wrote: > Indeed, resampling the mask if needed, to the correct size, spacing, > origin and direction, seems the simplest way to deal with this issue. > But I would do it in the filter rather than in the application, so that > anything built on top of ROOSTER (i.e. incremental ROOSTER, or the > rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: > > Hi Joel, > Can you explain how you created your mask? Looking at the code, it seems > to me that if you create a 4D image with RTK, create a mask from this image > with exactly the same meta info and pass it to ROOSTER, that should work in > all cases. If I were you, I would compare the two mhd files (of the mask > and the 4D image you used to create it) and verify that the meta info is > exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is not > inconsistent, e.g., in the main() function. I can do it if you agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values play nicer >> than others. Could it be an issue with floating point comparisons with the >> spacing and/or origins? It might explain why certain values seem to work >> (1.5) and others do not (0.88). I'll look at what values are being compared >> and get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> wrote: >> >>> Hi Cyril, >>> >>> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >>> spacing) and re-creating a mask off of that. So the motion mask should have >>> the same dimensions, spacing, and origin as the intended 4D image since I'm >>> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >>> my mask incorrectly? >>> >>> I'll try and fiddle with it a bit later and see why the mask I created >>> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >>> find. >>> >>> Thanks again, >>> Joel >>> >>> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> Good to hear it's working now. >>>> The error you get is explained on the wiki in the small paragraph after >>>> the cuda command line : >>>> >>>> Note that the reconstructed volume in this example does not fully >>>> contain the attenuating object, causing hyper-attenuation artifacts on the >>>> borders of the result. To avoid these artifacts, reconstruct a larger >>>> volume (--dimension 256) should be fine. *Note that you will have to >>>> resize your motion mask as well, as 3D the motion mask is expected to have >>>> the same size, spacing and origin as the first 3 dimensions of the 4D >>>> output. * >>>> >>>> I guess I should take some time to fix that, and allow any motion mask, >>>> but until I do, you can resize your motion mask using the CLITK tools ( >>>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>>> >>>> Cyril >>>> >>>> >>>> >>>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>>> >>>> Hi Cyril, >>>> >>>> Works like a charm, thanks! I tried it on some other datasets and it >>>> seems to be working. I need to increase the resolution and play around with >>>> the parameters now. >>>> >>>> I haven't had time to test it too much, but I do get an error when >>>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>>> haven't tried it with just cpu reconstruction yet. >>>> >>>> i.e.) >>>> --dimension 160 --spacing 2 -> works >>>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>>> AverageOutOfROIImageFilter: information of ROI image does not match input >>>> image" >>>> >>>> I'll be able to test some other things later and list more details. >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> >>>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>>> wrote: >>>> >>>>> Hi Joel, >>>>> >>>>> I have fixed the wiki example (command line parameters AND data). Can >>>>> you restart it from scratch and let me know if you still have problems ? >>>>> >>>>> Roughly, the problems were the following: >>>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>>> coordinates >>>>> - the regularization parameters (gamma space and gamma time) were way >>>>> too high. The regularization with a high gamma-time caused frames to be >>>>> identical, while it should only discourage variations >>>>> >>>>> I hope it works, now. If it doesn't work for you, please keep asking >>>>> Cyril >>>>> >>>>> >>>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>>> >>>>> Hi Joel, >>>>> >>>>> I have just tried to reproduce the wiki example, and indeed, there are >>>>> several mistakes in it. I am working on correcting them. I'll keep you >>>>> posted. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>>> example. The 5 frames should show some differences pertaining to patient >>>>> motion but the ones that I'm producing are identical, so no motion is >>>>> visible. >>>>> >>>>> Has anyone been able to follow the example and the provided dataset to >>>>> create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 WEICHENG.SHEN at leidos.com Fri Oct 2 22:11:05 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Sat, 3 Oct 2015 02:11:05 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977222@EMP-EXMR104.corp.leidos.com> Hi Simon, Yes, if I run the CMake at the root of RTK, the example builds successfully. Thanks you very much! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 11:24 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng > wrote: Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: 15587 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 15591 bytes Desc: image002.png URL: From simon.rit at creatis.insa-lyon.fr Mon Oct 5 01:45:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 5 Oct 2015 07:45:06 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Oct 5 13:53:11 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 5 Oct 2015 13:53:11 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error1_using_ITK_FFT.png Type: image/png Size: 17214 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error in code.png Type: image/png Size: 21974 bytes Desc: not available URL: From cyril.mory at uclouvain.be Tue Oct 6 08:08:35 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Tue, 06 Oct 2015 14:08:35 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: <5613B9C3.4070309@uclouvain.be> Hi Joel, I have just pushed a fix for this issue: in the 4DROOSTER filter, I have added a resample filter between the ROI input and the AverageOutOfROIImageFilter. On my side, it runs fine. Let me know if it fixes the issue on your side. Thanks for pointing this out, Cyril On 10/02/2015 06:31 PM, Joel Beaudry wrote: > Hi Simon and Cyril, > > @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) > and then use itkSnap to create a mask from that 3D image. I then use > that mask as the input for ROOSTER, to which I again use the same > spacing/dimensions. For some values it seems to work and other it > doesn't. I'm wondering if itkSnap is truncating the > spacing/dimension/origins when I save my mask, and perhaps why > something like (160,2,-159) works but (511,0.88,-224.84). I'll take a > look at the metadata. > > I'll try resampling my masks and like you said that should probably > fix my issues. > > Thanks for the help, > Joel > > On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory > wrote: > > Indeed, resampling the mask if needed, to the correct size, > spacing, origin and direction, seems the simplest way to deal with > this issue. > But I would do it in the filter rather than in the application, so > that anything built on top of ROOSTER (i.e. incremental ROOSTER, > or the rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it > next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: >> Hi Joel, >> Can you explain how you created your mask? Looking at the code, >> it seems to me that if you create a 4D image with RTK, create a >> mask from this image with exactly the same meta info and pass it >> to ROOSTER, that should work in all cases. If I were you, I would >> compare the two mhd files (of the mask and the 4D image you used >> to create it) and verify that the meta info is exactly the same. >> For ROOSTER, I suggest to add an interpolation when the >> information is not inconsistent, e.g., in the main() function. I >> can do it if you agree Cyril. >> Simon >> >> On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values >> play nicer than others. Could it be an issue with floating >> point comparisons with the spacing and/or origins? It might >> explain why certain values seem to work (1.5) and others do >> not (0.88). I'll look at what values are being compared and >> get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with >> dimensions 512 (0.88 spacing) and re-creating a mask off >> of that. So the motion mask should have the same >> dimensions, spacing, and origin as the intended 4D image >> since I'm using 4D rooster with --dimension 512 --spacing >> 0.88. Perhaps I'm creating my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the >> mask I created for 160 (2), worked but not the case of >> 512 (0.88), and let you know what I find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the >> small paragraph after the cuda command line : >> >> Note that the reconstructed volume in this example >> does not fully contain the attenuating object, >> causing hyper-attenuation artifacts on the borders of >> the result. To avoid these artifacts, reconstruct a >> larger volume (--dimension 256) should be fine. *Note >> that you will have to resize your motion mask as >> well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 >> dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and >> allow any motion mask, but until I do, you can resize >> your motion mask using the CLITK tools >> (http://www.creatis.insa-lyon.fr/rio/vv) or any >> method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other >>> datasets and it seems to be working. I need to >>> increase the resolution and play around with the >>> parameters now. >>> >>> I haven't had time to test it too much, but I do get >>> an error when attempting to reconstruct with >>> different dimensions. I'm using Cuda, and haven't >>> tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> >>> throws "In AverageOutOfROIImageFilter: information >>> of ROI image does not match input image" >>> >>> I'll be able to test some other things later and >>> list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> >> > wrote: >>> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line >>> parameters AND data). Can you restart it from >>> scratch and let me know if you still have >>> problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not >>> aligned with the CBCT coordinates >>> - the regularization parameters (gamma space and >>> gamma time) were way too high. The >>> regularization with a high gamma-time caused >>> frames to be identical, while it should only >>> discourage variations >>> >>> I hope it works, now. If it doesn't work for >>> you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki >>>> example, and indeed, there are several mistakes >>>> in it. I am working on correcting them. I'll >>>> keep you posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the >>>>> 4DROOSTERReconstruction example. The 5 frames >>>>> should show some differences pertaining to >>>>> patient motion but the ones that I'm producing >>>>> are identical, so no motion is visible. >>>>> >>>>> Has anyone been able to follow the example and >>>>> the provided dataset to create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 Oct 6 09:11:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 6 Oct 2015 15:11:27 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park wrote: > Hi Simon, > > > > I?ve just tried to build it without FFTW library, as you have asked. > > > > I have encountered an error as shown in the attached pictures in running > ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, making > FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > > > Hope it helps. > > > > Yang > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Thanks a lot Yang for the detailed report, I'm sure that will be helpful > to many people. For my personal information, did you try to compile FFTW > from ITK as well? If it didn't work, could you let us know what was the > problem? > > Simon > > > > > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Tue Oct 6 10:49:55 2015 From: theday79 at gmail.com (Yang K Park) Date: Tue, 6 Oct 2015 10:49:55 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: <001c01d10046$44941080$cdbc3180$@gmail.com> Hi Simon, It seems that I misunderstood before. This time, I?ve followed your suggestion and encountered an error as follows: H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): fatal error C1083: Cannot open include file: 'fftw3.h': No such file or directory I?ve tested this with itk4.8.1, which is the most up-to-date release version. It seems that I need to specify the external fftw header file (fftw3.h), but the user interface for input does not appear in CMake unless I set ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. I hope this report can help itk developers resolve the issue. Thanks. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Tuesday, October 06, 2015 9:11 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com ] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park > Cc: Cyril Mory >; Matthew J. Riblett >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Tue Oct 6 11:00:16 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Tue, 6 Oct 2015 17:00:16 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <001c01d10046$44941080$cdbc3180$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> <001c01d10046$44941080$cdbc3180$@gmail.com> Message-ID: <5613E200.4050001@kitware.com> Yang, Simon, As I mentioned previously, you cannot build ITK with FFTW on Windows without setting ITK_USE_SYSTEM_FFTW=ON. You should get a warning in CMake specifying this. So the only solution to build ITK with FFTW on Windows is to use an externally compiled version of FFTW. Julien On 06/10/2015 16:49, Yang K Park wrote: > Hi Simon, > > It seems that I misunderstood before. This time, I?ve followed your > suggestion and encountered an error as follows: > > H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): > fatal error C1083: Cannot open include file: 'fftw3.h': No such file or > directory > > I?ve tested this with itk4.8.1, which is the most up-to-date release > version. > > It seems that I need to specify the external fftw header file (fftw3.h), > but the user interface for input does not appear in CMake unless I set > ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. > > I hope this report can help itk developers resolve the issue. > > Thanks. > > Yang > > *From:*simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of > *Simon Rit > *Sent:* Tuesday, October 06, 2015 9:11 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett > ; rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks Yang. I think I wasn't clear but what I meant was not to disable > FFTW but to compile and use FFTW in ITK by using > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=OFF > > instead of what I think you used > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=ON > > Julien Jomier from Kitware told me that both configurations worked for > him but your initial message suggests that the first did not work for > you. If you can confirm and explain your config (ITK version, compiler, > etc.). > > Simon > > PS: your test is useful anyway, I'll try to make the error message > clearer when FFTW is not used. > > On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: > > Hi Simon, > > I?ve just tried to build it without FFTW library, as you have asked. > > I have encountered an error as shown in the attached pictures in > running ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, > making FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > Hope it helps. > > Yang > > *From:*simon.rit at gmail.com > [mailto:simon.rit at gmail.com ] *On Behalf > Of *Simon Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > > *Cc:* Cyril Mory >; Matthew J. Riblett > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks a lot Yang for the detailed report, I'm sure that will be > helpful to many people. For my personal information, did you try to > compile FFTW from ITK as well? If it didn't work, could you let us > know what was the problem? > > Simon > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: > > Hi Cyril, > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally > succeeded. > > Following is the final version of my instruction. > > Thanks. > > Yang > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very > convenient! I really like it. Thanks for your hard works on this. > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > 1.Prepare fftw library files > > a.Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b.Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c.Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command > Prompt) > > d.Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e.Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > 2.Cmake for ITK > > a.Configure > > b.Turn on the following and reconfigure > > i.ITK_USE_SYSTEM_FFTW (mandatory to make the following options > appear) > > c.Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i.FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 > > ii.FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii.FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv.FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. > > d."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e.Reconfigure, Generate > > 3.Build ITK with Visual Studio > > a.In both Debug and Release > > 4.Cmake for RTK > > a.Default settings were used. > > b."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > 5.Build RTK using Visual Studio > > 6.Copy dll files to RTK bin folders > > a.Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b.To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7.Build RTK with Visual Studio > > *From:*Cyril Mory [mailto:cyril.mory at uclouvain.be > ] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park >; 'Matthew J. Riblett' > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam > Shroud > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just > have to activate it in the CMake options. On Windows, you cannot > do that. I do not have a clue why, but you cannot. You have to > install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled > DLLs from http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the > .lib files (that is absolutely necessary). You may have to run > the "lib.exe" program from the VS developer prompt instead of > the standard windows cmd.exe prompt. Specify you CPU > architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, > and you should be fine. I have successfully compiled this with > BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it > matters. > > If it works for you, then you might want to play around with the > other FFTW .lib files, and send on this mailing list a more > complete set of CMAKE options that works. I have tried some > other combinations without success, so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS > 2013) and I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with ?ITK + > FFTW? in windows system? > > I?m just trying to use *rtkextractshroudsignal* and it seems > to require FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors > as shown below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > I?m running on Ubuntu 14.04 LTS and used the distribution > library (FFTW 3.3.3). If you?re running on a Debian-based > linux system, you can also install the full development > library set using the following command: */sudo apt-get > install libfftw3-3 libfftw3-dev/*. Then just make sure that > these libraries are being used by rerunning CCMake. > > I?m not quite sure about the error being thrown in your > build, but perhaps one of the main developers would be able > to provide some more insight into the issue. > > Hope this helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to > compile ITK with those options on as you suggested. > > I?ve tried to use the up-to-date version of FFTW > (3.3.4), but it seems that it doesn?t work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved > external symbol __imp_fftw_execute referenced in > function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully > using in which system(Windows or Linux)? > > Thanks. > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the > inclusion of the Fast Fourier Transform components. > This requires compilation with the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that > way initially, and it took a little bit of time to > figure out. > > Hope that helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since > I?ve found my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data > from Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success > since my initial posting ? in fact I?m currently > working on a new method for accomplishing this task > in certain challenging cases. > > The most recent version of RTK provides an update to > the rtkextractshroudsignal application which > provides a phase signal output when called using the > ?-p? flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o > raw_signal.txt -p phase_signal.txt --method > LINEAR_BETWEEN_MINIMA/* > > From what I?ve experienced, this generally provides > a good signal [0,1) characterizing the respiratory > phase using the default settings. Occasionally, > I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear > signal (by appending the *--unsharp ##* flag to the > command). On more challenging shroud images ? > notably, those with little detectable signal from > background ? additional contrast-enhancement by > pre-processing of the shroud has assisted in signal > extraction. > > I hope that helps ? and please let me know how it > works out for you. > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue > and it would be highly appreciated if you can > share with me your updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical > School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:* Rtk-users > [mailto:rtk-users-bounces at public.kitware.com] > *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > > > *Cc:* rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal > data from Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab > script, but I've had good success with using a > Hilbert function in python (scipy). I'm sure > that Matlab has an equivalent function, and > maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. > Riblett > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a > straightforward method of going from the > results of the rtkamsterdamshroud and > rtkextractshroudsignal applications to a > [0,1) phase signal for performing > motion-compensated reconstruction. I?ve > been following along with the MC-CBCT > Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is > used to process the should signal prior to > feeding it back into the reconstruction > application, but there is no mention of how > this is accomplished. I?m trying to > implement this into an automated workflow > and I?d love to know how this was accomplished. > > Thanks! > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > > MCV Office Phone: +1.804.628.4858 > > > > _______________________________________________ > 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 > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From bottiger at gmail.com Mon Oct 12 05:42:20 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 11:42:20 +0200 Subject: [Rtk-users] Reconstruction problems Message-ID: Hi there I hope someone can help me me get started with RTK. First of all I should mention that I have compiled RTK on Windows 7 using Visual Studio 2013. Everything seems to compile and run just fine. Secondly: I tried to reproduce this example: http://wiki.openrtk.org/index.php/RTK/Scripts/FDK This was somewhat successful - I think. I could generate some projections, and reconstruct them. However, it just looks like an egg and not like a Shepp Logan phantom. See attachment. However, I'm unsure if this is expected or not. I took some homemade projections (of a small cylinder) and converted them into a MHA file (using rtkprojections.exe). The file looks correct in ImageJ. The dimensions are 370 pixels * 195 pixels * 361 projections You can get the file here: https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 The problem is that the reconstruction is wrong (see cylinder_recon). It looks like the dimensions are not read correctly, but I am unsure how I fix that? The rtkfdk.exe has a single --dimension parameter, but I am unsure which dimension that is suppose to be, but neither 195, 370 or any other value I could think of works for me. I hope someone can help me in the right direction. best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: SheppLogan.PNG Type: image/png Size: 150153 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cylinder_recon.PNG Type: image/png Size: 128472 bytes Desc: not available URL: From ghostcz at hotmail.com Mon Oct 12 05:54:44 2015 From: ghostcz at hotmail.com (louie L) Date: Mon, 12 Oct 2015 11:54:44 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Hi, You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? Cheers, Louie Sent from my iOS > On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 05:59:38 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 11:59:38 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: References: Message-ID: <561B848A.9090406@uclouvain.be> Hi Arvid, Well, you're on the right track :-) Your Shepp Logan reconstruction looks fine, I guess it is just a visualization problem: you can use vv http://www.creatis.insa-lyon.fr/rio/vv to open it and you will be able to change the "window" and "level" settings in visualization. Regarding the cylinder, can you send your geometry file too ? Regards Cyril Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Mon Oct 12 06:35:27 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:35:27 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: <561B848A.9090406@uclouvain.be> References: <561B848A.9090406@uclouvain.be> Message-ID: Hey Cyril I just wrote another e-mail about how I generated the geometry file (it's just simulated). But just in case I'll attach it here: best Arvid On Mon, Oct 12, 2015 at 11:59 AM, Cyril Mory wrote: > Hi Arvid, > > Well, you're on the right track :-) > Your Shepp Logan reconstruction looks fine, I guess it is just a > visualization problem: you can use vv > http://www.creatis.insa-lyon.fr/rio/vv > to open it and you will be able to change the "window" and "level" > settings in visualization. > > Regarding the cylinder, can you send your geometry file too ? > > Regards > Cyril > > Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example:http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here:https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > > > ------------------------------ > [image: Avast logo] > > L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le > logiciel antivirus Avast. > www.avast.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry360.xml Type: text/xml Size: 134495 bytes Desc: not available URL: From bottiger at gmail.com Mon Oct 12 06:36:03 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:36:03 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Sure. I'll admit I have yet to understand the specifics of the geometry file. Currently I just used a simulated one because that was what the SheppLogan example used, and the input projections looked similar. Here is a complete list of the commands I executed: rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 I did not do anything to the contrast and that is most likely the issue. I downloaded and installed vv and I can see some (very unclear) features inside the SheppLogan reconstruction - so that's nice. However, currently I'm mostly interested in getting the geometry right :) best On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: > Hi, > > You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? > > Cheers, > Louie > > Sent from my iOS > >> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >> >> Hi there >> >> I hope someone can help me me get started with RTK. >> >> First of all I should mention that I have compiled RTK on Windows 7 >> using Visual Studio 2013. Everything seems to compile and run just >> fine. >> >> Secondly: I tried to reproduce this example: >> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >> >> This was somewhat successful - I think. I could generate some >> projections, and reconstruct them. However, it just looks like an egg >> and not like a Shepp Logan phantom. See attachment. >> >> However, I'm unsure if this is expected or not. I took some homemade >> projections (of a small cylinder) and converted them into a MHA file >> (using rtkprojections.exe). The file looks correct in ImageJ. The >> dimensions are 370 pixels * 195 pixels * 361 projections >> >> You can get the file here: >> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >> >> The problem is that the reconstruction is wrong (see cylinder_recon). >> It looks like the dimensions are not read correctly, but I am unsure >> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >> I am unsure which dimension that is suppose to be, but neither 195, >> 370 or any other value I could think of works for me. >> >> I hope someone can help me in the right direction. >> >> best >> >> Arvid >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 15:52:10 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 21:52:10 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: <561C0F6A.6080602@uclouvain.be> Hi Arvid, Unfortunately, you cannot do that. You have to obtain the exact geometry of this particular acquisition from the cone beam device you used. If you need help to convert it to the RTK format, well, that's something you can ask for on this mailing list. Can you get the geometry data ? Regards, Cyril Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : > Sure. > > I'll admit I have yet to understand the specifics of the geometry > file. Currently I just used a simulated one because that was what the > SheppLogan example used, and the input projections looked similar. > > Here is a complete list of the commands I executed: > > rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml > > rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ > --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif > > rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o > c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g > c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 > > I did not do anything to the contrast and that is most likely the > issue. I downloaded and installed vv and I can see some (very unclear) > features inside the SheppLogan reconstruction - so that's nice. > However, currently I'm mostly interested in getting the geometry right :) > > best > > On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >> Hi, >> >> You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? >> >> Cheers, >> Louie >> >> Sent from my iOS >> >>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >>> >>> Hi there >>> >>> I hope someone can help me me get started with RTK. >>> >>> First of all I should mention that I have compiled RTK on Windows 7 >>> using Visual Studio 2013. Everything seems to compile and run just >>> fine. >>> >>> Secondly: I tried to reproduce this example: >>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>> >>> This was somewhat successful - I think. I could generate some >>> projections, and reconstruct them. However, it just looks like an egg >>> and not like a Shepp Logan phantom. See attachment. >>> >>> However, I'm unsure if this is expected or not. I took some homemade >>> projections (of a small cylinder) and converted them into a MHA file >>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>> dimensions are 370 pixels * 195 pixels * 361 projections >>> >>> You can get the file here: >>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>> >>> The problem is that the reconstruction is wrong (see cylinder_recon). >>> It looks like the dimensions are not read correctly, but I am unsure >>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>> I am unsure which dimension that is suppose to be, but neither 195, >>> 370 or any other value I could think of works for me. >>> >>> I hope someone can help me in the right direction. >>> >>> best >>> >>> Arvid >>> >>> >>> _______________________________________________ >>> 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 --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From cyril.mory at uclouvain.be Mon Oct 12 16:36:24 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 22:36:24 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: <561C1984.9030509@uclouvain.be> References: <561C1984.9030509@uclouvain.be> Message-ID: <561C19C8.5050304@uclouvain.be> Arvid, You can find a description of the geometry here : http://www.creatis.insa-lyon.fr/~srit/geometry.pdf In rtk/applications, several applications are simple converters from the cone beam manufacturer's raw geometry format to RTK geometry format, so you can also have a look at the code of these apps. If you know that you have an almost parallel beam, you can indeed try to use a dummy geometry file, but be careful: rtksimulatedgeometry generates a cone beam geometry, with large fan and cone angles if you leave the default parameters. You can adjust the 'sdd' and 'sid' options to simulate a very distant source, making rays almost parallel to each other (be careful with numerical precision, though). Hope it helps, Cyril Le 12/10/2015 21:59, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hello Cyril > > Thank you for getting back to me. I do have the geometry (albeit not > right here next to me). > However, my problem was that when I looked in the geometry file, I > didn't find it obvious how to define declare it - is it documented > somewhere? > > That said - the measurements I played around with is measured with an > almost parallel beam. I hoped I could reconstruct it (with minor > artifacts) using a dummy geometry file. > > best > > Arvid > > On Mon, Oct 12, 2015 at 9:52 PM, Cyril Mory wrote: >> Hi Arvid, >> >> Unfortunately, you cannot do that. You have to obtain the exact geometry of >> this particular acquisition from the cone beam device you used. >> If you need help to convert it to the RTK format, well, that's something you >> can ask for on this mailing list. >> Can you get the geometry data ? >> >> Regards, >> Cyril >> >> >> Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : >>> Sure. >>> >>> I'll admit I have yet to understand the specifics of the geometry >>> file. Currently I just used a simulated one because that was what the >>> SheppLogan example used, and the input projections looked similar. >>> >>> Here is a complete list of the commands I executed: >>> >>> rtksimulatedgeometry.exe -n 361 -o >>> c:\Users\aplb\Work\out_dir\geometry360.xml >>> >>> rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ >>> --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif >>> >>> rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o >>> c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g >>> c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 >>> >>> I did not do anything to the contrast and that is most likely the >>> issue. I downloaded and installed vv and I can see some (very unclear) >>> features inside the SheppLogan reconstruction - so that's nice. >>> However, currently I'm mostly interested in getting the geometry right :) >>> >>> best >>> >>> On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >>>> Hi, >>>> >>>> You can specify the size in each dimension. Can you post the arguments >>>> you used for the projections and reconstruction? Did you try to adjust the >>>> contrast of the output? >>>> >>>> Cheers, >>>> Louie >>>> >>>> Sent from my iOS >>>> >>>>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger >>>>> wrote: >>>>> >>>>> Hi there >>>>> >>>>> I hope someone can help me me get started with RTK. >>>>> >>>>> First of all I should mention that I have compiled RTK on Windows 7 >>>>> using Visual Studio 2013. Everything seems to compile and run just >>>>> fine. >>>>> >>>>> Secondly: I tried to reproduce this example: >>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>>>> >>>>> This was somewhat successful - I think. I could generate some >>>>> projections, and reconstruct them. However, it just looks like an egg >>>>> and not like a Shepp Logan phantom. See attachment. >>>>> >>>>> However, I'm unsure if this is expected or not. I took some homemade >>>>> projections (of a small cylinder) and converted them into a MHA file >>>>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>>>> dimensions are 370 pixels * 195 pixels * 361 projections >>>>> >>>>> You can get the file here: >>>>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>>>> >>>>> The problem is that the reconstruction is wrong (see cylinder_recon). >>>>> It looks like the dimensions are not read correctly, but I am unsure >>>>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>>>> I am unsure which dimension that is suppose to be, but neither 195, >>>>> 370 or any other value I could think of works for me. >>>>> >>>>> I hope someone can help me in the right direction. >>>>> >>>>> best >>>>> >>>>> Arvid >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >> >> >> --- >> L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le >> logiciel antivirus Avast. >> https://www.avast.com/antivirus >> --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From gnthibault at gmail.com Wed Oct 14 05:38:46 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Wed, 14 Oct 2015 11:38:46 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter Message-ID: Dear all, I recently had troubles while trying to rewrite my code, linked with libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite well, to using fdk reconstruction method. My first question: is there a general way to enable maximum debug log level at runtime in rtk ? My second question, is more specific: is it normal that I see such error message coming from itk when using FDKConeBeamReconstructionFilter : ExceptionObject caught with fdk->Update() in file [...] itk::ExceptionObject (0x7f377c020cb0) Location: "unknown" File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx Line: 416 Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred during SingleMethodExecute /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): Cannot compute FFT of image with size [2048, 1024, 11]. VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose size in each dimension has a prime factorization consisting of only 2s, 3s, or 5s. I suppose that this error arise while performing ramp filtering, but I see no relation between FFT configuration stated in the error log ( [2048, 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 projections. I also tried with 200 projection and I had the same problem, but with [2048, 1024, 34] Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to the total number of projection in my dataset every time. The revision I am currently using: commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 Merge: 578cf89 09d820c Thank you in advance for your help. Regards Thibault Notargiacomo -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 14 12:58:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 14 Oct 2015 18:58:06 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Hi Thibault, No, there is not really a log system that would allow you debugging at run time. You can compile a debug version that would enable a lot of messages related to the pipeline. For this, I think you need to use NDEBUG at compilation (it's an ITK mechanism that I never use). No, it's not normal that you see an error message. There are two things: - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it only handles power of 2/3/5 dimensions and it's slow. I always advise people to use FFTW by turning on ITK_USE_FFTW options during ITK's compilation. - I don't fully understand why vnl doesn't work either. I understand the first two dimensions, for vnl (which I strongly suggest to not use), I pad to the next power of 2 so 780 * 2 (for zero padding) -> 2048 780 -> 1024 but then, if you use 64 projections, why 11? Are you sure the second input image to FDKConeBeamReconstructionImageFilter has the dimension you want? I would try to connect input 2 to an itk::ImageFileWriter and check what are the dimensions of this image. If you're absolutely sure, then I'll try to reproduce and fix the issue. Simon On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < gnthibault at gmail.com> wrote: > Dear all, > > I recently had troubles while trying to rewrite my code, linked with > libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite > well, to using fdk reconstruction method. > > My first question: is there a general way to enable maximum debug log > level at runtime in rtk ? > > My second question, is more specific: is it normal that I see such error > message coming from itk when using FDKConeBeamReconstructionFilter : > > ExceptionObject caught with fdk->Update() in file [...] > > itk::ExceptionObject (0x7f377c020cb0) > Location: "unknown" > File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx > Line: 416 > Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred > during SingleMethodExecute > > /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: > itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): > Cannot compute FFT of image with size [2048, 1024, 11]. > VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose > size in each dimension has a prime factorization consisting of only 2s, 3s, > or 5s. > > I suppose that this error arise while performing ramp filtering, but I see > no relation between FFT configuration stated in the error log ( [2048, > 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 > projections. > > I also tried with 200 projection and I had the same problem, but with > [2048, 1024, 34] > > Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to > the total number of projection in my dataset every time. > > The revision I am currently using: > commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 > Merge: 578cf89 09d820c > > > Thank you in advance for your help. > > Regards > > Thibault Notargiacomo > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scouser27 at gmail.com Wed Oct 14 16:27:48 2015 From: scouser27 at gmail.com (sco user) Date: Wed, 14 Oct 2015 21:27:48 +0100 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi I'm a new user to RTK. I've been able to perform reconstructions of the Catphan and my own copies of Varian CBCT images with some success. I enabled the CUDA flags when making RTK so as to take advantage of the capabilities of my GPU. When I use --hardware="cuda" with the rtkfdk application, I have found that I must specify the lowmem option in order to get the reconstruction to run successfully. If I don't use lowmem, I get the following error: #### Reconstructing and writing... /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ unknown : Cuda Error : out of memory ExceptionObject caught with writer->Update() in file /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 itk::ExceptionObject (0x18e3460) Location: "unknown" File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h Line: 55 Description: Cuda Error : out of memory #### I take from this that I'm out of memory on the GPU. Is that correct? The GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be in order to get a typical Varian reconstruction to run without the lowmem option. On a side note, I know that the cuda option is working because it's a lot quicker than hardware="cpu", despite only having 96 cuda cores. Another question I'd like to ask is if anyone can shed some light on useful values for I-zero, wpc, scatter etc. With thanks in advance, Dave. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Oct 15 03:09:05 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 15 Oct 2015 09:09:05 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Without the lowmem flag all projection images may be loaded into graphics memory at once causing an out-of-memory issues. You can also check this thread: http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html Regards, Chao 2015-10-14 22:27 GMT+02:00 sco user : > Hi > > I'm a new user to RTK. > I've been able to perform reconstructions of the Catphan and my own copies > of Varian CBCT images with some success. I enabled the CUDA flags when > making RTK so as to take advantage of the capabilities of my GPU. > > When I use --hardware="cuda" with the rtkfdk application, I have found > that I must specify the lowmem option in order to get the reconstruction to > run successfully. If I don't use lowmem, I get the following error: > > #### > Reconstructing and writing... > /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ > unknown : Cuda Error : out of memory > > ExceptionObject caught with writer->Update() in file > /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 > > itk::ExceptionObject (0x18e3460) > Location: "unknown" > File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h > Line: 55 > Description: Cuda Error : out of memory > #### > > I take from this that I'm out of memory on the GPU. Is that correct? The > GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be > in order to get a typical Varian reconstruction to run without the lowmem > option. > > On a side note, I know that the cuda option is working because it's a lot > quicker than hardware="cpu", despite only having 96 cuda cores. > > > Another question I'd like to ask is if anyone can shed some light on > useful values for I-zero, wpc, scatter etc. > > With thanks in advance, > Dave. > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Thu Oct 15 03:52:25 2015 From: itkhelpacc at gmail.com (vishal k) Date: Thu, 15 Oct 2015 13:22:25 +0530 Subject: [Rtk-users] Need some help with Projection of 3D CT data Message-ID: hi, Im working on a CT data set using ITK.. Im trying to come up with a registration algorithm for fluoroscopy image obtained from C-Arm taken at some angle wrt to the patient and the projection of CT data taken at the same angle as that of the C-arm.. i need to change the angles of projection and the focal length of the source from time to time for my study.. I was wondering if i could do that using RTK? If yes, could you tell me where I find information that is relevant to my problem..Thank you Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 15 05:11:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:11:00 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Regarding the parameters (I-zero, wpc, scatter etc), we still need to create wiki pages to describe this (as agreed on during the Jul 31 meeting ). In the meantime, you'll find some info in each filter documentation. You can go to the projection pre-processing filter , look at the (complex) clickable graph and try to navigate in it. For example, I0 is for the LUTbasedVariableI0RawToAttenuationImageFilter and (therefore), inapplicable to Varian data as is. I'll keep the mailing list posted when we add info to the wiki. Good luck, Simon On Thu, Oct 15, 2015 at 9:09 AM, Chao Wu wrote: > Hi Dave, > > Without the lowmem flag all projection images may be loaded into graphics > memory at once causing an out-of-memory issues. > You can also check this thread: > http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html > > Regards, > Chao > > 2015-10-14 22:27 GMT+02:00 sco user : > >> Hi >> >> I'm a new user to RTK. >> I've been able to perform reconstructions of the Catphan and my own >> copies of Varian CBCT images with some success. I enabled the CUDA flags >> when making RTK so as to take advantage of the capabilities of my GPU. >> >> When I use --hardware="cuda" with the rtkfdk application, I have found >> that I must specify the lowmem option in order to get the reconstruction to >> run successfully. If I don't use lowmem, I get the following error: >> >> #### >> Reconstructing and writing... >> /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ >> unknown : Cuda Error : out of memory >> >> ExceptionObject caught with writer->Update() in file >> /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 >> >> itk::ExceptionObject (0x18e3460) >> Location: "unknown" >> File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h >> Line: 55 >> Description: Cuda Error : out of memory >> #### >> >> I take from this that I'm out of memory on the GPU. Is that correct? The >> GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be >> in order to get a typical Varian reconstruction to run without the lowmem >> option. >> >> On a side note, I know that the cuda option is working because it's a lot >> quicker than hardware="cpu", despite only having 96 cuda cores. >> >> >> Another question I'd like to ask is if anyone can shed some light on >> useful values for I-zero, wpc, scatter etc. >> >> With thanks in advance, >> Dave. >> >> >> _______________________________________________ >> 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 Thu Oct 15 05:33:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:33:42 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Yes, RTK can certainly do things like that. Start with a simple geometry following the example Forward projection of the wiki and maybe come back to us with more precise questions? Good luck, Simon On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: > hi, > Im working on a CT data set using ITK.. Im trying to come up with a > registration algorithm for fluoroscopy image obtained from C-Arm taken at > some angle wrt to the patient and the projection of CT data taken at the > same angle as that of the C-arm.. i need to change the angles of projection > and the focal length of the source from time to time for my study.. I was > wondering if i could do that using RTK? If yes, could you tell me where I > find information that is relevant to my problem..Thank you > Regards > > _______________________________________________ > Rtk-users mailing 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 Oct 15 05:49:16 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:49:16 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Hi, Please stick to the mailing list. That's exactly what I understood and my previous answer is still valid. Simon On Thu, Oct 15, 2015 at 11:47 AM, vishal k wrote: > hi Simon, > Thanks for ur advice..sorry i couldn't explain it properly...here my > problem explained in detail.. I have to register 3D ct data with > Fluoroscopy image obtained during surgery.. the problem is that they use > different co-ordinate systems.. I thought since i can obtained the C arm > position using the DICOM tags (source to patient distance etc), i could use > these positions values to obtain forward projection of the CT data.. after > doing this I feel my registering the forward projection image and the > actual fluoroscopy image(obtained during the surgery) would be easier...Please > advice me if there is any better way to deal this problem.. > Regards > Vishal > > On Thu, Oct 15, 2015 at 3:03 PM, Simon Rit > wrote: > >> Yes, RTK can certainly do things like that. Start with a simple geometry >> following the example Forward projection >> of the >> wiki and maybe come back to us with more >> precise questions? >> Good luck, >> Simon >> >> On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: >> >>> hi, >>> Im working on a CT data set using ITK.. Im trying to come up with a >>> registration algorithm for fluoroscopy image obtained from C-Arm taken at >>> some angle wrt to the patient and the projection of CT data taken at the >>> same angle as that of the C-arm.. i need to change the angles of projection >>> and the focal length of the source from time to time for my study.. I was >>> wondering if i could do that using RTK? If yes, could you tell me where I >>> find information that is relevant to my problem..Thank you >>> Regards >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnthibault at gmail.com Thu Oct 15 07:55:17 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Thu, 15 Oct 2015 13:55:17 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Thank you very much Simon for this advice, I should have read more carefully the recent posts about FFTWF / FFTWD. Now that Itk has been rebuilt using these flags, I no longer experience the previous problem. Unfortunately, when reconstructing with the CPU version of FDK, it seems that, although Ramp filtering and backprojection now do work very well, I still have issues with the weighting filter of FDK. As I am not familiar with analytic reconstruction methods, I don't know if the geometric parameters that are generated by the import method of Reg23ProjectionGeometry are consistant with the high variability of the gain factor applied to my projection by FDKWeightProjectionFilter: Just a short example: When using the following geometric parameters: SrcToCenter -1045.84 SrcToDet -1261.02 srcOffX 6.56918 srcOffY 6.56918 ProjOffX -151.44 ProjOffY -151.44 => FDKWeighting filter outputs an image that has a mean of -1.518 with a standard deviation of 2.056 with minimum value of -6.130 and maximum value of 1.871 On a frame where the source offset seems to be a little bit lower, I have the following gemetric parameters: SrcToCenter -1042.66 SrcToDet -1257.4 srcOffX 1.25469 srcOffY 1.25469 ProjOffX -150.321 ProjOffY -150.321 => FDKWeighting filter outputs an image that has a mean of -4.279E-4 with a standard deviation of 5.786E-4 with minimum value of -0.005 and maximum value of 5.268E-4 For comparison, our attenuation images in input of FDK have a mean of 0.8 with a standard deviation of 1.09 with minimum value of -1 and maximum value of 3.262. Here the negative values of attenuation arise from a problem while approximating the I0 in our images, although we should work on that problem, it was not that critical in SART reconstruction. I am surprised by such an important difference in gain applied to projection, given that, when disabling manually this weighting filter in RTK code, RampFiltering and BackProjection alone provided visually good reconstruction results. If you have any idea of what could have gone wrong in the process of importing geometry and/or applying weighting filter, I would be glad to hear it. Thank you in advance. Kind regards Thibault Notargiacomo 2015-10-14 18:58 GMT+02:00 Simon Rit : > Hi Thibault, > No, there is not really a log system that would allow you debugging at run > time. You can compile a debug version that would enable a lot of messages > related to the pipeline. For this, I think you need to use NDEBUG at > compilation (it's an ITK mechanism that I never use). > No, it's not normal that you see an error message. There are two things: > - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it > only handles power of 2/3/5 dimensions and it's slow. I always advise > people to use FFTW by turning on ITK_USE_FFTW options during ITK's > compilation. > - I don't fully understand why vnl doesn't work either. I understand the > first two dimensions, for vnl (which I strongly suggest to not use), I pad > to the next power of 2 so > 780 * 2 (for zero padding) -> 2048 > 780 -> 1024 > but then, if you use 64 projections, why 11? Are you sure the second input > image to FDKConeBeamReconstructionImageFilter has the dimension you want? I > would try to connect input 2 to an itk::ImageFileWriter and check what are > the dimensions of this image. If you're absolutely sure, then I'll try to > reproduce and fix the issue. > Simon > > On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < > gnthibault at gmail.com> wrote: > >> Dear all, >> >> I recently had troubles while trying to rewrite my code, linked with >> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >> well, to using fdk reconstruction method. >> >> My first question: is there a general way to enable maximum debug log >> level at runtime in rtk ? >> >> My second question, is more specific: is it normal that I see such error >> message coming from itk when using FDKConeBeamReconstructionFilter : >> >> ExceptionObject caught with fdk->Update() in file [...] >> >> itk::ExceptionObject (0x7f377c020cb0) >> Location: "unknown" >> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >> Line: 416 >> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >> during SingleMethodExecute >> >> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >> Cannot compute FFT of image with size [2048, 1024, 11]. >> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >> size in each dimension has a prime factorization consisting of only 2s, 3s, >> or 5s. >> >> I suppose that this error arise while performing ramp filtering, but I >> see no relation between FFT configuration stated in the error log ( [2048, >> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >> projections. >> >> I also tried with 200 projection and I had the same problem, but with >> [2048, 1024, 34] >> >> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >> to the total number of projection in my dataset every time. >> >> The revision I am currently using: >> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >> Merge: 578cf89 09d820c >> >> >> Thank you in advance for your help. >> >> Regards >> >> Thibault Notargiacomo >> >> _______________________________________________ >> Rtk-users mailing 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 Oct 15 10:50:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 16:50:30 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Interesting... I never used a geometry with negative sdd and sid but that's the issue here in my opinion. I did a quick test with positive and negative sdd/sid and that does not work for me either. Can you make them positive somehow? BTW, do you still use a modified version of the reg23 and can you share it? Thanks, Simon PS: the script I used for the test: rtksimulatedgeometry \ -o g \ -n 360 \ --sdd 1500 \ --sid 1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o pos.mha -g g rtksimulatedgeometry \ -o g \ -n 360 \ --sdd -1500 \ --sid -1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o neg.mha -g g On Thu, Oct 15, 2015 at 1:55 PM, Notargiacomo Thibault wrote: > Thank you very much Simon for this advice, I should have read more > carefully the recent posts about FFTWF / FFTWD. > > Now that Itk has been rebuilt using these flags, I no longer experience > the previous problem. > Unfortunately, when reconstructing with the CPU version of FDK, it seems > that, although Ramp filtering and backprojection now do work very well, I > still have issues with the weighting filter of FDK. > > As I am not familiar with analytic reconstruction methods, I don't know if > the geometric parameters that are generated by the import method of > Reg23ProjectionGeometry are consistant with the high variability of the > gain factor applied to my projection by FDKWeightProjectionFilter: > > Just a short example: > When using the following geometric parameters: > > SrcToCenter -1045.84 > SrcToDet -1261.02 > srcOffX 6.56918 > srcOffY 6.56918 > ProjOffX -151.44 > ProjOffY -151.44 > > => FDKWeighting filter outputs an image that has a mean of -1.518 with a > standard deviation of 2.056 with minimum value of -6.130 and maximum > value of 1.871 > > > On a frame where the source offset seems to be a little bit lower, I have > the following gemetric parameters: > > SrcToCenter -1042.66 > SrcToDet -1257.4 > srcOffX 1.25469 > srcOffY 1.25469 > ProjOffX -150.321 > ProjOffY -150.321 > > => FDKWeighting filter outputs an image that has a mean of -4.279E-4 > with a standard deviation of 5.786E-4 with minimum value of -0.005 and > maximum value of 5.268E-4 > > For comparison, our attenuation images in input of FDK have a mean of 0.8 > with a standard deviation of 1.09 with minimum value of -1 and maximum > value of 3.262. > > Here the negative values of attenuation arise from a problem while > approximating the I0 in our images, although we should work on that > problem, it was not that critical in SART reconstruction. > > I am surprised by such an important difference in gain applied to > projection, given that, when disabling manually this weighting filter in > RTK code, RampFiltering and BackProjection alone provided visually good > reconstruction results. > > If you have any idea of what could have gone wrong in the process of > importing geometry and/or applying weighting filter, I would be glad to > hear it. > > Thank you in advance. > > Kind regards > > Thibault Notargiacomo > > > > > > > > > 2015-10-14 18:58 GMT+02:00 Simon Rit : > >> Hi Thibault, >> No, there is not really a log system that would allow you debugging at >> run time. You can compile a debug version that would enable a lot of >> messages related to the pipeline. For this, I think you need to use NDEBUG >> at compilation (it's an ITK mechanism that I never use). >> No, it's not normal that you see an error message. There are two things: >> - the FFT of itk (compiled by default, based on vnl) is really bad IMO: >> it only handles power of 2/3/5 dimensions and it's slow. I always advise >> people to use FFTW by turning on ITK_USE_FFTW options during ITK's >> compilation. >> - I don't fully understand why vnl doesn't work either. I understand the >> first two dimensions, for vnl (which I strongly suggest to not use), I pad >> to the next power of 2 so >> 780 * 2 (for zero padding) -> 2048 >> 780 -> 1024 >> but then, if you use 64 projections, why 11? Are you sure the second >> input image to FDKConeBeamReconstructionImageFilter has the dimension you >> want? I would try to connect input 2 to an itk::ImageFileWriter and check >> what are the dimensions of this image. If you're absolutely sure, then I'll >> try to reproduce and fix the issue. >> Simon >> >> On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < >> gnthibault at gmail.com> wrote: >> >>> Dear all, >>> >>> I recently had troubles while trying to rewrite my code, linked with >>> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >>> well, to using fdk reconstruction method. >>> >>> My first question: is there a general way to enable maximum debug log >>> level at runtime in rtk ? >>> >>> My second question, is more specific: is it normal that I see such error >>> message coming from itk when using FDKConeBeamReconstructionFilter : >>> >>> ExceptionObject caught with fdk->Update() in file [...] >>> >>> itk::ExceptionObject (0x7f377c020cb0) >>> Location: "unknown" >>> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >>> Line: 416 >>> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >>> during SingleMethodExecute >>> >>> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >>> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >>> Cannot compute FFT of image with size [2048, 1024, 11]. >>> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >>> size in each dimension has a prime factorization consisting of only 2s, 3s, >>> or 5s. >>> >>> I suppose that this error arise while performing ramp filtering, but I >>> see no relation between FFT configuration stated in the error log ( [2048, >>> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >>> projections. >>> >>> I also tried with 200 projection and I had the same problem, but with >>> [2048, 1024, 34] >>> >>> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >>> to the total number of projection in my dataset every time. >>> >>> The revision I am currently using: >>> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >>> Merge: 578cf89 09d820c >>> >>> >>> Thank you in advance for your help. >>> >>> Regards >>> >>> Thibault Notargiacomo >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 03:12:36 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 09:12:36 +0200 Subject: [Rtk-users] Question about the geometry Message-ID: Dear all. Hello again. I writing to you again because I need some help to understand how to declare the geometry of the system. Cyril redirected me towards this document ( http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a lot, but unfortunately it has not been enough to make me reconstruct a tomogram. I have attached a drawing of my setup (setup.jpg). The source-to-detector distance is around 1600 mm. I just rotate the sample instead of the source, and the sample-detector distance is 15 cm which makes the isocenter distance 1450. The field of view is around 2 cm. The aligned projections are located here: https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 and the raw tiffs are here: https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 I would say the input data looks as nice, but when reconstructing I'm still just getting noise: This is how I perform my "reconstruction" # 361 projections from 0 to 360 degrees. The source-detector distance is 1.6 m and the # sample-detector distance is 15 cm # I have tried with many variations of --ssd and --sid but I think they all look the same rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o c:\Work\out_dir\geometry_real.xml # make a mha file out of the tiff files rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output c:\Work\out_dir\cylinder-a.mha --regexp .tif # "Reconstruct" the data. rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 The result can be viewed in the recon_result.PNG attachment. The reconstrcution can be found here: https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 Can someone please help me what I am doing wrong? best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: setup.jpg Type: image/jpeg Size: 29527 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: recon_result.PNG Type: image/png Size: 239196 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 06:09:04 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 12:09:04 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Is the origin and spacing of your projection data correct? What is your projection pixel size? Regards, Chao 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger : > Dear all. Hello again. > > I writing to you again because I need some help to understand how to > declare the geometry of the system. > > Cyril redirected me towards this document ( > http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > lot, but unfortunately it has not been enough to make me reconstruct a > tomogram. > > I have attached a drawing of my setup (setup.jpg). The > source-to-detector distance is around 1600 mm. I just rotate the > sample instead of the source, and the sample-detector distance is 15 > cm which makes the isocenter distance 1450. The field of view is > around 2 cm. > > The aligned projections are located here: > https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > and the raw tiffs are here: > https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > > I would say the input data looks as nice, but when reconstructing I'm > still just getting noise: > > This is how I perform my "reconstruction" > > # 361 projections from 0 to 360 degrees. The source-detector distance > is 1.6 m and the > # sample-detector distance is 15 cm > # I have tried with many variations of --ssd and --sid but I think > they all look the same > rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > c:\Work\out_dir\geometry_real.xml > > # make a mha file out of the tiff files > rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > c:\Work\out_dir\cylinder-a.mha --regexp .tif > > # "Reconstruct" the data. > rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha -g > c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > > The result can be viewed in the recon_result.PNG attachment. > The reconstrcution can be found here: > https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > > Can someone please help me what I am doing wrong? > > best > > Arvid > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 07:15:25 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 13:15:25 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao. Thank you for the reply. However, I'm not quite sure what you mean by origin and spacing. A pixel on the detector is ~200 microns, and the sample is magnified around 1.3 times. I do understand that having a correct geometry is important to get an output image with correct dimensions, but I do not understand it's so difficult for me to make a single successful reconstruction (possibly with a dummy geometry). best Arvid PS: Just to validate the data I'm testing on I installed Octave and created a sinogram I then ran through its iradon implementation. It seemed to work quite nicely (see attachments). On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > Hi Arvid, > > Is the origin and spacing of your projection data correct? What is your > projection pixel size? > > Regards, Chao > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > : >> >> Dear all. Hello again. >> >> I writing to you again because I need some help to understand how to >> declare the geometry of the system. >> >> Cyril redirected me towards this document ( >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> lot, but unfortunately it has not been enough to make me reconstruct a >> tomogram. >> >> I have attached a drawing of my setup (setup.jpg). The >> source-to-detector distance is around 1600 mm. I just rotate the >> sample instead of the source, and the sample-detector distance is 15 >> cm which makes the isocenter distance 1450. The field of view is >> around 2 cm. >> >> The aligned projections are located here: >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> and the raw tiffs are here: >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> I would say the input data looks as nice, but when reconstructing I'm >> still just getting noise: >> >> This is how I perform my "reconstruction" >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> is 1.6 m and the >> # sample-detector distance is 15 cm >> # I have tried with many variations of --ssd and --sid but I think >> they all look the same >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> c:\Work\out_dir\geometry_real.xml >> >> # make a mha file out of the tiff files >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> # "Reconstruct" the data. >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> The result can be viewed in the recon_result.PNG attachment. >> The reconstrcution can be found here: >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> Can someone please help me what I am doing wrong? >> >> best >> >> Arvid >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: Capture.JPG Type: image/jpeg Size: 58155 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 08:03:16 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 14:03:16 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Since you know how important a correct geometry is, you should understand why you need projection origin and spacing. CT geometry has more parameters than sid and sdd. How big the detector pixel size (spacing) and how the detector is places w.r.t. the central ray (origin) also play a role in the geometry. And in-plane/out-of-plane rotations etc. In your dataset the correct spacing and origin information is not stored correctly in the projection data, so the total geometry is wrong. I have tested your data with the following command line and it gives meaningful image. The newspacing and neworigin arguments force rtkfdk to accept spacing and origin information of projections from command line instead of from the data. Also I change the spacing of the volume from 2 to 0.2 because your object is small. rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 Apparently there is still some misalignment between this guessed geometry and the real geometry, which you need to figure out with your own hardware. Regards, Chao 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Hi Chao. > > Thank you for the reply. However, I'm not quite sure what you mean by > origin and spacing. > A pixel on the detector is ~200 microns, and the sample is magnified > around 1.3 times. > > I do understand that having a correct geometry is important to get an > output image with correct dimensions, but I do not understand it's so > difficult for me to make a single successful reconstruction (possibly > with a dummy geometry). > > best > > Arvid > > PS: Just to validate the data I'm testing on I installed Octave and > created a sinogram I then ran through its iradon implementation. It > seemed to work quite nicely (see attachments). > > On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > > Hi Arvid, > > > > Is the origin and spacing of your projection data correct? What is your > > projection pixel size? > > > > Regards, Chao > > > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Dear all. Hello again. > >> > >> I writing to you again because I need some help to understand how to > >> declare the geometry of the system. > >> > >> Cyril redirected me towards this document ( > >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> lot, but unfortunately it has not been enough to make me reconstruct a > >> tomogram. > >> > >> I have attached a drawing of my setup (setup.jpg). The > >> source-to-detector distance is around 1600 mm. I just rotate the > >> sample instead of the source, and the sample-detector distance is 15 > >> cm which makes the isocenter distance 1450. The field of view is > >> around 2 cm. > >> > >> The aligned projections are located here: > >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> and the raw tiffs are here: > >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> > >> I would say the input data looks as nice, but when reconstructing I'm > >> still just getting noise: > >> > >> This is how I perform my "reconstruction" > >> > >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> is 1.6 m and the > >> # sample-detector distance is 15 cm > >> # I have tried with many variations of --ssd and --sid but I think > >> they all look the same > >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> c:\Work\out_dir\geometry_real.xml > >> > >> # make a mha file out of the tiff files > >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> > >> # "Reconstruct" the data. > >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> > >> The result can be viewed in the recon_result.PNG attachment. > >> The reconstrcution can be found here: > >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> > >> Can someone please help me what I am doing wrong? > >> > >> best > >> > >> Arvid > >> > >> _______________________________________________ > >> Rtk-users mailing 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 Fri Oct 16 08:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 16 Oct 2015 14:15:43 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Thanks a lot Chao, I'm so glad that someone else than me did this! Just as a side note, Arvid, if you don't understand what is the origin and the spacing, look at the ITK software guide section 4.1.4, this is VERY important. Simon On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > Hi Arvid, > > Since you know how important a correct geometry is, you should understand > why you need projection origin and spacing. > CT geometry has more parameters than sid and sdd. How big the detector > pixel size (spacing) and how the detector is places w.r.t. the central ray > (origin) also play a role in the geometry. And in-plane/out-of-plane > rotations etc. > In your dataset the correct spacing and origin information is not stored > correctly in the projection data, so the total geometry is wrong. > > I have tested your data with the following command line and it gives > meaningful image. The newspacing and neworigin arguments force rtkfdk to > accept spacing and origin information of projections from command line > instead of from the data. Also I change the spacing of the volume from 2 to > 0.2 because your object is small. > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha > -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 > --newspacing=0.2 --neworigin=-20,-20 > > Apparently there is still some misalignment between this guessed geometry > and the real geometry, which you need to figure out with your own hardware. > > Regards, > Chao > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < > bottiger at gmail.com>: > >> Hi Chao. >> >> Thank you for the reply. However, I'm not quite sure what you mean by >> origin and spacing. >> A pixel on the detector is ~200 microns, and the sample is magnified >> around 1.3 times. >> >> I do understand that having a correct geometry is important to get an >> output image with correct dimensions, but I do not understand it's so >> difficult for me to make a single successful reconstruction (possibly >> with a dummy geometry). >> >> best >> >> Arvid >> >> PS: Just to validate the data I'm testing on I installed Octave and >> created a sinogram I then ran through its iradon implementation. It >> seemed to work quite nicely (see attachments). >> >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >> > Hi Arvid, >> > >> > Is the origin and spacing of your projection data correct? What is your >> > projection pixel size? >> > >> > Regards, Chao >> > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> > : >> >> >> >> Dear all. Hello again. >> >> >> >> I writing to you again because I need some help to understand how to >> >> declare the geometry of the system. >> >> >> >> Cyril redirected me towards this document ( >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> >> lot, but unfortunately it has not been enough to make me reconstruct a >> >> tomogram. >> >> >> >> I have attached a drawing of my setup (setup.jpg). The >> >> source-to-detector distance is around 1600 mm. I just rotate the >> >> sample instead of the source, and the sample-detector distance is 15 >> >> cm which makes the isocenter distance 1450. The field of view is >> >> around 2 cm. >> >> >> >> The aligned projections are located here: >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> >> and the raw tiffs are here: >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> >> >> I would say the input data looks as nice, but when reconstructing I'm >> >> still just getting noise: >> >> >> >> This is how I perform my "reconstruction" >> >> >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> >> is 1.6 m and the >> >> # sample-detector distance is 15 cm >> >> # I have tried with many variations of --ssd and --sid but I think >> >> they all look the same >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> >> c:\Work\out_dir\geometry_real.xml >> >> >> >> # make a mha file out of the tiff files >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> >> >> # "Reconstruct" the data. >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> >> c:\Work\out_dir\cylinder_a_recon.mha -g >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> >> >> The result can be viewed in the recon_result.PNG attachment. >> >> The reconstrcution can be found here: >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> >> >> Can someone please help me what I am doing wrong? >> >> >> >> best >> >> >> >> Arvid >> >> >> >> _______________________________________________ >> >> 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 bottiger at gmail.com Fri Oct 16 08:33:38 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 14:33:38 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao Wu Thank you very much! This is definitely something I can use in order to move forward. I'm not trying to make the best possible reconstruction out of this dataset, but just have something that works so I can start playing around and get familiar with RTK. Which I do have now. And to Simon: Thanks for the link. bets Arvid On Fri, Oct 16, 2015 at 2:15 PM, Simon Rit wrote: > Thanks a lot Chao, I'm so glad that someone else than me did this! > Just as a side note, Arvid, if you don't understand what is the origin and > the spacing, look at the ITK software guide section 4.1.4, this is VERY > important. > Simon > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: >> >> Hi Arvid, >> >> Since you know how important a correct geometry is, you should understand >> why you need projection origin and spacing. >> CT geometry has more parameters than sid and sdd. How big the detector >> pixel size (spacing) and how the detector is places w.r.t. the central ray >> (origin) also play a role in the geometry. And in-plane/out-of-plane >> rotations etc. >> In your dataset the correct spacing and origin information is not stored >> correctly in the projection data, so the total geometry is wrong. >> >> I have tested your data with the following command line and it gives >> meaningful image. The newspacing and neworigin arguments force rtkfdk to >> accept spacing and origin information of projections from command line >> instead of from the data. Also I change the spacing of the volume from 2 to >> 0.2 because your object is small. >> >> rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml >> --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 >> >> Apparently there is still some misalignment between this guessed geometry >> and the real geometry, which you need to figure out with your own hardware. >> >> Regards, >> Chao >> >> >> 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> : >>> >>> Hi Chao. >>> >>> Thank you for the reply. However, I'm not quite sure what you mean by >>> origin and spacing. >>> A pixel on the detector is ~200 microns, and the sample is magnified >>> around 1.3 times. >>> >>> I do understand that having a correct geometry is important to get an >>> output image with correct dimensions, but I do not understand it's so >>> difficult for me to make a single successful reconstruction (possibly >>> with a dummy geometry). >>> >>> best >>> >>> Arvid >>> >>> PS: Just to validate the data I'm testing on I installed Octave and >>> created a sinogram I then ran through its iradon implementation. It >>> seemed to work quite nicely (see attachments). >>> >>> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >>> > Hi Arvid, >>> > >>> > Is the origin and spacing of your projection data correct? What is your >>> > projection pixel size? >>> > >>> > Regards, Chao >>> > >>> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >>> > : >>> >> >>> >> Dear all. Hello again. >>> >> >>> >> I writing to you again because I need some help to understand how to >>> >> declare the geometry of the system. >>> >> >>> >> Cyril redirected me towards this document ( >>> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >>> >> lot, but unfortunately it has not been enough to make me reconstruct a >>> >> tomogram. >>> >> >>> >> I have attached a drawing of my setup (setup.jpg). The >>> >> source-to-detector distance is around 1600 mm. I just rotate the >>> >> sample instead of the source, and the sample-detector distance is 15 >>> >> cm which makes the isocenter distance 1450. The field of view is >>> >> around 2 cm. >>> >> >>> >> The aligned projections are located here: >>> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >>> >> and the raw tiffs are here: >>> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >>> >> >>> >> I would say the input data looks as nice, but when reconstructing I'm >>> >> still just getting noise: >>> >> >>> >> This is how I perform my "reconstruction" >>> >> >>> >> # 361 projections from 0 to 360 degrees. The source-detector distance >>> >> is 1.6 m and the >>> >> # sample-detector distance is 15 cm >>> >> # I have tried with many variations of --ssd and --sid but I think >>> >> they all look the same >>> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >>> >> c:\Work\out_dir\geometry_real.xml >>> >> >>> >> # make a mha file out of the tiff files >>> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >>> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >>> >> >>> >> # "Reconstruct" the data. >>> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >>> >> c:\Work\out_dir\cylinder_a_recon.mha -g >>> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >>> >> >>> >> The result can be viewed in the recon_result.PNG attachment. >>> >> The reconstrcution can be found here: >>> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >>> >> >>> >> Can someone please help me what I am doing wrong? >>> >> >>> >> best >>> >> >>> >> Arvid >>> >> >>> >> _______________________________________________ >>> >> 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 simon.rit at creatis.insa-lyon.fr Tue Oct 20 14:38:24 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 20 Oct 2015 20:38:24 +0200 Subject: [Rtk-users] using RTK with projection matrices and projection images In-Reply-To: References: Message-ID: Dear Shiras Abdurahman, It's better to email the mailing so that everybody can participate our discussion. We developped a tool to do this a while ago but it's never made it to the public repo. I have enclosed it if you want to have a look but it does what you want I think. The part of interest for you is how the variable matProj is converted to an RTK geometry. We'll try to clean it and push it to the main repo in November if you can't figure out how to use it. Good luck! Simon On Tue, Oct 20, 2015 at 5:07 PM, shiras abdurahman < shiras.abdurahman at gmail.com> wrote: > Dear Dr. Rit, > > My name is Shiras Abdurahman and I am a PhD student at ovgu Magdeburg, > Germany. Currently, I am working in tomographic reconstruction and I > started to using RTK. I have projection images and corresponding projection > matrices. I want to reconstruct volume with RTK. Is it possible to set > projection matrices directly and reconstruct the volume. Or do I need to > decompose first and get intrinsic and extrinsic parameters especially > rotation angles and use addProjection function? > I know that geometry can be read from xml file. > > Thank you for your time and patience. > > With regards, > Shiras Abdurahman > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rtkthales.cxx Type: text/x-c++src Size: 9360 bytes Desc: not available URL: From wuchao04 at gmail.com Mon Oct 26 16:30:58 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 26 Oct 2015 21:30:58 +0100 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Well, that's just some guess. I assume the central ray goes towards the center of your detector, so the origin should be denoted as somewhere near (- half_width, - half_height) in millimeter. Then I just fine-tune it manually a little bit to get a little bit better results... Regards, Chao 2015-10-26 19:44 GMT+01:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Dear Chao. > > I am very thankful for the help you provided me some days ago on the > RTK mailing list. However, I have a quick followup question for you, > which I have not been able to learn by reading the (very long) manual > another user provided me with. > > I am now working on another dataset, and get similar artifact when > reconstructing. Could you please help understand why you picked the > parameters you did? I guess the "spacing" is pixel size, but why did > why you pick "neworigin" to be -20,-20 ? > > best > > Arvid > > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > > Hi Arvid, > > > > Since you know how important a correct geometry is, you should understand > > why you need projection origin and spacing. > > CT geometry has more parameters than sid and sdd. How big the detector > pixel > > size (spacing) and how the detector is places w.r.t. the central ray > > (origin) also play a role in the geometry. And in-plane/out-of-plane > > rotations etc. > > In your dataset the correct spacing and origin information is not stored > > correctly in the projection data, so the total geometry is wrong. > > > > I have tested your data with the following command line and it gives > > meaningful image. The newspacing and neworigin arguments force rtkfdk to > > accept spacing and origin information of projections from command line > > instead of from the data. Also I change the spacing of the volume from 2 > to > > 0.2 because your object is small. > > > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > > c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml > > --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 > > > > Apparently there is still some misalignment between this guessed geometry > > and the real geometry, which you need to figure out with your own > hardware. > > > > Regards, > > Chao > > > > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Hi Chao. > >> > >> Thank you for the reply. However, I'm not quite sure what you mean by > >> origin and spacing. > >> A pixel on the detector is ~200 microns, and the sample is magnified > >> around 1.3 times. > >> > >> I do understand that having a correct geometry is important to get an > >> output image with correct dimensions, but I do not understand it's so > >> difficult for me to make a single successful reconstruction (possibly > >> with a dummy geometry). > >> > >> best > >> > >> Arvid > >> > >> PS: Just to validate the data I'm testing on I installed Octave and > >> created a sinogram I then ran through its iradon implementation. It > >> seemed to work quite nicely (see attachments). > >> > >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > >> > Hi Arvid, > >> > > >> > Is the origin and spacing of your projection data correct? What is > your > >> > projection pixel size? > >> > > >> > Regards, Chao > >> > > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > >> > : > >> >> > >> >> Dear all. Hello again. > >> >> > >> >> I writing to you again because I need some help to understand how to > >> >> declare the geometry of the system. > >> >> > >> >> Cyril redirected me towards this document ( > >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> >> lot, but unfortunately it has not been enough to make me reconstruct > a > >> >> tomogram. > >> >> > >> >> I have attached a drawing of my setup (setup.jpg). The > >> >> source-to-detector distance is around 1600 mm. I just rotate the > >> >> sample instead of the source, and the sample-detector distance is 15 > >> >> cm which makes the isocenter distance 1450. The field of view is > >> >> around 2 cm. > >> >> > >> >> The aligned projections are located here: > >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> >> and the raw tiffs are here: > >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> >> > >> >> I would say the input data looks as nice, but when reconstructing I'm > >> >> still just getting noise: > >> >> > >> >> This is how I perform my "reconstruction" > >> >> > >> >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> >> is 1.6 m and the > >> >> # sample-detector distance is 15 cm > >> >> # I have tried with many variations of --ssd and --sid but I think > >> >> they all look the same > >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> >> c:\Work\out_dir\geometry_real.xml > >> >> > >> >> # make a mha file out of the tiff files > >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> >> > >> >> # "Reconstruct" the data. > >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> >> > >> >> The result can be viewed in the recon_result.PNG attachment. > >> >> The reconstrcution can be found here: > >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> >> > >> >> Can someone please help me what I am doing wrong? > >> >> > >> >> best > >> >> > >> >> Arvid > >> >> > >> >> _______________________________________________ > >> >> Rtk-users mailing 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 Wed Oct 28 11:47:13 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Wed, 28 Oct 2015 16:47:13 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter Message-ID: <5630EE01.5070900@cppm.in2p3.fr> Hello everyone, I have a question/suggestion about the set of rtkDraw*ImageFilter. This filter are written as additive filters: for example, in rtkDrawEllipsoidImageFilter.txx, we can find for(..) itOut.Set( ellipsoid.density + itIn.Get() ) instead of for(..) itOut.Set( ellipsoid.density ) I think it can be more flexible the second option, because we can always associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. Moreover, the rtkDrawGeometricPhantomImageFilter class already uses itkAddImageFilter in order to have additive filters (which is redundant in current situation). What do you think ? Regards From shiraska at gmail.com Wed Oct 28 13:12:36 2015 From: shiraska at gmail.com (Shiras Abdurahman) Date: Wed, 28 Oct 2015 18:12:36 +0100 Subject: [Rtk-users] Filtered projection images Message-ID: Hi, I want to access processed projections especially filtered projections which are used for backprojection. Is it possible in RTK? Shiras -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 28 15:52:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:52:10 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: <5630EE01.5070900@cppm.in2p3.fr> References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: Hi Mathieu, Thanks for pointing this out. I agree that it might not be the best solution, yet one could argue that you could simply create a constant image with 0 to do what you'd like from the current implementation. My main problem is that I just tried to do what you suggest and some tests then fail... which shows the obvious, it's not a backward compatible change. I see two solutions: - keep it as is and you use ConstantImageFilter + we remove useless add filters, - a more complex but maybe more elegant solution: add a third template parameter for the operation that would allow the user to do what he'd like in a functor. That's what's done with filters that derive from itk::UnaryImageFilter . The default would be itk::Add2 but we could find or implement another one that simply discards the pixel value. What do you think? Simon PS: looking in the code, I just found that rtk::DrawConeImageFilter is not consistent with the others, it was always setting to 0 outside... that's been fixed! On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont wrote: > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. This > filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can always > associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is redundant in > current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > Rtk-users mailing 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 Oct 28 15:53:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:53:25 +0100 Subject: [Rtk-users] Filtered projection images In-Reply-To: References: Message-ID: Hi, I guess you mean filtered projections that are used in filtered backprojections algorithm? The filter you are looking for is rtk::FFTRampImageFilter which implements the ramp filter. There is a command line tool that can do it, rtkramp. Regards, Simon On Wed, Oct 28, 2015 at 6:12 PM, Shiras Abdurahman wrote: > Hi, > > I want to access processed projections especially filtered projections > which are used for backprojection. Is it possible in RTK? > > Shiras > > _______________________________________________ > Rtk-users mailing 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 Fri Oct 30 06:56:50 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Fri, 30 Oct 2015 11:56:50 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: <56334CF2.8070902@cppm.in2p3.fr> Hi, In case of your first solution, you can not chain several Draw*ImageFilters. For example, if you want to create small cylinders in a big cylinder. Your second solution is better. One another solution can be a thing like itk:SpatialObject but more simpler. An rtk::SpatialObject which one function (isInside(point)). We create a rtkDrawImageFilter class and implement ThreadedGenerateData like this : DrawImageFilter::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType itkNotUsed(threadId) { ... while( !itOut.IsAtEnd() ) { this->GetInput()->TransformIndexToPhysicalPoint(itOut.GetIndex(), point); if(m_rtkSpatialObject.isInside(point) itOut.Set(m_rtkFillFunctor(density, itIn.Get()); ... } DrawConeImageFilter class can be a child of this new DrawImageFilter (with new methods like setAngle, SetRadius which will adjust the rtkConeSpatialObject) This solution suppress duplicated code in Draw*ImageFilter::ThreadedGenerateData and makes easier implementation of another type of filling. On 28/10/2015 20:52, Simon Rit wrote: > Hi Mathieu, > Thanks for pointing this out. I agree that it might not be the best > solution, yet one could argue that you could simply create a constant > image with 0 to do what you'd like from the current implementation. My > main problem is that I just tried to do what you suggest and some tests > then fail... which shows the obvious, it's not a backward compatible change. > I see two solutions: > - keep it as is and you use ConstantImageFilter + we remove useless add > filters, > - a more complex but maybe more elegant solution: add a third template > parameter for the operation that would allow the user to do what he'd > like in a functor. That's what's done with filters that derive from > itk::UnaryImageFilter > . > The default would be itk::Add2 but we could find or implement another > one that simply discards the pixel value. > What do you think? > Simon > > PS: looking in the code, I just found that rtk::DrawConeImageFilter is > not consistent with the others, it was always setting to 0 outside... > that's been fixed! > > On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont > wrote: > > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. > This filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can > always associate Draw*ImageFilter and itkAddImageFilter to get an > additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is > redundant in current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > 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 Oct 1 02:18:53 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 08:18:53 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng wrote: > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: From cyril.mory at uclouvain.be Thu Oct 1 04:02:23 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Thu, 01 Oct 2015 10:02:23 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> Message-ID: <560CE88F.5030807@uclouvain.be> Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I'm using windows system (windows7 64 with VS 2013) and > I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with "ITK + FFTW" in > windows system? > > I'm just trying to use *rtkextractshroudsignal* and it seems to > require FFTW library externally. > > When I tried to use FFTW 3.3.4, I've encountered link errors as shown > below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > I'm running on Ubuntu 14.04 LTS and used the distribution library > (FFTW 3.3.3). If you're running on a Debian-based linux system, you > can also install the full development library set using the following > command: */sudo apt-get install libfftw3-3 libfftw3-dev/*. Then just > make sure that these libraries are being used by rerunning CCMake. > > I'm not quite sure about the error being thrown in your build, but > perhaps one of the main developers would be able to provide some more > insight into the issue. > > Hope this helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK > with those options on as you suggested. > > I've tried to use the up-to-date version of FFTW (3.3.4), but it > seems that it doesn't work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved external > symbol __imp_fftw_execute referenced in function "protected: > virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully using in > which system(Windows or Linux)? > > Thanks. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 6:56 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the inclusion of the > Fast Fourier Transform components. This requires compilation with > the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn't compile that way > initially, and it took a little bit of time to figure out. > > Hope that helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I'm now compiling itk-4.8 to use that feature since I've found > my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 4:31 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success since my > initial posting -- in fact I'm currently working on a new > method for accomplishing this task in certain challenging cases. > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase > signal output when called using the '-p' flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA/* > > From what I've experienced, this generally provides a good > signal [0,1) characterizing the respiratory phase using the > default settings. Occasionally, I've run into issues where > the default 'unsharpness' parameter needs to be adjusted to > give a clear signal (by appending the*--unsharp ##*flag to the > command). On more challenging shroud images -- notably, those > with little detectable signal from background -- additional > contrast-enhancement by pre-processing of the shroud has > assisted in signal extraction. > > I hope that helps -- and please let me know how it works out > for you. > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I've encountered exactly same issue and it would > be highly appreciated if you can share with me your > updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:*Rtk-users > [mailto:rtk-users-bounces at public.kitware.com]*On Behalf > Of*Joel Beaudry > *Sent:*Tuesday, March 17, 2015 5:25 PM > *To:*Matthew J. Riblett > > *Cc:*rtk-users at public.kitware.com > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but > I've had good success with using a Hilbert function in > python (scipy). I'm sure that Matlab has an equivalent > function, and maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett > > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a straightforward method > of going from the results of the rtkamsterdamshroud > and rtkextractshroudsignal applications to a [0,1) > phase signal for performing motion-compensated > reconstruction. I've been following along with the > MC-CBCT Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is used to > process the should signal prior to feeding it back > into the reconstruction application, but there is no > mention of how this is accomplished. I'm trying to > implement this into an automated workflow and I'd love > to know how this was accomplished. > > Thanks! > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > _______________________________________________ > 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 WEICHENG.SHEN at leidos.com Thu Oct 1 10:57:56 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Thu, 1 Oct 2015 14:57:56 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: image004.png Type: image/png Size: 15591 bytes Desc: image004.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 15591 bytes Desc: image001.png URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 1 11:23:48 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 17:23:48 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng wrote: > Hello Simon, > > > > Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside > RTK, the following error message appears: > > > > > ================================================================================================ > > > > CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): > By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project > has asked CMake to find a package configuration file provided by > "Gengetopt", but CMake did not find one. > > Could not find a package configuration file provided by "Gengetopt" with > any of the following names: > > GengetoptConfig.cmake > gengetopt-config.cmake > > Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set > "Gengetopt_DIR" to a directory containing one of the above files. If > "Gengetopt" provides a separate development package or SDK, be sure it has > been installed. > > > > > ================================================================================================ > > > > It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake > or gengetopt-config.cmake. I did a manual search for these files in the RTK > directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH > in the cmake GUI when performing configuration. The value of > CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln > file can now be successfully generated. > > > > Next I need to build the project using Visual Studio 2013. > > > > Thanks you very much for your help! > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Thursday, October 01, 2015 2:19 AM > *To:* Shen, Weicheng > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Unknown CMake command "WRAP_GGO" > > > > Hi, > > WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use > WRAP_GGO in an external project you need to do the same as in > applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the > easiest, to start with, is to build the rtktutorialapplication in the RTK > project. > > Let us know if that answered your problem, > > Simon > > > > On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: > > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 15591 bytes Desc: not available URL: From theday79 at gmail.com Thu Oct 1 17:33:51 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 1 Oct 2015 17:33:51 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <560CE88F.5030807@uclouvain.be> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> Message-ID: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park ; 'Matthew J. Riblett' ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I'm using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with "ITK + FFTW" in windows system? I'm just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I've encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I'm running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you're running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I'm not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I've tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn't work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn't compile that way initially, and it took a little bit of time to figure out. Hope that helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I'm now compiling itk-4.8 to use that feature since I've found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting - in fact I'm currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the '-p' flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I've experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I've run into issues where the default 'unsharpness' parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images - notably, those with little detectable signal from background - additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps - and please let me know how it works out for you. - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I've encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I've been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I'm trying to implement this into an automated workflow and I'd love to know how this was accomplished. Thanks! - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 joelbeaudry at gmail.com Thu Oct 1 17:40:30 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Thu, 1 Oct 2015 14:40:30 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Cyril, After trying out a few attempts, it seems like some values play nicer than others. Could it be an issue with floating point comparisons with the spacing and/or origins? It might explain why certain values seem to work (1.5) and others do not (0.88). I'll look at what values are being compared and get back to you. Thanks, Joel On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry wrote: > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 > spacing) and re-creating a mask off of that. So the motion mask should have > the same dimensions, spacing, and origin as the intended 4D image since I'm > using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating > my mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I created for > 160 (2), worked but not the case of 512 (0.88), and let you know what I > find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > wrote: > >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the small paragraph after >> the cuda command line : >> >> Note that the reconstructed volume in this example does not fully contain >> the attenuating object, causing hyper-attenuation artifacts on the borders >> of the result. To avoid these artifacts, reconstruct a larger volume >> (--dimension 256) should be fine. *Note that you will have to resize >> your motion mask as well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and allow any motion mask, >> but until I do, you can resize your motion mask using the CLITK tools ( >> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other datasets and it >> seems to be working. I need to increase the resolution and play around with >> the parameters now. >> >> I haven't had time to test it too much, but I do get an error when >> attempting to reconstruct with different dimensions. I'm using Cuda, and >> haven't tried it with just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >> AverageOutOfROIImageFilter: information of ROI image does not match input >> image" >> >> I'll be able to test some other things later and list more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line parameters AND data). Can >>> you restart it from scratch and let me know if you still have problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>> coordinates >>> - the regularization parameters (gamma space and gamma time) were way >>> too high. The regularization with a high gamma-time caused frames to be >>> identical, while it should only discourage variations >>> >>> I hope it works, now. If it doesn't work for you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and indeed, there are >>> several mistakes in it. I am working on correcting them. I'll keep you >>> posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>> >>> Hi RTK-users, >>> >>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>> example. The 5 frames should show some differences pertaining to patient >>> motion but the ones that I'm producing are identical, so no motion is >>> visible. >>> >>> Has anyone been able to follow the example and the provided dataset to >>> create a 4D image? >>> >>> Thanks, >>> Joel >>> >>> >>> _______________________________________________ >>> 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 Fri Oct 2 02:44:21 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 2 Oct 2015 08:44:21 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Joel, Can you explain how you created your mask? Looking at the code, it seems to me that if you create a 4D image with RTK, create a mask from this image with exactly the same meta info and pass it to ROOSTER, that should work in all cases. If I were you, I would compare the two mhd files (of the mask and the 4D image you used to create it) and verify that the meta info is exactly the same. For ROOSTER, I suggest to add an interpolation when the information is not inconsistent, e.g., in the main() function. I can do it if you agree Cyril. Simon On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry wrote: > Hi Cyril, > > After trying out a few attempts, it seems like some values play nicer than > others. Could it be an issue with floating point comparisons with the > spacing and/or origins? It might explain why certain values seem to work > (1.5) and others do not (0.88). I'll look at what values are being compared > and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >> spacing) and re-creating a mask off of that. So the motion mask should have >> the same dimensions, spacing, and origin as the intended 4D image since I'm >> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >> my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the mask I created >> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >> find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> Good to hear it's working now. >>> The error you get is explained on the wiki in the small paragraph after >>> the cuda command line : >>> >>> Note that the reconstructed volume in this example does not fully >>> contain the attenuating object, causing hyper-attenuation artifacts on the >>> borders of the result. To avoid these artifacts, reconstruct a larger >>> volume (--dimension 256) should be fine. *Note that you will have to >>> resize your motion mask as well, as 3D the motion mask is expected to have >>> the same size, spacing and origin as the first 3 dimensions of the 4D >>> output. * >>> >>> I guess I should take some time to fix that, and allow any motion mask, >>> but until I do, you can resize your motion mask using the CLITK tools ( >>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>> >>> Cyril >>> >>> >>> >>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other datasets and it >>> seems to be working. I need to increase the resolution and play around with >>> the parameters now. >>> >>> I haven't had time to test it too much, but I do get an error when >>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>> haven't tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>> AverageOutOfROIImageFilter: information of ROI image does not match input >>> image" >>> >>> I'll be able to test some other things later and list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> I have fixed the wiki example (command line parameters AND data). Can >>>> you restart it from scratch and let me know if you still have problems ? >>>> >>>> Roughly, the problems were the following: >>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>> coordinates >>>> - the regularization parameters (gamma space and gamma time) were way >>>> too high. The regularization with a high gamma-time caused frames to be >>>> identical, while it should only discourage variations >>>> >>>> I hope it works, now. If it doesn't work for you, please keep asking >>>> Cyril >>>> >>>> >>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki example, and indeed, there are >>>> several mistakes in it. I am working on correcting them. I'll keep you >>>> posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>> example. The 5 frames should show some differences pertaining to patient >>>> motion but the ones that I'm producing are identical, so no motion is >>>> visible. >>>> >>>> Has anyone been able to follow the example and the provided dataset to >>>> create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 cyril.mory at uclouvain.be Fri Oct 2 03:53:14 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 02 Oct 2015 09:53:14 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: <560E37EA.1060702@uclouvain.be> Indeed, resampling the mask if needed, to the correct size, spacing, origin and direction, seems the simplest way to deal with this issue. But I would do it in the filter rather than in the application, so that anything built on top of ROOSTER (i.e. incremental ROOSTER, or the rtkfourdroostertest) also benefits from it. Feel free to do it if you want, otherwise I'll take care of it next week :) On 10/02/2015 08:44 AM, Simon Rit wrote: > Hi Joel, > Can you explain how you created your mask? Looking at the code, it > seems to me that if you create a 4D image with RTK, create a mask from > this image with exactly the same meta info and pass it to ROOSTER, > that should work in all cases. If I were you, I would compare the two > mhd files (of the mask and the 4D image you used to create it) and > verify that the meta info is exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is > not inconsistent, e.g., in the main() function. I can do it if you > agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > > Hi Cyril, > > After trying out a few attempts, it seems like some values play > nicer than others. Could it be an issue with floating point > comparisons with the spacing and/or origins? It might explain why > certain values seem to work (1.5) and others do not (0.88). I'll > look at what values are being compared and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > > wrote: > > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions > 512 (0.88 spacing) and re-creating a mask off of that. So the > motion mask should have the same dimensions, spacing, and > origin as the intended 4D image since I'm using 4D rooster > with --dimension 512 --spacing 0.88. Perhaps I'm creating my > mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I > created for 160 (2), worked but not the case of 512 (0.88), > and let you know what I find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > > wrote: > > Hi Joel, > > Good to hear it's working now. > The error you get is explained on the wiki in the small > paragraph after the cuda command line : > > Note that the reconstructed volume in this example does > not fully contain the attenuating object, causing > hyper-attenuation artifacts on the borders of the result. > To avoid these artifacts, reconstruct a larger volume > (--dimension 256) should be fine. *Note that you will have > to resize your motion mask as well, as 3D the motion mask > is expected to have the same size, spacing and origin as > the first 3 dimensions of the 4D output. * > > I guess I should take some time to fix that, and allow any > motion mask, but until I do, you can resize your motion > mask using the CLITK tools > (http://www.creatis.insa-lyon.fr/rio/vv) or any method > that suits you. > > Cyril > > > > On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other >> datasets and it seems to be working. I need to increase >> the resolution and play around with the parameters now. >> >> I haven't had time to test it too much, but I do get an >> error when attempting to reconstruct with different >> dimensions. I'm using Cuda, and haven't tried it with >> just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws >> "In AverageOutOfROIImageFilter: information of ROI image >> does not match input image" >> >> I'll be able to test some other things later and list >> more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> I have fixed the wiki example (command line >> parameters AND data). Can you restart it from scratch >> and let me know if you still have problems ? >> >> Roughly, the problems were the following: >> - the "mm_50.mha" motion mask file was not aligned >> with the CBCT coordinates >> - the regularization parameters (gamma space and >> gamma time) were way too high. The regularization >> with a high gamma-time caused frames to be identical, >> while it should only discourage variations >> >> I hope it works, now. If it doesn't work for you, >> please keep asking >> Cyril >> >> >> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and >>> indeed, there are several mistakes in it. I am >>> working on correcting them. I'll keep you posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the >>>> 4DROOSTERReconstruction example. The 5 frames >>>> should show some differences pertaining to patient >>>> motion but the ones that I'm producing are >>>> identical, so no motion is visible. >>>> >>>> Has anyone been able to follow the example and the >>>> provided dataset to create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 joelbeaudry at gmail.com Fri Oct 2 12:31:38 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Fri, 2 Oct 2015 09:31:38 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: <560E37EA.1060702@uclouvain.be> References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: Hi Simon and Cyril, @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) and then use itkSnap to create a mask from that 3D image. I then use that mask as the input for ROOSTER, to which I again use the same spacing/dimensions. For some values it seems to work and other it doesn't. I'm wondering if itkSnap is truncating the spacing/dimension/origins when I save my mask, and perhaps why something like (160,2,-159) works but (511,0.88,-224.84). I'll take a look at the metadata. I'll try resampling my masks and like you said that should probably fix my issues. Thanks for the help, Joel On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory wrote: > Indeed, resampling the mask if needed, to the correct size, spacing, > origin and direction, seems the simplest way to deal with this issue. > But I would do it in the filter rather than in the application, so that > anything built on top of ROOSTER (i.e. incremental ROOSTER, or the > rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: > > Hi Joel, > Can you explain how you created your mask? Looking at the code, it seems > to me that if you create a 4D image with RTK, create a mask from this image > with exactly the same meta info and pass it to ROOSTER, that should work in > all cases. If I were you, I would compare the two mhd files (of the mask > and the 4D image you used to create it) and verify that the meta info is > exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is not > inconsistent, e.g., in the main() function. I can do it if you agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values play nicer >> than others. Could it be an issue with floating point comparisons with the >> spacing and/or origins? It might explain why certain values seem to work >> (1.5) and others do not (0.88). I'll look at what values are being compared >> and get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> wrote: >> >>> Hi Cyril, >>> >>> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >>> spacing) and re-creating a mask off of that. So the motion mask should have >>> the same dimensions, spacing, and origin as the intended 4D image since I'm >>> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >>> my mask incorrectly? >>> >>> I'll try and fiddle with it a bit later and see why the mask I created >>> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >>> find. >>> >>> Thanks again, >>> Joel >>> >>> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> Good to hear it's working now. >>>> The error you get is explained on the wiki in the small paragraph after >>>> the cuda command line : >>>> >>>> Note that the reconstructed volume in this example does not fully >>>> contain the attenuating object, causing hyper-attenuation artifacts on the >>>> borders of the result. To avoid these artifacts, reconstruct a larger >>>> volume (--dimension 256) should be fine. *Note that you will have to >>>> resize your motion mask as well, as 3D the motion mask is expected to have >>>> the same size, spacing and origin as the first 3 dimensions of the 4D >>>> output. * >>>> >>>> I guess I should take some time to fix that, and allow any motion mask, >>>> but until I do, you can resize your motion mask using the CLITK tools ( >>>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>>> >>>> Cyril >>>> >>>> >>>> >>>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>>> >>>> Hi Cyril, >>>> >>>> Works like a charm, thanks! I tried it on some other datasets and it >>>> seems to be working. I need to increase the resolution and play around with >>>> the parameters now. >>>> >>>> I haven't had time to test it too much, but I do get an error when >>>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>>> haven't tried it with just cpu reconstruction yet. >>>> >>>> i.e.) >>>> --dimension 160 --spacing 2 -> works >>>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>>> AverageOutOfROIImageFilter: information of ROI image does not match input >>>> image" >>>> >>>> I'll be able to test some other things later and list more details. >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> >>>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>>> wrote: >>>> >>>>> Hi Joel, >>>>> >>>>> I have fixed the wiki example (command line parameters AND data). Can >>>>> you restart it from scratch and let me know if you still have problems ? >>>>> >>>>> Roughly, the problems were the following: >>>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>>> coordinates >>>>> - the regularization parameters (gamma space and gamma time) were way >>>>> too high. The regularization with a high gamma-time caused frames to be >>>>> identical, while it should only discourage variations >>>>> >>>>> I hope it works, now. If it doesn't work for you, please keep asking >>>>> Cyril >>>>> >>>>> >>>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>>> >>>>> Hi Joel, >>>>> >>>>> I have just tried to reproduce the wiki example, and indeed, there are >>>>> several mistakes in it. I am working on correcting them. I'll keep you >>>>> posted. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>>> example. The 5 frames should show some differences pertaining to patient >>>>> motion but the ones that I'm producing are identical, so no motion is >>>>> visible. >>>>> >>>>> Has anyone been able to follow the example and the provided dataset to >>>>> create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 WEICHENG.SHEN at leidos.com Fri Oct 2 22:11:05 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Sat, 3 Oct 2015 02:11:05 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977222@EMP-EXMR104.corp.leidos.com> Hi Simon, Yes, if I run the CMake at the root of RTK, the example builds successfully. Thanks you very much! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 11:24 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng > wrote: Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: 15587 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 15591 bytes Desc: image002.png URL: From simon.rit at creatis.insa-lyon.fr Mon Oct 5 01:45:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 5 Oct 2015 07:45:06 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Oct 5 13:53:11 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 5 Oct 2015 13:53:11 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error1_using_ITK_FFT.png Type: image/png Size: 17214 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error in code.png Type: image/png Size: 21974 bytes Desc: not available URL: From cyril.mory at uclouvain.be Tue Oct 6 08:08:35 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Tue, 06 Oct 2015 14:08:35 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: <5613B9C3.4070309@uclouvain.be> Hi Joel, I have just pushed a fix for this issue: in the 4DROOSTER filter, I have added a resample filter between the ROI input and the AverageOutOfROIImageFilter. On my side, it runs fine. Let me know if it fixes the issue on your side. Thanks for pointing this out, Cyril On 10/02/2015 06:31 PM, Joel Beaudry wrote: > Hi Simon and Cyril, > > @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) > and then use itkSnap to create a mask from that 3D image. I then use > that mask as the input for ROOSTER, to which I again use the same > spacing/dimensions. For some values it seems to work and other it > doesn't. I'm wondering if itkSnap is truncating the > spacing/dimension/origins when I save my mask, and perhaps why > something like (160,2,-159) works but (511,0.88,-224.84). I'll take a > look at the metadata. > > I'll try resampling my masks and like you said that should probably > fix my issues. > > Thanks for the help, > Joel > > On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory > wrote: > > Indeed, resampling the mask if needed, to the correct size, > spacing, origin and direction, seems the simplest way to deal with > this issue. > But I would do it in the filter rather than in the application, so > that anything built on top of ROOSTER (i.e. incremental ROOSTER, > or the rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it > next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: >> Hi Joel, >> Can you explain how you created your mask? Looking at the code, >> it seems to me that if you create a 4D image with RTK, create a >> mask from this image with exactly the same meta info and pass it >> to ROOSTER, that should work in all cases. If I were you, I would >> compare the two mhd files (of the mask and the 4D image you used >> to create it) and verify that the meta info is exactly the same. >> For ROOSTER, I suggest to add an interpolation when the >> information is not inconsistent, e.g., in the main() function. I >> can do it if you agree Cyril. >> Simon >> >> On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values >> play nicer than others. Could it be an issue with floating >> point comparisons with the spacing and/or origins? It might >> explain why certain values seem to work (1.5) and others do >> not (0.88). I'll look at what values are being compared and >> get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with >> dimensions 512 (0.88 spacing) and re-creating a mask off >> of that. So the motion mask should have the same >> dimensions, spacing, and origin as the intended 4D image >> since I'm using 4D rooster with --dimension 512 --spacing >> 0.88. Perhaps I'm creating my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the >> mask I created for 160 (2), worked but not the case of >> 512 (0.88), and let you know what I find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the >> small paragraph after the cuda command line : >> >> Note that the reconstructed volume in this example >> does not fully contain the attenuating object, >> causing hyper-attenuation artifacts on the borders of >> the result. To avoid these artifacts, reconstruct a >> larger volume (--dimension 256) should be fine. *Note >> that you will have to resize your motion mask as >> well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 >> dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and >> allow any motion mask, but until I do, you can resize >> your motion mask using the CLITK tools >> (http://www.creatis.insa-lyon.fr/rio/vv) or any >> method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other >>> datasets and it seems to be working. I need to >>> increase the resolution and play around with the >>> parameters now. >>> >>> I haven't had time to test it too much, but I do get >>> an error when attempting to reconstruct with >>> different dimensions. I'm using Cuda, and haven't >>> tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> >>> throws "In AverageOutOfROIImageFilter: information >>> of ROI image does not match input image" >>> >>> I'll be able to test some other things later and >>> list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> >> > wrote: >>> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line >>> parameters AND data). Can you restart it from >>> scratch and let me know if you still have >>> problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not >>> aligned with the CBCT coordinates >>> - the regularization parameters (gamma space and >>> gamma time) were way too high. The >>> regularization with a high gamma-time caused >>> frames to be identical, while it should only >>> discourage variations >>> >>> I hope it works, now. If it doesn't work for >>> you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki >>>> example, and indeed, there are several mistakes >>>> in it. I am working on correcting them. I'll >>>> keep you posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the >>>>> 4DROOSTERReconstruction example. The 5 frames >>>>> should show some differences pertaining to >>>>> patient motion but the ones that I'm producing >>>>> are identical, so no motion is visible. >>>>> >>>>> Has anyone been able to follow the example and >>>>> the provided dataset to create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 Oct 6 09:11:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 6 Oct 2015 15:11:27 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park wrote: > Hi Simon, > > > > I?ve just tried to build it without FFTW library, as you have asked. > > > > I have encountered an error as shown in the attached pictures in running > ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, making > FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > > > Hope it helps. > > > > Yang > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Thanks a lot Yang for the detailed report, I'm sure that will be helpful > to many people. For my personal information, did you try to compile FFTW > from ITK as well? If it didn't work, could you let us know what was the > problem? > > Simon > > > > > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Tue Oct 6 10:49:55 2015 From: theday79 at gmail.com (Yang K Park) Date: Tue, 6 Oct 2015 10:49:55 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: <001c01d10046$44941080$cdbc3180$@gmail.com> Hi Simon, It seems that I misunderstood before. This time, I?ve followed your suggestion and encountered an error as follows: H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): fatal error C1083: Cannot open include file: 'fftw3.h': No such file or directory I?ve tested this with itk4.8.1, which is the most up-to-date release version. It seems that I need to specify the external fftw header file (fftw3.h), but the user interface for input does not appear in CMake unless I set ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. I hope this report can help itk developers resolve the issue. Thanks. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Tuesday, October 06, 2015 9:11 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com ] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park > Cc: Cyril Mory >; Matthew J. Riblett >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Tue Oct 6 11:00:16 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Tue, 6 Oct 2015 17:00:16 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <001c01d10046$44941080$cdbc3180$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> <001c01d10046$44941080$cdbc3180$@gmail.com> Message-ID: <5613E200.4050001@kitware.com> Yang, Simon, As I mentioned previously, you cannot build ITK with FFTW on Windows without setting ITK_USE_SYSTEM_FFTW=ON. You should get a warning in CMake specifying this. So the only solution to build ITK with FFTW on Windows is to use an externally compiled version of FFTW. Julien On 06/10/2015 16:49, Yang K Park wrote: > Hi Simon, > > It seems that I misunderstood before. This time, I?ve followed your > suggestion and encountered an error as follows: > > H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): > fatal error C1083: Cannot open include file: 'fftw3.h': No such file or > directory > > I?ve tested this with itk4.8.1, which is the most up-to-date release > version. > > It seems that I need to specify the external fftw header file (fftw3.h), > but the user interface for input does not appear in CMake unless I set > ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. > > I hope this report can help itk developers resolve the issue. > > Thanks. > > Yang > > *From:*simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of > *Simon Rit > *Sent:* Tuesday, October 06, 2015 9:11 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett > ; rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks Yang. I think I wasn't clear but what I meant was not to disable > FFTW but to compile and use FFTW in ITK by using > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=OFF > > instead of what I think you used > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=ON > > Julien Jomier from Kitware told me that both configurations worked for > him but your initial message suggests that the first did not work for > you. If you can confirm and explain your config (ITK version, compiler, > etc.). > > Simon > > PS: your test is useful anyway, I'll try to make the error message > clearer when FFTW is not used. > > On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: > > Hi Simon, > > I?ve just tried to build it without FFTW library, as you have asked. > > I have encountered an error as shown in the attached pictures in > running ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, > making FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > Hope it helps. > > Yang > > *From:*simon.rit at gmail.com > [mailto:simon.rit at gmail.com ] *On Behalf > Of *Simon Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > > *Cc:* Cyril Mory >; Matthew J. Riblett > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks a lot Yang for the detailed report, I'm sure that will be > helpful to many people. For my personal information, did you try to > compile FFTW from ITK as well? If it didn't work, could you let us > know what was the problem? > > Simon > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: > > Hi Cyril, > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally > succeeded. > > Following is the final version of my instruction. > > Thanks. > > Yang > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very > convenient! I really like it. Thanks for your hard works on this. > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > 1.Prepare fftw library files > > a.Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b.Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c.Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command > Prompt) > > d.Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e.Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > 2.Cmake for ITK > > a.Configure > > b.Turn on the following and reconfigure > > i.ITK_USE_SYSTEM_FFTW (mandatory to make the following options > appear) > > c.Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i.FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 > > ii.FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii.FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv.FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. > > d."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e.Reconfigure, Generate > > 3.Build ITK with Visual Studio > > a.In both Debug and Release > > 4.Cmake for RTK > > a.Default settings were used. > > b."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > 5.Build RTK using Visual Studio > > 6.Copy dll files to RTK bin folders > > a.Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b.To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7.Build RTK with Visual Studio > > *From:*Cyril Mory [mailto:cyril.mory at uclouvain.be > ] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park >; 'Matthew J. Riblett' > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam > Shroud > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just > have to activate it in the CMake options. On Windows, you cannot > do that. I do not have a clue why, but you cannot. You have to > install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled > DLLs from http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the > .lib files (that is absolutely necessary). You may have to run > the "lib.exe" program from the VS developer prompt instead of > the standard windows cmd.exe prompt. Specify you CPU > architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, > and you should be fine. I have successfully compiled this with > BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it > matters. > > If it works for you, then you might want to play around with the > other FFTW .lib files, and send on this mailing list a more > complete set of CMAKE options that works. I have tried some > other combinations without success, so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS > 2013) and I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with ?ITK + > FFTW? in windows system? > > I?m just trying to use *rtkextractshroudsignal* and it seems > to require FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors > as shown below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > I?m running on Ubuntu 14.04 LTS and used the distribution > library (FFTW 3.3.3). If you?re running on a Debian-based > linux system, you can also install the full development > library set using the following command: */sudo apt-get > install libfftw3-3 libfftw3-dev/*. Then just make sure that > these libraries are being used by rerunning CCMake. > > I?m not quite sure about the error being thrown in your > build, but perhaps one of the main developers would be able > to provide some more insight into the issue. > > Hope this helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to > compile ITK with those options on as you suggested. > > I?ve tried to use the up-to-date version of FFTW > (3.3.4), but it seems that it doesn?t work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved > external symbol __imp_fftw_execute referenced in > function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully > using in which system(Windows or Linux)? > > Thanks. > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the > inclusion of the Fast Fourier Transform components. > This requires compilation with the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that > way initially, and it took a little bit of time to > figure out. > > Hope that helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since > I?ve found my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data > from Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success > since my initial posting ? in fact I?m currently > working on a new method for accomplishing this task > in certain challenging cases. > > The most recent version of RTK provides an update to > the rtkextractshroudsignal application which > provides a phase signal output when called using the > ?-p? flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o > raw_signal.txt -p phase_signal.txt --method > LINEAR_BETWEEN_MINIMA/* > > From what I?ve experienced, this generally provides > a good signal [0,1) characterizing the respiratory > phase using the default settings. Occasionally, > I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear > signal (by appending the *--unsharp ##* flag to the > command). On more challenging shroud images ? > notably, those with little detectable signal from > background ? additional contrast-enhancement by > pre-processing of the shroud has assisted in signal > extraction. > > I hope that helps ? and please let me know how it > works out for you. > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue > and it would be highly appreciated if you can > share with me your updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical > School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:* Rtk-users > [mailto:rtk-users-bounces at public.kitware.com] > *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > > > *Cc:* rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal > data from Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab > script, but I've had good success with using a > Hilbert function in python (scipy). I'm sure > that Matlab has an equivalent function, and > maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. > Riblett > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a > straightforward method of going from the > results of the rtkamsterdamshroud and > rtkextractshroudsignal applications to a > [0,1) phase signal for performing > motion-compensated reconstruction. I?ve > been following along with the MC-CBCT > Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is > used to process the should signal prior to > feeding it back into the reconstruction > application, but there is no mention of how > this is accomplished. I?m trying to > implement this into an automated workflow > and I?d love to know how this was accomplished. > > Thanks! > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > > MCV Office Phone: +1.804.628.4858 > > > > _______________________________________________ > 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 > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From bottiger at gmail.com Mon Oct 12 05:42:20 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 11:42:20 +0200 Subject: [Rtk-users] Reconstruction problems Message-ID: Hi there I hope someone can help me me get started with RTK. First of all I should mention that I have compiled RTK on Windows 7 using Visual Studio 2013. Everything seems to compile and run just fine. Secondly: I tried to reproduce this example: http://wiki.openrtk.org/index.php/RTK/Scripts/FDK This was somewhat successful - I think. I could generate some projections, and reconstruct them. However, it just looks like an egg and not like a Shepp Logan phantom. See attachment. However, I'm unsure if this is expected or not. I took some homemade projections (of a small cylinder) and converted them into a MHA file (using rtkprojections.exe). The file looks correct in ImageJ. The dimensions are 370 pixels * 195 pixels * 361 projections You can get the file here: https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 The problem is that the reconstruction is wrong (see cylinder_recon). It looks like the dimensions are not read correctly, but I am unsure how I fix that? The rtkfdk.exe has a single --dimension parameter, but I am unsure which dimension that is suppose to be, but neither 195, 370 or any other value I could think of works for me. I hope someone can help me in the right direction. best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: SheppLogan.PNG Type: image/png Size: 150153 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cylinder_recon.PNG Type: image/png Size: 128472 bytes Desc: not available URL: From ghostcz at hotmail.com Mon Oct 12 05:54:44 2015 From: ghostcz at hotmail.com (louie L) Date: Mon, 12 Oct 2015 11:54:44 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Hi, You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? Cheers, Louie Sent from my iOS > On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 05:59:38 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 11:59:38 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: References: Message-ID: <561B848A.9090406@uclouvain.be> Hi Arvid, Well, you're on the right track :-) Your Shepp Logan reconstruction looks fine, I guess it is just a visualization problem: you can use vv http://www.creatis.insa-lyon.fr/rio/vv to open it and you will be able to change the "window" and "level" settings in visualization. Regarding the cylinder, can you send your geometry file too ? Regards Cyril Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Mon Oct 12 06:35:27 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:35:27 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: <561B848A.9090406@uclouvain.be> References: <561B848A.9090406@uclouvain.be> Message-ID: Hey Cyril I just wrote another e-mail about how I generated the geometry file (it's just simulated). But just in case I'll attach it here: best Arvid On Mon, Oct 12, 2015 at 11:59 AM, Cyril Mory wrote: > Hi Arvid, > > Well, you're on the right track :-) > Your Shepp Logan reconstruction looks fine, I guess it is just a > visualization problem: you can use vv > http://www.creatis.insa-lyon.fr/rio/vv > to open it and you will be able to change the "window" and "level" > settings in visualization. > > Regarding the cylinder, can you send your geometry file too ? > > Regards > Cyril > > Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example:http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here:https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > > > ------------------------------ > [image: Avast logo] > > L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le > logiciel antivirus Avast. > www.avast.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry360.xml Type: text/xml Size: 134495 bytes Desc: not available URL: From bottiger at gmail.com Mon Oct 12 06:36:03 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:36:03 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Sure. I'll admit I have yet to understand the specifics of the geometry file. Currently I just used a simulated one because that was what the SheppLogan example used, and the input projections looked similar. Here is a complete list of the commands I executed: rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 I did not do anything to the contrast and that is most likely the issue. I downloaded and installed vv and I can see some (very unclear) features inside the SheppLogan reconstruction - so that's nice. However, currently I'm mostly interested in getting the geometry right :) best On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: > Hi, > > You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? > > Cheers, > Louie > > Sent from my iOS > >> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >> >> Hi there >> >> I hope someone can help me me get started with RTK. >> >> First of all I should mention that I have compiled RTK on Windows 7 >> using Visual Studio 2013. Everything seems to compile and run just >> fine. >> >> Secondly: I tried to reproduce this example: >> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >> >> This was somewhat successful - I think. I could generate some >> projections, and reconstruct them. However, it just looks like an egg >> and not like a Shepp Logan phantom. See attachment. >> >> However, I'm unsure if this is expected or not. I took some homemade >> projections (of a small cylinder) and converted them into a MHA file >> (using rtkprojections.exe). The file looks correct in ImageJ. The >> dimensions are 370 pixels * 195 pixels * 361 projections >> >> You can get the file here: >> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >> >> The problem is that the reconstruction is wrong (see cylinder_recon). >> It looks like the dimensions are not read correctly, but I am unsure >> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >> I am unsure which dimension that is suppose to be, but neither 195, >> 370 or any other value I could think of works for me. >> >> I hope someone can help me in the right direction. >> >> best >> >> Arvid >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 15:52:10 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 21:52:10 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: <561C0F6A.6080602@uclouvain.be> Hi Arvid, Unfortunately, you cannot do that. You have to obtain the exact geometry of this particular acquisition from the cone beam device you used. If you need help to convert it to the RTK format, well, that's something you can ask for on this mailing list. Can you get the geometry data ? Regards, Cyril Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : > Sure. > > I'll admit I have yet to understand the specifics of the geometry > file. Currently I just used a simulated one because that was what the > SheppLogan example used, and the input projections looked similar. > > Here is a complete list of the commands I executed: > > rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml > > rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ > --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif > > rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o > c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g > c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 > > I did not do anything to the contrast and that is most likely the > issue. I downloaded and installed vv and I can see some (very unclear) > features inside the SheppLogan reconstruction - so that's nice. > However, currently I'm mostly interested in getting the geometry right :) > > best > > On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >> Hi, >> >> You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? >> >> Cheers, >> Louie >> >> Sent from my iOS >> >>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >>> >>> Hi there >>> >>> I hope someone can help me me get started with RTK. >>> >>> First of all I should mention that I have compiled RTK on Windows 7 >>> using Visual Studio 2013. Everything seems to compile and run just >>> fine. >>> >>> Secondly: I tried to reproduce this example: >>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>> >>> This was somewhat successful - I think. I could generate some >>> projections, and reconstruct them. However, it just looks like an egg >>> and not like a Shepp Logan phantom. See attachment. >>> >>> However, I'm unsure if this is expected or not. I took some homemade >>> projections (of a small cylinder) and converted them into a MHA file >>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>> dimensions are 370 pixels * 195 pixels * 361 projections >>> >>> You can get the file here: >>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>> >>> The problem is that the reconstruction is wrong (see cylinder_recon). >>> It looks like the dimensions are not read correctly, but I am unsure >>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>> I am unsure which dimension that is suppose to be, but neither 195, >>> 370 or any other value I could think of works for me. >>> >>> I hope someone can help me in the right direction. >>> >>> best >>> >>> Arvid >>> >>> >>> _______________________________________________ >>> 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 --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From cyril.mory at uclouvain.be Mon Oct 12 16:36:24 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 22:36:24 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: <561C1984.9030509@uclouvain.be> References: <561C1984.9030509@uclouvain.be> Message-ID: <561C19C8.5050304@uclouvain.be> Arvid, You can find a description of the geometry here : http://www.creatis.insa-lyon.fr/~srit/geometry.pdf In rtk/applications, several applications are simple converters from the cone beam manufacturer's raw geometry format to RTK geometry format, so you can also have a look at the code of these apps. If you know that you have an almost parallel beam, you can indeed try to use a dummy geometry file, but be careful: rtksimulatedgeometry generates a cone beam geometry, with large fan and cone angles if you leave the default parameters. You can adjust the 'sdd' and 'sid' options to simulate a very distant source, making rays almost parallel to each other (be careful with numerical precision, though). Hope it helps, Cyril Le 12/10/2015 21:59, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hello Cyril > > Thank you for getting back to me. I do have the geometry (albeit not > right here next to me). > However, my problem was that when I looked in the geometry file, I > didn't find it obvious how to define declare it - is it documented > somewhere? > > That said - the measurements I played around with is measured with an > almost parallel beam. I hoped I could reconstruct it (with minor > artifacts) using a dummy geometry file. > > best > > Arvid > > On Mon, Oct 12, 2015 at 9:52 PM, Cyril Mory wrote: >> Hi Arvid, >> >> Unfortunately, you cannot do that. You have to obtain the exact geometry of >> this particular acquisition from the cone beam device you used. >> If you need help to convert it to the RTK format, well, that's something you >> can ask for on this mailing list. >> Can you get the geometry data ? >> >> Regards, >> Cyril >> >> >> Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : >>> Sure. >>> >>> I'll admit I have yet to understand the specifics of the geometry >>> file. Currently I just used a simulated one because that was what the >>> SheppLogan example used, and the input projections looked similar. >>> >>> Here is a complete list of the commands I executed: >>> >>> rtksimulatedgeometry.exe -n 361 -o >>> c:\Users\aplb\Work\out_dir\geometry360.xml >>> >>> rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ >>> --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif >>> >>> rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o >>> c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g >>> c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 >>> >>> I did not do anything to the contrast and that is most likely the >>> issue. I downloaded and installed vv and I can see some (very unclear) >>> features inside the SheppLogan reconstruction - so that's nice. >>> However, currently I'm mostly interested in getting the geometry right :) >>> >>> best >>> >>> On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >>>> Hi, >>>> >>>> You can specify the size in each dimension. Can you post the arguments >>>> you used for the projections and reconstruction? Did you try to adjust the >>>> contrast of the output? >>>> >>>> Cheers, >>>> Louie >>>> >>>> Sent from my iOS >>>> >>>>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger >>>>> wrote: >>>>> >>>>> Hi there >>>>> >>>>> I hope someone can help me me get started with RTK. >>>>> >>>>> First of all I should mention that I have compiled RTK on Windows 7 >>>>> using Visual Studio 2013. Everything seems to compile and run just >>>>> fine. >>>>> >>>>> Secondly: I tried to reproduce this example: >>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>>>> >>>>> This was somewhat successful - I think. I could generate some >>>>> projections, and reconstruct them. However, it just looks like an egg >>>>> and not like a Shepp Logan phantom. See attachment. >>>>> >>>>> However, I'm unsure if this is expected or not. I took some homemade >>>>> projections (of a small cylinder) and converted them into a MHA file >>>>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>>>> dimensions are 370 pixels * 195 pixels * 361 projections >>>>> >>>>> You can get the file here: >>>>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>>>> >>>>> The problem is that the reconstruction is wrong (see cylinder_recon). >>>>> It looks like the dimensions are not read correctly, but I am unsure >>>>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>>>> I am unsure which dimension that is suppose to be, but neither 195, >>>>> 370 or any other value I could think of works for me. >>>>> >>>>> I hope someone can help me in the right direction. >>>>> >>>>> best >>>>> >>>>> Arvid >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >> >> >> --- >> L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le >> logiciel antivirus Avast. >> https://www.avast.com/antivirus >> --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From gnthibault at gmail.com Wed Oct 14 05:38:46 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Wed, 14 Oct 2015 11:38:46 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter Message-ID: Dear all, I recently had troubles while trying to rewrite my code, linked with libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite well, to using fdk reconstruction method. My first question: is there a general way to enable maximum debug log level at runtime in rtk ? My second question, is more specific: is it normal that I see such error message coming from itk when using FDKConeBeamReconstructionFilter : ExceptionObject caught with fdk->Update() in file [...] itk::ExceptionObject (0x7f377c020cb0) Location: "unknown" File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx Line: 416 Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred during SingleMethodExecute /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): Cannot compute FFT of image with size [2048, 1024, 11]. VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose size in each dimension has a prime factorization consisting of only 2s, 3s, or 5s. I suppose that this error arise while performing ramp filtering, but I see no relation between FFT configuration stated in the error log ( [2048, 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 projections. I also tried with 200 projection and I had the same problem, but with [2048, 1024, 34] Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to the total number of projection in my dataset every time. The revision I am currently using: commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 Merge: 578cf89 09d820c Thank you in advance for your help. Regards Thibault Notargiacomo -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 14 12:58:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 14 Oct 2015 18:58:06 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Hi Thibault, No, there is not really a log system that would allow you debugging at run time. You can compile a debug version that would enable a lot of messages related to the pipeline. For this, I think you need to use NDEBUG at compilation (it's an ITK mechanism that I never use). No, it's not normal that you see an error message. There are two things: - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it only handles power of 2/3/5 dimensions and it's slow. I always advise people to use FFTW by turning on ITK_USE_FFTW options during ITK's compilation. - I don't fully understand why vnl doesn't work either. I understand the first two dimensions, for vnl (which I strongly suggest to not use), I pad to the next power of 2 so 780 * 2 (for zero padding) -> 2048 780 -> 1024 but then, if you use 64 projections, why 11? Are you sure the second input image to FDKConeBeamReconstructionImageFilter has the dimension you want? I would try to connect input 2 to an itk::ImageFileWriter and check what are the dimensions of this image. If you're absolutely sure, then I'll try to reproduce and fix the issue. Simon On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < gnthibault at gmail.com> wrote: > Dear all, > > I recently had troubles while trying to rewrite my code, linked with > libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite > well, to using fdk reconstruction method. > > My first question: is there a general way to enable maximum debug log > level at runtime in rtk ? > > My second question, is more specific: is it normal that I see such error > message coming from itk when using FDKConeBeamReconstructionFilter : > > ExceptionObject caught with fdk->Update() in file [...] > > itk::ExceptionObject (0x7f377c020cb0) > Location: "unknown" > File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx > Line: 416 > Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred > during SingleMethodExecute > > /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: > itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): > Cannot compute FFT of image with size [2048, 1024, 11]. > VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose > size in each dimension has a prime factorization consisting of only 2s, 3s, > or 5s. > > I suppose that this error arise while performing ramp filtering, but I see > no relation between FFT configuration stated in the error log ( [2048, > 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 > projections. > > I also tried with 200 projection and I had the same problem, but with > [2048, 1024, 34] > > Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to > the total number of projection in my dataset every time. > > The revision I am currently using: > commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 > Merge: 578cf89 09d820c > > > Thank you in advance for your help. > > Regards > > Thibault Notargiacomo > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scouser27 at gmail.com Wed Oct 14 16:27:48 2015 From: scouser27 at gmail.com (sco user) Date: Wed, 14 Oct 2015 21:27:48 +0100 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi I'm a new user to RTK. I've been able to perform reconstructions of the Catphan and my own copies of Varian CBCT images with some success. I enabled the CUDA flags when making RTK so as to take advantage of the capabilities of my GPU. When I use --hardware="cuda" with the rtkfdk application, I have found that I must specify the lowmem option in order to get the reconstruction to run successfully. If I don't use lowmem, I get the following error: #### Reconstructing and writing... /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ unknown : Cuda Error : out of memory ExceptionObject caught with writer->Update() in file /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 itk::ExceptionObject (0x18e3460) Location: "unknown" File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h Line: 55 Description: Cuda Error : out of memory #### I take from this that I'm out of memory on the GPU. Is that correct? The GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be in order to get a typical Varian reconstruction to run without the lowmem option. On a side note, I know that the cuda option is working because it's a lot quicker than hardware="cpu", despite only having 96 cuda cores. Another question I'd like to ask is if anyone can shed some light on useful values for I-zero, wpc, scatter etc. With thanks in advance, Dave. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Oct 15 03:09:05 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 15 Oct 2015 09:09:05 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Without the lowmem flag all projection images may be loaded into graphics memory at once causing an out-of-memory issues. You can also check this thread: http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html Regards, Chao 2015-10-14 22:27 GMT+02:00 sco user : > Hi > > I'm a new user to RTK. > I've been able to perform reconstructions of the Catphan and my own copies > of Varian CBCT images with some success. I enabled the CUDA flags when > making RTK so as to take advantage of the capabilities of my GPU. > > When I use --hardware="cuda" with the rtkfdk application, I have found > that I must specify the lowmem option in order to get the reconstruction to > run successfully. If I don't use lowmem, I get the following error: > > #### > Reconstructing and writing... > /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ > unknown : Cuda Error : out of memory > > ExceptionObject caught with writer->Update() in file > /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 > > itk::ExceptionObject (0x18e3460) > Location: "unknown" > File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h > Line: 55 > Description: Cuda Error : out of memory > #### > > I take from this that I'm out of memory on the GPU. Is that correct? The > GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be > in order to get a typical Varian reconstruction to run without the lowmem > option. > > On a side note, I know that the cuda option is working because it's a lot > quicker than hardware="cpu", despite only having 96 cuda cores. > > > Another question I'd like to ask is if anyone can shed some light on > useful values for I-zero, wpc, scatter etc. > > With thanks in advance, > Dave. > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Thu Oct 15 03:52:25 2015 From: itkhelpacc at gmail.com (vishal k) Date: Thu, 15 Oct 2015 13:22:25 +0530 Subject: [Rtk-users] Need some help with Projection of 3D CT data Message-ID: hi, Im working on a CT data set using ITK.. Im trying to come up with a registration algorithm for fluoroscopy image obtained from C-Arm taken at some angle wrt to the patient and the projection of CT data taken at the same angle as that of the C-arm.. i need to change the angles of projection and the focal length of the source from time to time for my study.. I was wondering if i could do that using RTK? If yes, could you tell me where I find information that is relevant to my problem..Thank you Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 15 05:11:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:11:00 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Regarding the parameters (I-zero, wpc, scatter etc), we still need to create wiki pages to describe this (as agreed on during the Jul 31 meeting ). In the meantime, you'll find some info in each filter documentation. You can go to the projection pre-processing filter , look at the (complex) clickable graph and try to navigate in it. For example, I0 is for the LUTbasedVariableI0RawToAttenuationImageFilter and (therefore), inapplicable to Varian data as is. I'll keep the mailing list posted when we add info to the wiki. Good luck, Simon On Thu, Oct 15, 2015 at 9:09 AM, Chao Wu wrote: > Hi Dave, > > Without the lowmem flag all projection images may be loaded into graphics > memory at once causing an out-of-memory issues. > You can also check this thread: > http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html > > Regards, > Chao > > 2015-10-14 22:27 GMT+02:00 sco user : > >> Hi >> >> I'm a new user to RTK. >> I've been able to perform reconstructions of the Catphan and my own >> copies of Varian CBCT images with some success. I enabled the CUDA flags >> when making RTK so as to take advantage of the capabilities of my GPU. >> >> When I use --hardware="cuda" with the rtkfdk application, I have found >> that I must specify the lowmem option in order to get the reconstruction to >> run successfully. If I don't use lowmem, I get the following error: >> >> #### >> Reconstructing and writing... >> /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ >> unknown : Cuda Error : out of memory >> >> ExceptionObject caught with writer->Update() in file >> /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 >> >> itk::ExceptionObject (0x18e3460) >> Location: "unknown" >> File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h >> Line: 55 >> Description: Cuda Error : out of memory >> #### >> >> I take from this that I'm out of memory on the GPU. Is that correct? The >> GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be >> in order to get a typical Varian reconstruction to run without the lowmem >> option. >> >> On a side note, I know that the cuda option is working because it's a lot >> quicker than hardware="cpu", despite only having 96 cuda cores. >> >> >> Another question I'd like to ask is if anyone can shed some light on >> useful values for I-zero, wpc, scatter etc. >> >> With thanks in advance, >> Dave. >> >> >> _______________________________________________ >> 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 Thu Oct 15 05:33:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:33:42 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Yes, RTK can certainly do things like that. Start with a simple geometry following the example Forward projection of the wiki and maybe come back to us with more precise questions? Good luck, Simon On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: > hi, > Im working on a CT data set using ITK.. Im trying to come up with a > registration algorithm for fluoroscopy image obtained from C-Arm taken at > some angle wrt to the patient and the projection of CT data taken at the > same angle as that of the C-arm.. i need to change the angles of projection > and the focal length of the source from time to time for my study.. I was > wondering if i could do that using RTK? If yes, could you tell me where I > find information that is relevant to my problem..Thank you > Regards > > _______________________________________________ > Rtk-users mailing 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 Oct 15 05:49:16 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:49:16 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Hi, Please stick to the mailing list. That's exactly what I understood and my previous answer is still valid. Simon On Thu, Oct 15, 2015 at 11:47 AM, vishal k wrote: > hi Simon, > Thanks for ur advice..sorry i couldn't explain it properly...here my > problem explained in detail.. I have to register 3D ct data with > Fluoroscopy image obtained during surgery.. the problem is that they use > different co-ordinate systems.. I thought since i can obtained the C arm > position using the DICOM tags (source to patient distance etc), i could use > these positions values to obtain forward projection of the CT data.. after > doing this I feel my registering the forward projection image and the > actual fluoroscopy image(obtained during the surgery) would be easier...Please > advice me if there is any better way to deal this problem.. > Regards > Vishal > > On Thu, Oct 15, 2015 at 3:03 PM, Simon Rit > wrote: > >> Yes, RTK can certainly do things like that. Start with a simple geometry >> following the example Forward projection >> of the >> wiki and maybe come back to us with more >> precise questions? >> Good luck, >> Simon >> >> On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: >> >>> hi, >>> Im working on a CT data set using ITK.. Im trying to come up with a >>> registration algorithm for fluoroscopy image obtained from C-Arm taken at >>> some angle wrt to the patient and the projection of CT data taken at the >>> same angle as that of the C-arm.. i need to change the angles of projection >>> and the focal length of the source from time to time for my study.. I was >>> wondering if i could do that using RTK? If yes, could you tell me where I >>> find information that is relevant to my problem..Thank you >>> Regards >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnthibault at gmail.com Thu Oct 15 07:55:17 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Thu, 15 Oct 2015 13:55:17 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Thank you very much Simon for this advice, I should have read more carefully the recent posts about FFTWF / FFTWD. Now that Itk has been rebuilt using these flags, I no longer experience the previous problem. Unfortunately, when reconstructing with the CPU version of FDK, it seems that, although Ramp filtering and backprojection now do work very well, I still have issues with the weighting filter of FDK. As I am not familiar with analytic reconstruction methods, I don't know if the geometric parameters that are generated by the import method of Reg23ProjectionGeometry are consistant with the high variability of the gain factor applied to my projection by FDKWeightProjectionFilter: Just a short example: When using the following geometric parameters: SrcToCenter -1045.84 SrcToDet -1261.02 srcOffX 6.56918 srcOffY 6.56918 ProjOffX -151.44 ProjOffY -151.44 => FDKWeighting filter outputs an image that has a mean of -1.518 with a standard deviation of 2.056 with minimum value of -6.130 and maximum value of 1.871 On a frame where the source offset seems to be a little bit lower, I have the following gemetric parameters: SrcToCenter -1042.66 SrcToDet -1257.4 srcOffX 1.25469 srcOffY 1.25469 ProjOffX -150.321 ProjOffY -150.321 => FDKWeighting filter outputs an image that has a mean of -4.279E-4 with a standard deviation of 5.786E-4 with minimum value of -0.005 and maximum value of 5.268E-4 For comparison, our attenuation images in input of FDK have a mean of 0.8 with a standard deviation of 1.09 with minimum value of -1 and maximum value of 3.262. Here the negative values of attenuation arise from a problem while approximating the I0 in our images, although we should work on that problem, it was not that critical in SART reconstruction. I am surprised by such an important difference in gain applied to projection, given that, when disabling manually this weighting filter in RTK code, RampFiltering and BackProjection alone provided visually good reconstruction results. If you have any idea of what could have gone wrong in the process of importing geometry and/or applying weighting filter, I would be glad to hear it. Thank you in advance. Kind regards Thibault Notargiacomo 2015-10-14 18:58 GMT+02:00 Simon Rit : > Hi Thibault, > No, there is not really a log system that would allow you debugging at run > time. You can compile a debug version that would enable a lot of messages > related to the pipeline. For this, I think you need to use NDEBUG at > compilation (it's an ITK mechanism that I never use). > No, it's not normal that you see an error message. There are two things: > - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it > only handles power of 2/3/5 dimensions and it's slow. I always advise > people to use FFTW by turning on ITK_USE_FFTW options during ITK's > compilation. > - I don't fully understand why vnl doesn't work either. I understand the > first two dimensions, for vnl (which I strongly suggest to not use), I pad > to the next power of 2 so > 780 * 2 (for zero padding) -> 2048 > 780 -> 1024 > but then, if you use 64 projections, why 11? Are you sure the second input > image to FDKConeBeamReconstructionImageFilter has the dimension you want? I > would try to connect input 2 to an itk::ImageFileWriter and check what are > the dimensions of this image. If you're absolutely sure, then I'll try to > reproduce and fix the issue. > Simon > > On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < > gnthibault at gmail.com> wrote: > >> Dear all, >> >> I recently had troubles while trying to rewrite my code, linked with >> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >> well, to using fdk reconstruction method. >> >> My first question: is there a general way to enable maximum debug log >> level at runtime in rtk ? >> >> My second question, is more specific: is it normal that I see such error >> message coming from itk when using FDKConeBeamReconstructionFilter : >> >> ExceptionObject caught with fdk->Update() in file [...] >> >> itk::ExceptionObject (0x7f377c020cb0) >> Location: "unknown" >> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >> Line: 416 >> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >> during SingleMethodExecute >> >> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >> Cannot compute FFT of image with size [2048, 1024, 11]. >> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >> size in each dimension has a prime factorization consisting of only 2s, 3s, >> or 5s. >> >> I suppose that this error arise while performing ramp filtering, but I >> see no relation between FFT configuration stated in the error log ( [2048, >> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >> projections. >> >> I also tried with 200 projection and I had the same problem, but with >> [2048, 1024, 34] >> >> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >> to the total number of projection in my dataset every time. >> >> The revision I am currently using: >> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >> Merge: 578cf89 09d820c >> >> >> Thank you in advance for your help. >> >> Regards >> >> Thibault Notargiacomo >> >> _______________________________________________ >> Rtk-users mailing 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 Oct 15 10:50:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 16:50:30 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Interesting... I never used a geometry with negative sdd and sid but that's the issue here in my opinion. I did a quick test with positive and negative sdd/sid and that does not work for me either. Can you make them positive somehow? BTW, do you still use a modified version of the reg23 and can you share it? Thanks, Simon PS: the script I used for the test: rtksimulatedgeometry \ -o g \ -n 360 \ --sdd 1500 \ --sid 1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o pos.mha -g g rtksimulatedgeometry \ -o g \ -n 360 \ --sdd -1500 \ --sid -1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o neg.mha -g g On Thu, Oct 15, 2015 at 1:55 PM, Notargiacomo Thibault wrote: > Thank you very much Simon for this advice, I should have read more > carefully the recent posts about FFTWF / FFTWD. > > Now that Itk has been rebuilt using these flags, I no longer experience > the previous problem. > Unfortunately, when reconstructing with the CPU version of FDK, it seems > that, although Ramp filtering and backprojection now do work very well, I > still have issues with the weighting filter of FDK. > > As I am not familiar with analytic reconstruction methods, I don't know if > the geometric parameters that are generated by the import method of > Reg23ProjectionGeometry are consistant with the high variability of the > gain factor applied to my projection by FDKWeightProjectionFilter: > > Just a short example: > When using the following geometric parameters: > > SrcToCenter -1045.84 > SrcToDet -1261.02 > srcOffX 6.56918 > srcOffY 6.56918 > ProjOffX -151.44 > ProjOffY -151.44 > > => FDKWeighting filter outputs an image that has a mean of -1.518 with a > standard deviation of 2.056 with minimum value of -6.130 and maximum > value of 1.871 > > > On a frame where the source offset seems to be a little bit lower, I have > the following gemetric parameters: > > SrcToCenter -1042.66 > SrcToDet -1257.4 > srcOffX 1.25469 > srcOffY 1.25469 > ProjOffX -150.321 > ProjOffY -150.321 > > => FDKWeighting filter outputs an image that has a mean of -4.279E-4 > with a standard deviation of 5.786E-4 with minimum value of -0.005 and > maximum value of 5.268E-4 > > For comparison, our attenuation images in input of FDK have a mean of 0.8 > with a standard deviation of 1.09 with minimum value of -1 and maximum > value of 3.262. > > Here the negative values of attenuation arise from a problem while > approximating the I0 in our images, although we should work on that > problem, it was not that critical in SART reconstruction. > > I am surprised by such an important difference in gain applied to > projection, given that, when disabling manually this weighting filter in > RTK code, RampFiltering and BackProjection alone provided visually good > reconstruction results. > > If you have any idea of what could have gone wrong in the process of > importing geometry and/or applying weighting filter, I would be glad to > hear it. > > Thank you in advance. > > Kind regards > > Thibault Notargiacomo > > > > > > > > > 2015-10-14 18:58 GMT+02:00 Simon Rit : > >> Hi Thibault, >> No, there is not really a log system that would allow you debugging at >> run time. You can compile a debug version that would enable a lot of >> messages related to the pipeline. For this, I think you need to use NDEBUG >> at compilation (it's an ITK mechanism that I never use). >> No, it's not normal that you see an error message. There are two things: >> - the FFT of itk (compiled by default, based on vnl) is really bad IMO: >> it only handles power of 2/3/5 dimensions and it's slow. I always advise >> people to use FFTW by turning on ITK_USE_FFTW options during ITK's >> compilation. >> - I don't fully understand why vnl doesn't work either. I understand the >> first two dimensions, for vnl (which I strongly suggest to not use), I pad >> to the next power of 2 so >> 780 * 2 (for zero padding) -> 2048 >> 780 -> 1024 >> but then, if you use 64 projections, why 11? Are you sure the second >> input image to FDKConeBeamReconstructionImageFilter has the dimension you >> want? I would try to connect input 2 to an itk::ImageFileWriter and check >> what are the dimensions of this image. If you're absolutely sure, then I'll >> try to reproduce and fix the issue. >> Simon >> >> On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < >> gnthibault at gmail.com> wrote: >> >>> Dear all, >>> >>> I recently had troubles while trying to rewrite my code, linked with >>> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >>> well, to using fdk reconstruction method. >>> >>> My first question: is there a general way to enable maximum debug log >>> level at runtime in rtk ? >>> >>> My second question, is more specific: is it normal that I see such error >>> message coming from itk when using FDKConeBeamReconstructionFilter : >>> >>> ExceptionObject caught with fdk->Update() in file [...] >>> >>> itk::ExceptionObject (0x7f377c020cb0) >>> Location: "unknown" >>> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >>> Line: 416 >>> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >>> during SingleMethodExecute >>> >>> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >>> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >>> Cannot compute FFT of image with size [2048, 1024, 11]. >>> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >>> size in each dimension has a prime factorization consisting of only 2s, 3s, >>> or 5s. >>> >>> I suppose that this error arise while performing ramp filtering, but I >>> see no relation between FFT configuration stated in the error log ( [2048, >>> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >>> projections. >>> >>> I also tried with 200 projection and I had the same problem, but with >>> [2048, 1024, 34] >>> >>> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >>> to the total number of projection in my dataset every time. >>> >>> The revision I am currently using: >>> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >>> Merge: 578cf89 09d820c >>> >>> >>> Thank you in advance for your help. >>> >>> Regards >>> >>> Thibault Notargiacomo >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 03:12:36 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 09:12:36 +0200 Subject: [Rtk-users] Question about the geometry Message-ID: Dear all. Hello again. I writing to you again because I need some help to understand how to declare the geometry of the system. Cyril redirected me towards this document ( http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a lot, but unfortunately it has not been enough to make me reconstruct a tomogram. I have attached a drawing of my setup (setup.jpg). The source-to-detector distance is around 1600 mm. I just rotate the sample instead of the source, and the sample-detector distance is 15 cm which makes the isocenter distance 1450. The field of view is around 2 cm. The aligned projections are located here: https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 and the raw tiffs are here: https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 I would say the input data looks as nice, but when reconstructing I'm still just getting noise: This is how I perform my "reconstruction" # 361 projections from 0 to 360 degrees. The source-detector distance is 1.6 m and the # sample-detector distance is 15 cm # I have tried with many variations of --ssd and --sid but I think they all look the same rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o c:\Work\out_dir\geometry_real.xml # make a mha file out of the tiff files rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output c:\Work\out_dir\cylinder-a.mha --regexp .tif # "Reconstruct" the data. rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 The result can be viewed in the recon_result.PNG attachment. The reconstrcution can be found here: https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 Can someone please help me what I am doing wrong? best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: setup.jpg Type: image/jpeg Size: 29527 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: recon_result.PNG Type: image/png Size: 239196 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 06:09:04 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 12:09:04 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Is the origin and spacing of your projection data correct? What is your projection pixel size? Regards, Chao 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger : > Dear all. Hello again. > > I writing to you again because I need some help to understand how to > declare the geometry of the system. > > Cyril redirected me towards this document ( > http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > lot, but unfortunately it has not been enough to make me reconstruct a > tomogram. > > I have attached a drawing of my setup (setup.jpg). The > source-to-detector distance is around 1600 mm. I just rotate the > sample instead of the source, and the sample-detector distance is 15 > cm which makes the isocenter distance 1450. The field of view is > around 2 cm. > > The aligned projections are located here: > https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > and the raw tiffs are here: > https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > > I would say the input data looks as nice, but when reconstructing I'm > still just getting noise: > > This is how I perform my "reconstruction" > > # 361 projections from 0 to 360 degrees. The source-detector distance > is 1.6 m and the > # sample-detector distance is 15 cm > # I have tried with many variations of --ssd and --sid but I think > they all look the same > rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > c:\Work\out_dir\geometry_real.xml > > # make a mha file out of the tiff files > rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > c:\Work\out_dir\cylinder-a.mha --regexp .tif > > # "Reconstruct" the data. > rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha -g > c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > > The result can be viewed in the recon_result.PNG attachment. > The reconstrcution can be found here: > https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > > Can someone please help me what I am doing wrong? > > best > > Arvid > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 07:15:25 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 13:15:25 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao. Thank you for the reply. However, I'm not quite sure what you mean by origin and spacing. A pixel on the detector is ~200 microns, and the sample is magnified around 1.3 times. I do understand that having a correct geometry is important to get an output image with correct dimensions, but I do not understand it's so difficult for me to make a single successful reconstruction (possibly with a dummy geometry). best Arvid PS: Just to validate the data I'm testing on I installed Octave and created a sinogram I then ran through its iradon implementation. It seemed to work quite nicely (see attachments). On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > Hi Arvid, > > Is the origin and spacing of your projection data correct? What is your > projection pixel size? > > Regards, Chao > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > : >> >> Dear all. Hello again. >> >> I writing to you again because I need some help to understand how to >> declare the geometry of the system. >> >> Cyril redirected me towards this document ( >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> lot, but unfortunately it has not been enough to make me reconstruct a >> tomogram. >> >> I have attached a drawing of my setup (setup.jpg). The >> source-to-detector distance is around 1600 mm. I just rotate the >> sample instead of the source, and the sample-detector distance is 15 >> cm which makes the isocenter distance 1450. The field of view is >> around 2 cm. >> >> The aligned projections are located here: >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> and the raw tiffs are here: >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> I would say the input data looks as nice, but when reconstructing I'm >> still just getting noise: >> >> This is how I perform my "reconstruction" >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> is 1.6 m and the >> # sample-detector distance is 15 cm >> # I have tried with many variations of --ssd and --sid but I think >> they all look the same >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> c:\Work\out_dir\geometry_real.xml >> >> # make a mha file out of the tiff files >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> # "Reconstruct" the data. >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> The result can be viewed in the recon_result.PNG attachment. >> The reconstrcution can be found here: >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> Can someone please help me what I am doing wrong? >> >> best >> >> Arvid >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: Capture.JPG Type: image/jpeg Size: 58155 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 08:03:16 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 14:03:16 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Since you know how important a correct geometry is, you should understand why you need projection origin and spacing. CT geometry has more parameters than sid and sdd. How big the detector pixel size (spacing) and how the detector is places w.r.t. the central ray (origin) also play a role in the geometry. And in-plane/out-of-plane rotations etc. In your dataset the correct spacing and origin information is not stored correctly in the projection data, so the total geometry is wrong. I have tested your data with the following command line and it gives meaningful image. The newspacing and neworigin arguments force rtkfdk to accept spacing and origin information of projections from command line instead of from the data. Also I change the spacing of the volume from 2 to 0.2 because your object is small. rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 Apparently there is still some misalignment between this guessed geometry and the real geometry, which you need to figure out with your own hardware. Regards, Chao 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Hi Chao. > > Thank you for the reply. However, I'm not quite sure what you mean by > origin and spacing. > A pixel on the detector is ~200 microns, and the sample is magnified > around 1.3 times. > > I do understand that having a correct geometry is important to get an > output image with correct dimensions, but I do not understand it's so > difficult for me to make a single successful reconstruction (possibly > with a dummy geometry). > > best > > Arvid > > PS: Just to validate the data I'm testing on I installed Octave and > created a sinogram I then ran through its iradon implementation. It > seemed to work quite nicely (see attachments). > > On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > > Hi Arvid, > > > > Is the origin and spacing of your projection data correct? What is your > > projection pixel size? > > > > Regards, Chao > > > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Dear all. Hello again. > >> > >> I writing to you again because I need some help to understand how to > >> declare the geometry of the system. > >> > >> Cyril redirected me towards this document ( > >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> lot, but unfortunately it has not been enough to make me reconstruct a > >> tomogram. > >> > >> I have attached a drawing of my setup (setup.jpg). The > >> source-to-detector distance is around 1600 mm. I just rotate the > >> sample instead of the source, and the sample-detector distance is 15 > >> cm which makes the isocenter distance 1450. The field of view is > >> around 2 cm. > >> > >> The aligned projections are located here: > >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> and the raw tiffs are here: > >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> > >> I would say the input data looks as nice, but when reconstructing I'm > >> still just getting noise: > >> > >> This is how I perform my "reconstruction" > >> > >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> is 1.6 m and the > >> # sample-detector distance is 15 cm > >> # I have tried with many variations of --ssd and --sid but I think > >> they all look the same > >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> c:\Work\out_dir\geometry_real.xml > >> > >> # make a mha file out of the tiff files > >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> > >> # "Reconstruct" the data. > >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> > >> The result can be viewed in the recon_result.PNG attachment. > >> The reconstrcution can be found here: > >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> > >> Can someone please help me what I am doing wrong? > >> > >> best > >> > >> Arvid > >> > >> _______________________________________________ > >> Rtk-users mailing 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 Fri Oct 16 08:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 16 Oct 2015 14:15:43 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Thanks a lot Chao, I'm so glad that someone else than me did this! Just as a side note, Arvid, if you don't understand what is the origin and the spacing, look at the ITK software guide section 4.1.4, this is VERY important. Simon On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > Hi Arvid, > > Since you know how important a correct geometry is, you should understand > why you need projection origin and spacing. > CT geometry has more parameters than sid and sdd. How big the detector > pixel size (spacing) and how the detector is places w.r.t. the central ray > (origin) also play a role in the geometry. And in-plane/out-of-plane > rotations etc. > In your dataset the correct spacing and origin information is not stored > correctly in the projection data, so the total geometry is wrong. > > I have tested your data with the following command line and it gives > meaningful image. The newspacing and neworigin arguments force rtkfdk to > accept spacing and origin information of projections from command line > instead of from the data. Also I change the spacing of the volume from 2 to > 0.2 because your object is small. > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha > -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 > --newspacing=0.2 --neworigin=-20,-20 > > Apparently there is still some misalignment between this guessed geometry > and the real geometry, which you need to figure out with your own hardware. > > Regards, > Chao > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < > bottiger at gmail.com>: > >> Hi Chao. >> >> Thank you for the reply. However, I'm not quite sure what you mean by >> origin and spacing. >> A pixel on the detector is ~200 microns, and the sample is magnified >> around 1.3 times. >> >> I do understand that having a correct geometry is important to get an >> output image with correct dimensions, but I do not understand it's so >> difficult for me to make a single successful reconstruction (possibly >> with a dummy geometry). >> >> best >> >> Arvid >> >> PS: Just to validate the data I'm testing on I installed Octave and >> created a sinogram I then ran through its iradon implementation. It >> seemed to work quite nicely (see attachments). >> >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >> > Hi Arvid, >> > >> > Is the origin and spacing of your projection data correct? What is your >> > projection pixel size? >> > >> > Regards, Chao >> > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> > : >> >> >> >> Dear all. Hello again. >> >> >> >> I writing to you again because I need some help to understand how to >> >> declare the geometry of the system. >> >> >> >> Cyril redirected me towards this document ( >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> >> lot, but unfortunately it has not been enough to make me reconstruct a >> >> tomogram. >> >> >> >> I have attached a drawing of my setup (setup.jpg). The >> >> source-to-detector distance is around 1600 mm. I just rotate the >> >> sample instead of the source, and the sample-detector distance is 15 >> >> cm which makes the isocenter distance 1450. The field of view is >> >> around 2 cm. >> >> >> >> The aligned projections are located here: >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> >> and the raw tiffs are here: >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> >> >> I would say the input data looks as nice, but when reconstructing I'm >> >> still just getting noise: >> >> >> >> This is how I perform my "reconstruction" >> >> >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> >> is 1.6 m and the >> >> # sample-detector distance is 15 cm >> >> # I have tried with many variations of --ssd and --sid but I think >> >> they all look the same >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> >> c:\Work\out_dir\geometry_real.xml >> >> >> >> # make a mha file out of the tiff files >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> >> >> # "Reconstruct" the data. >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> >> c:\Work\out_dir\cylinder_a_recon.mha -g >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> >> >> The result can be viewed in the recon_result.PNG attachment. >> >> The reconstrcution can be found here: >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> >> >> Can someone please help me what I am doing wrong? >> >> >> >> best >> >> >> >> Arvid >> >> >> >> _______________________________________________ >> >> 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 bottiger at gmail.com Fri Oct 16 08:33:38 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 14:33:38 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao Wu Thank you very much! This is definitely something I can use in order to move forward. I'm not trying to make the best possible reconstruction out of this dataset, but just have something that works so I can start playing around and get familiar with RTK. Which I do have now. And to Simon: Thanks for the link. bets Arvid On Fri, Oct 16, 2015 at 2:15 PM, Simon Rit wrote: > Thanks a lot Chao, I'm so glad that someone else than me did this! > Just as a side note, Arvid, if you don't understand what is the origin and > the spacing, look at the ITK software guide section 4.1.4, this is VERY > important. > Simon > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: >> >> Hi Arvid, >> >> Since you know how important a correct geometry is, you should understand >> why you need projection origin and spacing. >> CT geometry has more parameters than sid and sdd. How big the detector >> pixel size (spacing) and how the detector is places w.r.t. the central ray >> (origin) also play a role in the geometry. And in-plane/out-of-plane >> rotations etc. >> In your dataset the correct spacing and origin information is not stored >> correctly in the projection data, so the total geometry is wrong. >> >> I have tested your data with the following command line and it gives >> meaningful image. The newspacing and neworigin arguments force rtkfdk to >> accept spacing and origin information of projections from command line >> instead of from the data. Also I change the spacing of the volume from 2 to >> 0.2 because your object is small. >> >> rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml >> --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 >> >> Apparently there is still some misalignment between this guessed geometry >> and the real geometry, which you need to figure out with your own hardware. >> >> Regards, >> Chao >> >> >> 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> : >>> >>> Hi Chao. >>> >>> Thank you for the reply. However, I'm not quite sure what you mean by >>> origin and spacing. >>> A pixel on the detector is ~200 microns, and the sample is magnified >>> around 1.3 times. >>> >>> I do understand that having a correct geometry is important to get an >>> output image with correct dimensions, but I do not understand it's so >>> difficult for me to make a single successful reconstruction (possibly >>> with a dummy geometry). >>> >>> best >>> >>> Arvid >>> >>> PS: Just to validate the data I'm testing on I installed Octave and >>> created a sinogram I then ran through its iradon implementation. It >>> seemed to work quite nicely (see attachments). >>> >>> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >>> > Hi Arvid, >>> > >>> > Is the origin and spacing of your projection data correct? What is your >>> > projection pixel size? >>> > >>> > Regards, Chao >>> > >>> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >>> > : >>> >> >>> >> Dear all. Hello again. >>> >> >>> >> I writing to you again because I need some help to understand how to >>> >> declare the geometry of the system. >>> >> >>> >> Cyril redirected me towards this document ( >>> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >>> >> lot, but unfortunately it has not been enough to make me reconstruct a >>> >> tomogram. >>> >> >>> >> I have attached a drawing of my setup (setup.jpg). The >>> >> source-to-detector distance is around 1600 mm. I just rotate the >>> >> sample instead of the source, and the sample-detector distance is 15 >>> >> cm which makes the isocenter distance 1450. The field of view is >>> >> around 2 cm. >>> >> >>> >> The aligned projections are located here: >>> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >>> >> and the raw tiffs are here: >>> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >>> >> >>> >> I would say the input data looks as nice, but when reconstructing I'm >>> >> still just getting noise: >>> >> >>> >> This is how I perform my "reconstruction" >>> >> >>> >> # 361 projections from 0 to 360 degrees. The source-detector distance >>> >> is 1.6 m and the >>> >> # sample-detector distance is 15 cm >>> >> # I have tried with many variations of --ssd and --sid but I think >>> >> they all look the same >>> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >>> >> c:\Work\out_dir\geometry_real.xml >>> >> >>> >> # make a mha file out of the tiff files >>> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >>> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >>> >> >>> >> # "Reconstruct" the data. >>> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >>> >> c:\Work\out_dir\cylinder_a_recon.mha -g >>> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >>> >> >>> >> The result can be viewed in the recon_result.PNG attachment. >>> >> The reconstrcution can be found here: >>> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >>> >> >>> >> Can someone please help me what I am doing wrong? >>> >> >>> >> best >>> >> >>> >> Arvid >>> >> >>> >> _______________________________________________ >>> >> 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 simon.rit at creatis.insa-lyon.fr Tue Oct 20 14:38:24 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 20 Oct 2015 20:38:24 +0200 Subject: [Rtk-users] using RTK with projection matrices and projection images In-Reply-To: References: Message-ID: Dear Shiras Abdurahman, It's better to email the mailing so that everybody can participate our discussion. We developped a tool to do this a while ago but it's never made it to the public repo. I have enclosed it if you want to have a look but it does what you want I think. The part of interest for you is how the variable matProj is converted to an RTK geometry. We'll try to clean it and push it to the main repo in November if you can't figure out how to use it. Good luck! Simon On Tue, Oct 20, 2015 at 5:07 PM, shiras abdurahman < shiras.abdurahman at gmail.com> wrote: > Dear Dr. Rit, > > My name is Shiras Abdurahman and I am a PhD student at ovgu Magdeburg, > Germany. Currently, I am working in tomographic reconstruction and I > started to using RTK. I have projection images and corresponding projection > matrices. I want to reconstruct volume with RTK. Is it possible to set > projection matrices directly and reconstruct the volume. Or do I need to > decompose first and get intrinsic and extrinsic parameters especially > rotation angles and use addProjection function? > I know that geometry can be read from xml file. > > Thank you for your time and patience. > > With regards, > Shiras Abdurahman > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rtkthales.cxx Type: text/x-c++src Size: 9360 bytes Desc: not available URL: From wuchao04 at gmail.com Mon Oct 26 16:30:58 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 26 Oct 2015 21:30:58 +0100 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Well, that's just some guess. I assume the central ray goes towards the center of your detector, so the origin should be denoted as somewhere near (- half_width, - half_height) in millimeter. Then I just fine-tune it manually a little bit to get a little bit better results... Regards, Chao 2015-10-26 19:44 GMT+01:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Dear Chao. > > I am very thankful for the help you provided me some days ago on the > RTK mailing list. However, I have a quick followup question for you, > which I have not been able to learn by reading the (very long) manual > another user provided me with. > > I am now working on another dataset, and get similar artifact when > reconstructing. Could you please help understand why you picked the > parameters you did? I guess the "spacing" is pixel size, but why did > why you pick "neworigin" to be -20,-20 ? > > best > > Arvid > > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > > Hi Arvid, > > > > Since you know how important a correct geometry is, you should understand > > why you need projection origin and spacing. > > CT geometry has more parameters than sid and sdd. How big the detector > pixel > > size (spacing) and how the detector is places w.r.t. the central ray > > (origin) also play a role in the geometry. And in-plane/out-of-plane > > rotations etc. > > In your dataset the correct spacing and origin information is not stored > > correctly in the projection data, so the total geometry is wrong. > > > > I have tested your data with the following command line and it gives > > meaningful image. The newspacing and neworigin arguments force rtkfdk to > > accept spacing and origin information of projections from command line > > instead of from the data. Also I change the spacing of the volume from 2 > to > > 0.2 because your object is small. > > > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > > c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml > > --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 > > > > Apparently there is still some misalignment between this guessed geometry > > and the real geometry, which you need to figure out with your own > hardware. > > > > Regards, > > Chao > > > > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Hi Chao. > >> > >> Thank you for the reply. However, I'm not quite sure what you mean by > >> origin and spacing. > >> A pixel on the detector is ~200 microns, and the sample is magnified > >> around 1.3 times. > >> > >> I do understand that having a correct geometry is important to get an > >> output image with correct dimensions, but I do not understand it's so > >> difficult for me to make a single successful reconstruction (possibly > >> with a dummy geometry). > >> > >> best > >> > >> Arvid > >> > >> PS: Just to validate the data I'm testing on I installed Octave and > >> created a sinogram I then ran through its iradon implementation. It > >> seemed to work quite nicely (see attachments). > >> > >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > >> > Hi Arvid, > >> > > >> > Is the origin and spacing of your projection data correct? What is > your > >> > projection pixel size? > >> > > >> > Regards, Chao > >> > > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > >> > : > >> >> > >> >> Dear all. Hello again. > >> >> > >> >> I writing to you again because I need some help to understand how to > >> >> declare the geometry of the system. > >> >> > >> >> Cyril redirected me towards this document ( > >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> >> lot, but unfortunately it has not been enough to make me reconstruct > a > >> >> tomogram. > >> >> > >> >> I have attached a drawing of my setup (setup.jpg). The > >> >> source-to-detector distance is around 1600 mm. I just rotate the > >> >> sample instead of the source, and the sample-detector distance is 15 > >> >> cm which makes the isocenter distance 1450. The field of view is > >> >> around 2 cm. > >> >> > >> >> The aligned projections are located here: > >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> >> and the raw tiffs are here: > >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> >> > >> >> I would say the input data looks as nice, but when reconstructing I'm > >> >> still just getting noise: > >> >> > >> >> This is how I perform my "reconstruction" > >> >> > >> >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> >> is 1.6 m and the > >> >> # sample-detector distance is 15 cm > >> >> # I have tried with many variations of --ssd and --sid but I think > >> >> they all look the same > >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> >> c:\Work\out_dir\geometry_real.xml > >> >> > >> >> # make a mha file out of the tiff files > >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> >> > >> >> # "Reconstruct" the data. > >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> >> > >> >> The result can be viewed in the recon_result.PNG attachment. > >> >> The reconstrcution can be found here: > >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> >> > >> >> Can someone please help me what I am doing wrong? > >> >> > >> >> best > >> >> > >> >> Arvid > >> >> > >> >> _______________________________________________ > >> >> Rtk-users mailing 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 Wed Oct 28 11:47:13 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Wed, 28 Oct 2015 16:47:13 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter Message-ID: <5630EE01.5070900@cppm.in2p3.fr> Hello everyone, I have a question/suggestion about the set of rtkDraw*ImageFilter. This filter are written as additive filters: for example, in rtkDrawEllipsoidImageFilter.txx, we can find for(..) itOut.Set( ellipsoid.density + itIn.Get() ) instead of for(..) itOut.Set( ellipsoid.density ) I think it can be more flexible the second option, because we can always associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. Moreover, the rtkDrawGeometricPhantomImageFilter class already uses itkAddImageFilter in order to have additive filters (which is redundant in current situation). What do you think ? Regards From shiraska at gmail.com Wed Oct 28 13:12:36 2015 From: shiraska at gmail.com (Shiras Abdurahman) Date: Wed, 28 Oct 2015 18:12:36 +0100 Subject: [Rtk-users] Filtered projection images Message-ID: Hi, I want to access processed projections especially filtered projections which are used for backprojection. Is it possible in RTK? Shiras -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 28 15:52:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:52:10 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: <5630EE01.5070900@cppm.in2p3.fr> References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: Hi Mathieu, Thanks for pointing this out. I agree that it might not be the best solution, yet one could argue that you could simply create a constant image with 0 to do what you'd like from the current implementation. My main problem is that I just tried to do what you suggest and some tests then fail... which shows the obvious, it's not a backward compatible change. I see two solutions: - keep it as is and you use ConstantImageFilter + we remove useless add filters, - a more complex but maybe more elegant solution: add a third template parameter for the operation that would allow the user to do what he'd like in a functor. That's what's done with filters that derive from itk::UnaryImageFilter . The default would be itk::Add2 but we could find or implement another one that simply discards the pixel value. What do you think? Simon PS: looking in the code, I just found that rtk::DrawConeImageFilter is not consistent with the others, it was always setting to 0 outside... that's been fixed! On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont wrote: > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. This > filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can always > associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is redundant in > current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > Rtk-users mailing 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 Oct 28 15:53:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:53:25 +0100 Subject: [Rtk-users] Filtered projection images In-Reply-To: References: Message-ID: Hi, I guess you mean filtered projections that are used in filtered backprojections algorithm? The filter you are looking for is rtk::FFTRampImageFilter which implements the ramp filter. There is a command line tool that can do it, rtkramp. Regards, Simon On Wed, Oct 28, 2015 at 6:12 PM, Shiras Abdurahman wrote: > Hi, > > I want to access processed projections especially filtered projections > which are used for backprojection. Is it possible in RTK? > > Shiras > > _______________________________________________ > Rtk-users mailing 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 Fri Oct 30 06:56:50 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Fri, 30 Oct 2015 11:56:50 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: <56334CF2.8070902@cppm.in2p3.fr> Hi, In case of your first solution, you can not chain several Draw*ImageFilters. For example, if you want to create small cylinders in a big cylinder. Your second solution is better. One another solution can be a thing like itk:SpatialObject but more simpler. An rtk::SpatialObject which one function (isInside(point)). We create a rtkDrawImageFilter class and implement ThreadedGenerateData like this : DrawImageFilter::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType itkNotUsed(threadId) { ... while( !itOut.IsAtEnd() ) { this->GetInput()->TransformIndexToPhysicalPoint(itOut.GetIndex(), point); if(m_rtkSpatialObject.isInside(point) itOut.Set(m_rtkFillFunctor(density, itIn.Get()); ... } DrawConeImageFilter class can be a child of this new DrawImageFilter (with new methods like setAngle, SetRadius which will adjust the rtkConeSpatialObject) This solution suppress duplicated code in Draw*ImageFilter::ThreadedGenerateData and makes easier implementation of another type of filling. On 28/10/2015 20:52, Simon Rit wrote: > Hi Mathieu, > Thanks for pointing this out. I agree that it might not be the best > solution, yet one could argue that you could simply create a constant > image with 0 to do what you'd like from the current implementation. My > main problem is that I just tried to do what you suggest and some tests > then fail... which shows the obvious, it's not a backward compatible change. > I see two solutions: > - keep it as is and you use ConstantImageFilter + we remove useless add > filters, > - a more complex but maybe more elegant solution: add a third template > parameter for the operation that would allow the user to do what he'd > like in a functor. That's what's done with filters that derive from > itk::UnaryImageFilter > . > The default would be itk::Add2 but we could find or implement another > one that simply discards the pixel value. > What do you think? > Simon > > PS: looking in the code, I just found that rtk::DrawConeImageFilter is > not consistent with the others, it was always setting to 0 outside... > that's been fixed! > > On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont > wrote: > > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. > This filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can > always associate Draw*ImageFilter and itkAddImageFilter to get an > additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is > redundant in current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > 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 Oct 1 02:18:53 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 08:18:53 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng wrote: > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: From cyril.mory at uclouvain.be Thu Oct 1 04:02:23 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Thu, 01 Oct 2015 10:02:23 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> Message-ID: <560CE88F.5030807@uclouvain.be> Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I'm using windows system (windows7 64 with VS 2013) and > I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with "ITK + FFTW" in > windows system? > > I'm just trying to use *rtkextractshroudsignal* and it seems to > require FFTW library externally. > > When I tried to use FFTW 3.3.4, I've encountered link errors as shown > below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > I'm running on Ubuntu 14.04 LTS and used the distribution library > (FFTW 3.3.3). If you're running on a Debian-based linux system, you > can also install the full development library set using the following > command: */sudo apt-get install libfftw3-3 libfftw3-dev/*. Then just > make sure that these libraries are being used by rerunning CCMake. > > I'm not quite sure about the error being thrown in your build, but > perhaps one of the main developers would be able to provide some more > insight into the issue. > > Hope this helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK > with those options on as you suggested. > > I've tried to use the up-to-date version of FFTW (3.3.4), but it > seems that it doesn't work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved external > symbol __imp_fftw_execute referenced in function "protected: > virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully using in > which system(Windows or Linux)? > > Thanks. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 6:56 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the inclusion of the > Fast Fourier Transform components. This requires compilation with > the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn't compile that way > initially, and it took a little bit of time to figure out. > > Hope that helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I'm now compiling itk-4.8 to use that feature since I've found > my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 4:31 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success since my > initial posting -- in fact I'm currently working on a new > method for accomplishing this task in certain challenging cases. > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase > signal output when called using the '-p' flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA/* > > From what I've experienced, this generally provides a good > signal [0,1) characterizing the respiratory phase using the > default settings. Occasionally, I've run into issues where > the default 'unsharpness' parameter needs to be adjusted to > give a clear signal (by appending the*--unsharp ##*flag to the > command). On more challenging shroud images -- notably, those > with little detectable signal from background -- additional > contrast-enhancement by pre-processing of the shroud has > assisted in signal extraction. > > I hope that helps -- and please let me know how it works out > for you. > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I've encountered exactly same issue and it would > be highly appreciated if you can share with me your > updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:*Rtk-users > [mailto:rtk-users-bounces at public.kitware.com]*On Behalf > Of*Joel Beaudry > *Sent:*Tuesday, March 17, 2015 5:25 PM > *To:*Matthew J. Riblett > > *Cc:*rtk-users at public.kitware.com > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but > I've had good success with using a Hilbert function in > python (scipy). I'm sure that Matlab has an equivalent > function, and maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett > > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a straightforward method > of going from the results of the rtkamsterdamshroud > and rtkextractshroudsignal applications to a [0,1) > phase signal for performing motion-compensated > reconstruction. I've been following along with the > MC-CBCT Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is used to > process the should signal prior to feeding it back > into the reconstruction application, but there is no > mention of how this is accomplished. I'm trying to > implement this into an automated workflow and I'd love > to know how this was accomplished. > > Thanks! > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > _______________________________________________ > 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 WEICHENG.SHEN at leidos.com Thu Oct 1 10:57:56 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Thu, 1 Oct 2015 14:57:56 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: image004.png Type: image/png Size: 15591 bytes Desc: image004.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 15591 bytes Desc: image001.png URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 1 11:23:48 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 17:23:48 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng wrote: > Hello Simon, > > > > Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside > RTK, the following error message appears: > > > > > ================================================================================================ > > > > CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): > By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project > has asked CMake to find a package configuration file provided by > "Gengetopt", but CMake did not find one. > > Could not find a package configuration file provided by "Gengetopt" with > any of the following names: > > GengetoptConfig.cmake > gengetopt-config.cmake > > Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set > "Gengetopt_DIR" to a directory containing one of the above files. If > "Gengetopt" provides a separate development package or SDK, be sure it has > been installed. > > > > > ================================================================================================ > > > > It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake > or gengetopt-config.cmake. I did a manual search for these files in the RTK > directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH > in the cmake GUI when performing configuration. The value of > CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln > file can now be successfully generated. > > > > Next I need to build the project using Visual Studio 2013. > > > > Thanks you very much for your help! > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Thursday, October 01, 2015 2:19 AM > *To:* Shen, Weicheng > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Unknown CMake command "WRAP_GGO" > > > > Hi, > > WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use > WRAP_GGO in an external project you need to do the same as in > applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the > easiest, to start with, is to build the rtktutorialapplication in the RTK > project. > > Let us know if that answered your problem, > > Simon > > > > On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: > > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 15591 bytes Desc: not available URL: From theday79 at gmail.com Thu Oct 1 17:33:51 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 1 Oct 2015 17:33:51 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <560CE88F.5030807@uclouvain.be> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> Message-ID: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park ; 'Matthew J. Riblett' ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I'm using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with "ITK + FFTW" in windows system? I'm just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I've encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I'm running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you're running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I'm not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I've tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn't work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn't compile that way initially, and it took a little bit of time to figure out. Hope that helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I'm now compiling itk-4.8 to use that feature since I've found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting - in fact I'm currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the '-p' flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I've experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I've run into issues where the default 'unsharpness' parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images - notably, those with little detectable signal from background - additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps - and please let me know how it works out for you. - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I've encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I've been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I'm trying to implement this into an automated workflow and I'd love to know how this was accomplished. Thanks! - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 joelbeaudry at gmail.com Thu Oct 1 17:40:30 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Thu, 1 Oct 2015 14:40:30 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Cyril, After trying out a few attempts, it seems like some values play nicer than others. Could it be an issue with floating point comparisons with the spacing and/or origins? It might explain why certain values seem to work (1.5) and others do not (0.88). I'll look at what values are being compared and get back to you. Thanks, Joel On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry wrote: > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 > spacing) and re-creating a mask off of that. So the motion mask should have > the same dimensions, spacing, and origin as the intended 4D image since I'm > using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating > my mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I created for > 160 (2), worked but not the case of 512 (0.88), and let you know what I > find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > wrote: > >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the small paragraph after >> the cuda command line : >> >> Note that the reconstructed volume in this example does not fully contain >> the attenuating object, causing hyper-attenuation artifacts on the borders >> of the result. To avoid these artifacts, reconstruct a larger volume >> (--dimension 256) should be fine. *Note that you will have to resize >> your motion mask as well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and allow any motion mask, >> but until I do, you can resize your motion mask using the CLITK tools ( >> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other datasets and it >> seems to be working. I need to increase the resolution and play around with >> the parameters now. >> >> I haven't had time to test it too much, but I do get an error when >> attempting to reconstruct with different dimensions. I'm using Cuda, and >> haven't tried it with just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >> AverageOutOfROIImageFilter: information of ROI image does not match input >> image" >> >> I'll be able to test some other things later and list more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line parameters AND data). Can >>> you restart it from scratch and let me know if you still have problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>> coordinates >>> - the regularization parameters (gamma space and gamma time) were way >>> too high. The regularization with a high gamma-time caused frames to be >>> identical, while it should only discourage variations >>> >>> I hope it works, now. If it doesn't work for you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and indeed, there are >>> several mistakes in it. I am working on correcting them. I'll keep you >>> posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>> >>> Hi RTK-users, >>> >>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>> example. The 5 frames should show some differences pertaining to patient >>> motion but the ones that I'm producing are identical, so no motion is >>> visible. >>> >>> Has anyone been able to follow the example and the provided dataset to >>> create a 4D image? >>> >>> Thanks, >>> Joel >>> >>> >>> _______________________________________________ >>> 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 Fri Oct 2 02:44:21 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 2 Oct 2015 08:44:21 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Joel, Can you explain how you created your mask? Looking at the code, it seems to me that if you create a 4D image with RTK, create a mask from this image with exactly the same meta info and pass it to ROOSTER, that should work in all cases. If I were you, I would compare the two mhd files (of the mask and the 4D image you used to create it) and verify that the meta info is exactly the same. For ROOSTER, I suggest to add an interpolation when the information is not inconsistent, e.g., in the main() function. I can do it if you agree Cyril. Simon On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry wrote: > Hi Cyril, > > After trying out a few attempts, it seems like some values play nicer than > others. Could it be an issue with floating point comparisons with the > spacing and/or origins? It might explain why certain values seem to work > (1.5) and others do not (0.88). I'll look at what values are being compared > and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >> spacing) and re-creating a mask off of that. So the motion mask should have >> the same dimensions, spacing, and origin as the intended 4D image since I'm >> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >> my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the mask I created >> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >> find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> Good to hear it's working now. >>> The error you get is explained on the wiki in the small paragraph after >>> the cuda command line : >>> >>> Note that the reconstructed volume in this example does not fully >>> contain the attenuating object, causing hyper-attenuation artifacts on the >>> borders of the result. To avoid these artifacts, reconstruct a larger >>> volume (--dimension 256) should be fine. *Note that you will have to >>> resize your motion mask as well, as 3D the motion mask is expected to have >>> the same size, spacing and origin as the first 3 dimensions of the 4D >>> output. * >>> >>> I guess I should take some time to fix that, and allow any motion mask, >>> but until I do, you can resize your motion mask using the CLITK tools ( >>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>> >>> Cyril >>> >>> >>> >>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other datasets and it >>> seems to be working. I need to increase the resolution and play around with >>> the parameters now. >>> >>> I haven't had time to test it too much, but I do get an error when >>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>> haven't tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>> AverageOutOfROIImageFilter: information of ROI image does not match input >>> image" >>> >>> I'll be able to test some other things later and list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> I have fixed the wiki example (command line parameters AND data). Can >>>> you restart it from scratch and let me know if you still have problems ? >>>> >>>> Roughly, the problems were the following: >>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>> coordinates >>>> - the regularization parameters (gamma space and gamma time) were way >>>> too high. The regularization with a high gamma-time caused frames to be >>>> identical, while it should only discourage variations >>>> >>>> I hope it works, now. If it doesn't work for you, please keep asking >>>> Cyril >>>> >>>> >>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki example, and indeed, there are >>>> several mistakes in it. I am working on correcting them. I'll keep you >>>> posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>> example. The 5 frames should show some differences pertaining to patient >>>> motion but the ones that I'm producing are identical, so no motion is >>>> visible. >>>> >>>> Has anyone been able to follow the example and the provided dataset to >>>> create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 cyril.mory at uclouvain.be Fri Oct 2 03:53:14 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 02 Oct 2015 09:53:14 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: <560E37EA.1060702@uclouvain.be> Indeed, resampling the mask if needed, to the correct size, spacing, origin and direction, seems the simplest way to deal with this issue. But I would do it in the filter rather than in the application, so that anything built on top of ROOSTER (i.e. incremental ROOSTER, or the rtkfourdroostertest) also benefits from it. Feel free to do it if you want, otherwise I'll take care of it next week :) On 10/02/2015 08:44 AM, Simon Rit wrote: > Hi Joel, > Can you explain how you created your mask? Looking at the code, it > seems to me that if you create a 4D image with RTK, create a mask from > this image with exactly the same meta info and pass it to ROOSTER, > that should work in all cases. If I were you, I would compare the two > mhd files (of the mask and the 4D image you used to create it) and > verify that the meta info is exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is > not inconsistent, e.g., in the main() function. I can do it if you > agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > > Hi Cyril, > > After trying out a few attempts, it seems like some values play > nicer than others. Could it be an issue with floating point > comparisons with the spacing and/or origins? It might explain why > certain values seem to work (1.5) and others do not (0.88). I'll > look at what values are being compared and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > > wrote: > > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions > 512 (0.88 spacing) and re-creating a mask off of that. So the > motion mask should have the same dimensions, spacing, and > origin as the intended 4D image since I'm using 4D rooster > with --dimension 512 --spacing 0.88. Perhaps I'm creating my > mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I > created for 160 (2), worked but not the case of 512 (0.88), > and let you know what I find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > > wrote: > > Hi Joel, > > Good to hear it's working now. > The error you get is explained on the wiki in the small > paragraph after the cuda command line : > > Note that the reconstructed volume in this example does > not fully contain the attenuating object, causing > hyper-attenuation artifacts on the borders of the result. > To avoid these artifacts, reconstruct a larger volume > (--dimension 256) should be fine. *Note that you will have > to resize your motion mask as well, as 3D the motion mask > is expected to have the same size, spacing and origin as > the first 3 dimensions of the 4D output. * > > I guess I should take some time to fix that, and allow any > motion mask, but until I do, you can resize your motion > mask using the CLITK tools > (http://www.creatis.insa-lyon.fr/rio/vv) or any method > that suits you. > > Cyril > > > > On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other >> datasets and it seems to be working. I need to increase >> the resolution and play around with the parameters now. >> >> I haven't had time to test it too much, but I do get an >> error when attempting to reconstruct with different >> dimensions. I'm using Cuda, and haven't tried it with >> just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws >> "In AverageOutOfROIImageFilter: information of ROI image >> does not match input image" >> >> I'll be able to test some other things later and list >> more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> I have fixed the wiki example (command line >> parameters AND data). Can you restart it from scratch >> and let me know if you still have problems ? >> >> Roughly, the problems were the following: >> - the "mm_50.mha" motion mask file was not aligned >> with the CBCT coordinates >> - the regularization parameters (gamma space and >> gamma time) were way too high. The regularization >> with a high gamma-time caused frames to be identical, >> while it should only discourage variations >> >> I hope it works, now. If it doesn't work for you, >> please keep asking >> Cyril >> >> >> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and >>> indeed, there are several mistakes in it. I am >>> working on correcting them. I'll keep you posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the >>>> 4DROOSTERReconstruction example. The 5 frames >>>> should show some differences pertaining to patient >>>> motion but the ones that I'm producing are >>>> identical, so no motion is visible. >>>> >>>> Has anyone been able to follow the example and the >>>> provided dataset to create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 joelbeaudry at gmail.com Fri Oct 2 12:31:38 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Fri, 2 Oct 2015 09:31:38 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: <560E37EA.1060702@uclouvain.be> References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: Hi Simon and Cyril, @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) and then use itkSnap to create a mask from that 3D image. I then use that mask as the input for ROOSTER, to which I again use the same spacing/dimensions. For some values it seems to work and other it doesn't. I'm wondering if itkSnap is truncating the spacing/dimension/origins when I save my mask, and perhaps why something like (160,2,-159) works but (511,0.88,-224.84). I'll take a look at the metadata. I'll try resampling my masks and like you said that should probably fix my issues. Thanks for the help, Joel On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory wrote: > Indeed, resampling the mask if needed, to the correct size, spacing, > origin and direction, seems the simplest way to deal with this issue. > But I would do it in the filter rather than in the application, so that > anything built on top of ROOSTER (i.e. incremental ROOSTER, or the > rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: > > Hi Joel, > Can you explain how you created your mask? Looking at the code, it seems > to me that if you create a 4D image with RTK, create a mask from this image > with exactly the same meta info and pass it to ROOSTER, that should work in > all cases. If I were you, I would compare the two mhd files (of the mask > and the 4D image you used to create it) and verify that the meta info is > exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is not > inconsistent, e.g., in the main() function. I can do it if you agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values play nicer >> than others. Could it be an issue with floating point comparisons with the >> spacing and/or origins? It might explain why certain values seem to work >> (1.5) and others do not (0.88). I'll look at what values are being compared >> and get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> wrote: >> >>> Hi Cyril, >>> >>> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >>> spacing) and re-creating a mask off of that. So the motion mask should have >>> the same dimensions, spacing, and origin as the intended 4D image since I'm >>> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >>> my mask incorrectly? >>> >>> I'll try and fiddle with it a bit later and see why the mask I created >>> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >>> find. >>> >>> Thanks again, >>> Joel >>> >>> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> Good to hear it's working now. >>>> The error you get is explained on the wiki in the small paragraph after >>>> the cuda command line : >>>> >>>> Note that the reconstructed volume in this example does not fully >>>> contain the attenuating object, causing hyper-attenuation artifacts on the >>>> borders of the result. To avoid these artifacts, reconstruct a larger >>>> volume (--dimension 256) should be fine. *Note that you will have to >>>> resize your motion mask as well, as 3D the motion mask is expected to have >>>> the same size, spacing and origin as the first 3 dimensions of the 4D >>>> output. * >>>> >>>> I guess I should take some time to fix that, and allow any motion mask, >>>> but until I do, you can resize your motion mask using the CLITK tools ( >>>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>>> >>>> Cyril >>>> >>>> >>>> >>>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>>> >>>> Hi Cyril, >>>> >>>> Works like a charm, thanks! I tried it on some other datasets and it >>>> seems to be working. I need to increase the resolution and play around with >>>> the parameters now. >>>> >>>> I haven't had time to test it too much, but I do get an error when >>>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>>> haven't tried it with just cpu reconstruction yet. >>>> >>>> i.e.) >>>> --dimension 160 --spacing 2 -> works >>>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>>> AverageOutOfROIImageFilter: information of ROI image does not match input >>>> image" >>>> >>>> I'll be able to test some other things later and list more details. >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> >>>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>>> wrote: >>>> >>>>> Hi Joel, >>>>> >>>>> I have fixed the wiki example (command line parameters AND data). Can >>>>> you restart it from scratch and let me know if you still have problems ? >>>>> >>>>> Roughly, the problems were the following: >>>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>>> coordinates >>>>> - the regularization parameters (gamma space and gamma time) were way >>>>> too high. The regularization with a high gamma-time caused frames to be >>>>> identical, while it should only discourage variations >>>>> >>>>> I hope it works, now. If it doesn't work for you, please keep asking >>>>> Cyril >>>>> >>>>> >>>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>>> >>>>> Hi Joel, >>>>> >>>>> I have just tried to reproduce the wiki example, and indeed, there are >>>>> several mistakes in it. I am working on correcting them. I'll keep you >>>>> posted. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>>> example. The 5 frames should show some differences pertaining to patient >>>>> motion but the ones that I'm producing are identical, so no motion is >>>>> visible. >>>>> >>>>> Has anyone been able to follow the example and the provided dataset to >>>>> create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 WEICHENG.SHEN at leidos.com Fri Oct 2 22:11:05 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Sat, 3 Oct 2015 02:11:05 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977222@EMP-EXMR104.corp.leidos.com> Hi Simon, Yes, if I run the CMake at the root of RTK, the example builds successfully. Thanks you very much! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 11:24 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng > wrote: Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: 15587 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 15591 bytes Desc: image002.png URL: From simon.rit at creatis.insa-lyon.fr Mon Oct 5 01:45:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 5 Oct 2015 07:45:06 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Oct 5 13:53:11 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 5 Oct 2015 13:53:11 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error1_using_ITK_FFT.png Type: image/png Size: 17214 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error in code.png Type: image/png Size: 21974 bytes Desc: not available URL: From cyril.mory at uclouvain.be Tue Oct 6 08:08:35 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Tue, 06 Oct 2015 14:08:35 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: <5613B9C3.4070309@uclouvain.be> Hi Joel, I have just pushed a fix for this issue: in the 4DROOSTER filter, I have added a resample filter between the ROI input and the AverageOutOfROIImageFilter. On my side, it runs fine. Let me know if it fixes the issue on your side. Thanks for pointing this out, Cyril On 10/02/2015 06:31 PM, Joel Beaudry wrote: > Hi Simon and Cyril, > > @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) > and then use itkSnap to create a mask from that 3D image. I then use > that mask as the input for ROOSTER, to which I again use the same > spacing/dimensions. For some values it seems to work and other it > doesn't. I'm wondering if itkSnap is truncating the > spacing/dimension/origins when I save my mask, and perhaps why > something like (160,2,-159) works but (511,0.88,-224.84). I'll take a > look at the metadata. > > I'll try resampling my masks and like you said that should probably > fix my issues. > > Thanks for the help, > Joel > > On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory > wrote: > > Indeed, resampling the mask if needed, to the correct size, > spacing, origin and direction, seems the simplest way to deal with > this issue. > But I would do it in the filter rather than in the application, so > that anything built on top of ROOSTER (i.e. incremental ROOSTER, > or the rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it > next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: >> Hi Joel, >> Can you explain how you created your mask? Looking at the code, >> it seems to me that if you create a 4D image with RTK, create a >> mask from this image with exactly the same meta info and pass it >> to ROOSTER, that should work in all cases. If I were you, I would >> compare the two mhd files (of the mask and the 4D image you used >> to create it) and verify that the meta info is exactly the same. >> For ROOSTER, I suggest to add an interpolation when the >> information is not inconsistent, e.g., in the main() function. I >> can do it if you agree Cyril. >> Simon >> >> On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values >> play nicer than others. Could it be an issue with floating >> point comparisons with the spacing and/or origins? It might >> explain why certain values seem to work (1.5) and others do >> not (0.88). I'll look at what values are being compared and >> get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with >> dimensions 512 (0.88 spacing) and re-creating a mask off >> of that. So the motion mask should have the same >> dimensions, spacing, and origin as the intended 4D image >> since I'm using 4D rooster with --dimension 512 --spacing >> 0.88. Perhaps I'm creating my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the >> mask I created for 160 (2), worked but not the case of >> 512 (0.88), and let you know what I find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the >> small paragraph after the cuda command line : >> >> Note that the reconstructed volume in this example >> does not fully contain the attenuating object, >> causing hyper-attenuation artifacts on the borders of >> the result. To avoid these artifacts, reconstruct a >> larger volume (--dimension 256) should be fine. *Note >> that you will have to resize your motion mask as >> well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 >> dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and >> allow any motion mask, but until I do, you can resize >> your motion mask using the CLITK tools >> (http://www.creatis.insa-lyon.fr/rio/vv) or any >> method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other >>> datasets and it seems to be working. I need to >>> increase the resolution and play around with the >>> parameters now. >>> >>> I haven't had time to test it too much, but I do get >>> an error when attempting to reconstruct with >>> different dimensions. I'm using Cuda, and haven't >>> tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> >>> throws "In AverageOutOfROIImageFilter: information >>> of ROI image does not match input image" >>> >>> I'll be able to test some other things later and >>> list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> >> > wrote: >>> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line >>> parameters AND data). Can you restart it from >>> scratch and let me know if you still have >>> problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not >>> aligned with the CBCT coordinates >>> - the regularization parameters (gamma space and >>> gamma time) were way too high. The >>> regularization with a high gamma-time caused >>> frames to be identical, while it should only >>> discourage variations >>> >>> I hope it works, now. If it doesn't work for >>> you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki >>>> example, and indeed, there are several mistakes >>>> in it. I am working on correcting them. I'll >>>> keep you posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the >>>>> 4DROOSTERReconstruction example. The 5 frames >>>>> should show some differences pertaining to >>>>> patient motion but the ones that I'm producing >>>>> are identical, so no motion is visible. >>>>> >>>>> Has anyone been able to follow the example and >>>>> the provided dataset to create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 Oct 6 09:11:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 6 Oct 2015 15:11:27 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park wrote: > Hi Simon, > > > > I?ve just tried to build it without FFTW library, as you have asked. > > > > I have encountered an error as shown in the attached pictures in running > ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, making > FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > > > Hope it helps. > > > > Yang > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Thanks a lot Yang for the detailed report, I'm sure that will be helpful > to many people. For my personal information, did you try to compile FFTW > from ITK as well? If it didn't work, could you let us know what was the > problem? > > Simon > > > > > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Tue Oct 6 10:49:55 2015 From: theday79 at gmail.com (Yang K Park) Date: Tue, 6 Oct 2015 10:49:55 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: <001c01d10046$44941080$cdbc3180$@gmail.com> Hi Simon, It seems that I misunderstood before. This time, I?ve followed your suggestion and encountered an error as follows: H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): fatal error C1083: Cannot open include file: 'fftw3.h': No such file or directory I?ve tested this with itk4.8.1, which is the most up-to-date release version. It seems that I need to specify the external fftw header file (fftw3.h), but the user interface for input does not appear in CMake unless I set ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. I hope this report can help itk developers resolve the issue. Thanks. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Tuesday, October 06, 2015 9:11 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com ] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park > Cc: Cyril Mory >; Matthew J. Riblett >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Tue Oct 6 11:00:16 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Tue, 6 Oct 2015 17:00:16 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <001c01d10046$44941080$cdbc3180$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> <001c01d10046$44941080$cdbc3180$@gmail.com> Message-ID: <5613E200.4050001@kitware.com> Yang, Simon, As I mentioned previously, you cannot build ITK with FFTW on Windows without setting ITK_USE_SYSTEM_FFTW=ON. You should get a warning in CMake specifying this. So the only solution to build ITK with FFTW on Windows is to use an externally compiled version of FFTW. Julien On 06/10/2015 16:49, Yang K Park wrote: > Hi Simon, > > It seems that I misunderstood before. This time, I?ve followed your > suggestion and encountered an error as follows: > > H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): > fatal error C1083: Cannot open include file: 'fftw3.h': No such file or > directory > > I?ve tested this with itk4.8.1, which is the most up-to-date release > version. > > It seems that I need to specify the external fftw header file (fftw3.h), > but the user interface for input does not appear in CMake unless I set > ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. > > I hope this report can help itk developers resolve the issue. > > Thanks. > > Yang > > *From:*simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of > *Simon Rit > *Sent:* Tuesday, October 06, 2015 9:11 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett > ; rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks Yang. I think I wasn't clear but what I meant was not to disable > FFTW but to compile and use FFTW in ITK by using > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=OFF > > instead of what I think you used > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=ON > > Julien Jomier from Kitware told me that both configurations worked for > him but your initial message suggests that the first did not work for > you. If you can confirm and explain your config (ITK version, compiler, > etc.). > > Simon > > PS: your test is useful anyway, I'll try to make the error message > clearer when FFTW is not used. > > On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: > > Hi Simon, > > I?ve just tried to build it without FFTW library, as you have asked. > > I have encountered an error as shown in the attached pictures in > running ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, > making FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > Hope it helps. > > Yang > > *From:*simon.rit at gmail.com > [mailto:simon.rit at gmail.com ] *On Behalf > Of *Simon Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > > *Cc:* Cyril Mory >; Matthew J. Riblett > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks a lot Yang for the detailed report, I'm sure that will be > helpful to many people. For my personal information, did you try to > compile FFTW from ITK as well? If it didn't work, could you let us > know what was the problem? > > Simon > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: > > Hi Cyril, > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally > succeeded. > > Following is the final version of my instruction. > > Thanks. > > Yang > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very > convenient! I really like it. Thanks for your hard works on this. > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > 1.Prepare fftw library files > > a.Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b.Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c.Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command > Prompt) > > d.Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e.Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > 2.Cmake for ITK > > a.Configure > > b.Turn on the following and reconfigure > > i.ITK_USE_SYSTEM_FFTW (mandatory to make the following options > appear) > > c.Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i.FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 > > ii.FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii.FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv.FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. > > d."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e.Reconfigure, Generate > > 3.Build ITK with Visual Studio > > a.In both Debug and Release > > 4.Cmake for RTK > > a.Default settings were used. > > b."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > 5.Build RTK using Visual Studio > > 6.Copy dll files to RTK bin folders > > a.Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b.To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7.Build RTK with Visual Studio > > *From:*Cyril Mory [mailto:cyril.mory at uclouvain.be > ] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park >; 'Matthew J. Riblett' > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam > Shroud > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just > have to activate it in the CMake options. On Windows, you cannot > do that. I do not have a clue why, but you cannot. You have to > install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled > DLLs from http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the > .lib files (that is absolutely necessary). You may have to run > the "lib.exe" program from the VS developer prompt instead of > the standard windows cmd.exe prompt. Specify you CPU > architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, > and you should be fine. I have successfully compiled this with > BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it > matters. > > If it works for you, then you might want to play around with the > other FFTW .lib files, and send on this mailing list a more > complete set of CMAKE options that works. I have tried some > other combinations without success, so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS > 2013) and I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with ?ITK + > FFTW? in windows system? > > I?m just trying to use *rtkextractshroudsignal* and it seems > to require FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors > as shown below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > I?m running on Ubuntu 14.04 LTS and used the distribution > library (FFTW 3.3.3). If you?re running on a Debian-based > linux system, you can also install the full development > library set using the following command: */sudo apt-get > install libfftw3-3 libfftw3-dev/*. Then just make sure that > these libraries are being used by rerunning CCMake. > > I?m not quite sure about the error being thrown in your > build, but perhaps one of the main developers would be able > to provide some more insight into the issue. > > Hope this helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to > compile ITK with those options on as you suggested. > > I?ve tried to use the up-to-date version of FFTW > (3.3.4), but it seems that it doesn?t work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved > external symbol __imp_fftw_execute referenced in > function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully > using in which system(Windows or Linux)? > > Thanks. > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the > inclusion of the Fast Fourier Transform components. > This requires compilation with the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that > way initially, and it took a little bit of time to > figure out. > > Hope that helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since > I?ve found my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data > from Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success > since my initial posting ? in fact I?m currently > working on a new method for accomplishing this task > in certain challenging cases. > > The most recent version of RTK provides an update to > the rtkextractshroudsignal application which > provides a phase signal output when called using the > ?-p? flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o > raw_signal.txt -p phase_signal.txt --method > LINEAR_BETWEEN_MINIMA/* > > From what I?ve experienced, this generally provides > a good signal [0,1) characterizing the respiratory > phase using the default settings. Occasionally, > I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear > signal (by appending the *--unsharp ##* flag to the > command). On more challenging shroud images ? > notably, those with little detectable signal from > background ? additional contrast-enhancement by > pre-processing of the shroud has assisted in signal > extraction. > > I hope that helps ? and please let me know how it > works out for you. > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue > and it would be highly appreciated if you can > share with me your updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical > School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:* Rtk-users > [mailto:rtk-users-bounces at public.kitware.com] > *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > > > *Cc:* rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal > data from Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab > script, but I've had good success with using a > Hilbert function in python (scipy). I'm sure > that Matlab has an equivalent function, and > maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. > Riblett > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a > straightforward method of going from the > results of the rtkamsterdamshroud and > rtkextractshroudsignal applications to a > [0,1) phase signal for performing > motion-compensated reconstruction. I?ve > been following along with the MC-CBCT > Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is > used to process the should signal prior to > feeding it back into the reconstruction > application, but there is no mention of how > this is accomplished. I?m trying to > implement this into an automated workflow > and I?d love to know how this was accomplished. > > Thanks! > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > > MCV Office Phone: +1.804.628.4858 > > > > _______________________________________________ > 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 > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From bottiger at gmail.com Mon Oct 12 05:42:20 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 11:42:20 +0200 Subject: [Rtk-users] Reconstruction problems Message-ID: Hi there I hope someone can help me me get started with RTK. First of all I should mention that I have compiled RTK on Windows 7 using Visual Studio 2013. Everything seems to compile and run just fine. Secondly: I tried to reproduce this example: http://wiki.openrtk.org/index.php/RTK/Scripts/FDK This was somewhat successful - I think. I could generate some projections, and reconstruct them. However, it just looks like an egg and not like a Shepp Logan phantom. See attachment. However, I'm unsure if this is expected or not. I took some homemade projections (of a small cylinder) and converted them into a MHA file (using rtkprojections.exe). The file looks correct in ImageJ. The dimensions are 370 pixels * 195 pixels * 361 projections You can get the file here: https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 The problem is that the reconstruction is wrong (see cylinder_recon). It looks like the dimensions are not read correctly, but I am unsure how I fix that? The rtkfdk.exe has a single --dimension parameter, but I am unsure which dimension that is suppose to be, but neither 195, 370 or any other value I could think of works for me. I hope someone can help me in the right direction. best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: SheppLogan.PNG Type: image/png Size: 150153 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cylinder_recon.PNG Type: image/png Size: 128472 bytes Desc: not available URL: From ghostcz at hotmail.com Mon Oct 12 05:54:44 2015 From: ghostcz at hotmail.com (louie L) Date: Mon, 12 Oct 2015 11:54:44 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Hi, You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? Cheers, Louie Sent from my iOS > On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 05:59:38 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 11:59:38 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: References: Message-ID: <561B848A.9090406@uclouvain.be> Hi Arvid, Well, you're on the right track :-) Your Shepp Logan reconstruction looks fine, I guess it is just a visualization problem: you can use vv http://www.creatis.insa-lyon.fr/rio/vv to open it and you will be able to change the "window" and "level" settings in visualization. Regarding the cylinder, can you send your geometry file too ? Regards Cyril Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Mon Oct 12 06:35:27 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:35:27 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: <561B848A.9090406@uclouvain.be> References: <561B848A.9090406@uclouvain.be> Message-ID: Hey Cyril I just wrote another e-mail about how I generated the geometry file (it's just simulated). But just in case I'll attach it here: best Arvid On Mon, Oct 12, 2015 at 11:59 AM, Cyril Mory wrote: > Hi Arvid, > > Well, you're on the right track :-) > Your Shepp Logan reconstruction looks fine, I guess it is just a > visualization problem: you can use vv > http://www.creatis.insa-lyon.fr/rio/vv > to open it and you will be able to change the "window" and "level" > settings in visualization. > > Regarding the cylinder, can you send your geometry file too ? > > Regards > Cyril > > Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example:http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here:https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > > > ------------------------------ > [image: Avast logo] > > L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le > logiciel antivirus Avast. > www.avast.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry360.xml Type: text/xml Size: 134495 bytes Desc: not available URL: From bottiger at gmail.com Mon Oct 12 06:36:03 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:36:03 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Sure. I'll admit I have yet to understand the specifics of the geometry file. Currently I just used a simulated one because that was what the SheppLogan example used, and the input projections looked similar. Here is a complete list of the commands I executed: rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 I did not do anything to the contrast and that is most likely the issue. I downloaded and installed vv and I can see some (very unclear) features inside the SheppLogan reconstruction - so that's nice. However, currently I'm mostly interested in getting the geometry right :) best On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: > Hi, > > You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? > > Cheers, > Louie > > Sent from my iOS > >> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >> >> Hi there >> >> I hope someone can help me me get started with RTK. >> >> First of all I should mention that I have compiled RTK on Windows 7 >> using Visual Studio 2013. Everything seems to compile and run just >> fine. >> >> Secondly: I tried to reproduce this example: >> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >> >> This was somewhat successful - I think. I could generate some >> projections, and reconstruct them. However, it just looks like an egg >> and not like a Shepp Logan phantom. See attachment. >> >> However, I'm unsure if this is expected or not. I took some homemade >> projections (of a small cylinder) and converted them into a MHA file >> (using rtkprojections.exe). The file looks correct in ImageJ. The >> dimensions are 370 pixels * 195 pixels * 361 projections >> >> You can get the file here: >> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >> >> The problem is that the reconstruction is wrong (see cylinder_recon). >> It looks like the dimensions are not read correctly, but I am unsure >> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >> I am unsure which dimension that is suppose to be, but neither 195, >> 370 or any other value I could think of works for me. >> >> I hope someone can help me in the right direction. >> >> best >> >> Arvid >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 15:52:10 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 21:52:10 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: <561C0F6A.6080602@uclouvain.be> Hi Arvid, Unfortunately, you cannot do that. You have to obtain the exact geometry of this particular acquisition from the cone beam device you used. If you need help to convert it to the RTK format, well, that's something you can ask for on this mailing list. Can you get the geometry data ? Regards, Cyril Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : > Sure. > > I'll admit I have yet to understand the specifics of the geometry > file. Currently I just used a simulated one because that was what the > SheppLogan example used, and the input projections looked similar. > > Here is a complete list of the commands I executed: > > rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml > > rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ > --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif > > rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o > c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g > c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 > > I did not do anything to the contrast and that is most likely the > issue. I downloaded and installed vv and I can see some (very unclear) > features inside the SheppLogan reconstruction - so that's nice. > However, currently I'm mostly interested in getting the geometry right :) > > best > > On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >> Hi, >> >> You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? >> >> Cheers, >> Louie >> >> Sent from my iOS >> >>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >>> >>> Hi there >>> >>> I hope someone can help me me get started with RTK. >>> >>> First of all I should mention that I have compiled RTK on Windows 7 >>> using Visual Studio 2013. Everything seems to compile and run just >>> fine. >>> >>> Secondly: I tried to reproduce this example: >>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>> >>> This was somewhat successful - I think. I could generate some >>> projections, and reconstruct them. However, it just looks like an egg >>> and not like a Shepp Logan phantom. See attachment. >>> >>> However, I'm unsure if this is expected or not. I took some homemade >>> projections (of a small cylinder) and converted them into a MHA file >>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>> dimensions are 370 pixels * 195 pixels * 361 projections >>> >>> You can get the file here: >>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>> >>> The problem is that the reconstruction is wrong (see cylinder_recon). >>> It looks like the dimensions are not read correctly, but I am unsure >>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>> I am unsure which dimension that is suppose to be, but neither 195, >>> 370 or any other value I could think of works for me. >>> >>> I hope someone can help me in the right direction. >>> >>> best >>> >>> Arvid >>> >>> >>> _______________________________________________ >>> 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 --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From cyril.mory at uclouvain.be Mon Oct 12 16:36:24 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 22:36:24 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: <561C1984.9030509@uclouvain.be> References: <561C1984.9030509@uclouvain.be> Message-ID: <561C19C8.5050304@uclouvain.be> Arvid, You can find a description of the geometry here : http://www.creatis.insa-lyon.fr/~srit/geometry.pdf In rtk/applications, several applications are simple converters from the cone beam manufacturer's raw geometry format to RTK geometry format, so you can also have a look at the code of these apps. If you know that you have an almost parallel beam, you can indeed try to use a dummy geometry file, but be careful: rtksimulatedgeometry generates a cone beam geometry, with large fan and cone angles if you leave the default parameters. You can adjust the 'sdd' and 'sid' options to simulate a very distant source, making rays almost parallel to each other (be careful with numerical precision, though). Hope it helps, Cyril Le 12/10/2015 21:59, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hello Cyril > > Thank you for getting back to me. I do have the geometry (albeit not > right here next to me). > However, my problem was that when I looked in the geometry file, I > didn't find it obvious how to define declare it - is it documented > somewhere? > > That said - the measurements I played around with is measured with an > almost parallel beam. I hoped I could reconstruct it (with minor > artifacts) using a dummy geometry file. > > best > > Arvid > > On Mon, Oct 12, 2015 at 9:52 PM, Cyril Mory wrote: >> Hi Arvid, >> >> Unfortunately, you cannot do that. You have to obtain the exact geometry of >> this particular acquisition from the cone beam device you used. >> If you need help to convert it to the RTK format, well, that's something you >> can ask for on this mailing list. >> Can you get the geometry data ? >> >> Regards, >> Cyril >> >> >> Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : >>> Sure. >>> >>> I'll admit I have yet to understand the specifics of the geometry >>> file. Currently I just used a simulated one because that was what the >>> SheppLogan example used, and the input projections looked similar. >>> >>> Here is a complete list of the commands I executed: >>> >>> rtksimulatedgeometry.exe -n 361 -o >>> c:\Users\aplb\Work\out_dir\geometry360.xml >>> >>> rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ >>> --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif >>> >>> rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o >>> c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g >>> c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 >>> >>> I did not do anything to the contrast and that is most likely the >>> issue. I downloaded and installed vv and I can see some (very unclear) >>> features inside the SheppLogan reconstruction - so that's nice. >>> However, currently I'm mostly interested in getting the geometry right :) >>> >>> best >>> >>> On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >>>> Hi, >>>> >>>> You can specify the size in each dimension. Can you post the arguments >>>> you used for the projections and reconstruction? Did you try to adjust the >>>> contrast of the output? >>>> >>>> Cheers, >>>> Louie >>>> >>>> Sent from my iOS >>>> >>>>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger >>>>> wrote: >>>>> >>>>> Hi there >>>>> >>>>> I hope someone can help me me get started with RTK. >>>>> >>>>> First of all I should mention that I have compiled RTK on Windows 7 >>>>> using Visual Studio 2013. Everything seems to compile and run just >>>>> fine. >>>>> >>>>> Secondly: I tried to reproduce this example: >>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>>>> >>>>> This was somewhat successful - I think. I could generate some >>>>> projections, and reconstruct them. However, it just looks like an egg >>>>> and not like a Shepp Logan phantom. See attachment. >>>>> >>>>> However, I'm unsure if this is expected or not. I took some homemade >>>>> projections (of a small cylinder) and converted them into a MHA file >>>>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>>>> dimensions are 370 pixels * 195 pixels * 361 projections >>>>> >>>>> You can get the file here: >>>>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>>>> >>>>> The problem is that the reconstruction is wrong (see cylinder_recon). >>>>> It looks like the dimensions are not read correctly, but I am unsure >>>>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>>>> I am unsure which dimension that is suppose to be, but neither 195, >>>>> 370 or any other value I could think of works for me. >>>>> >>>>> I hope someone can help me in the right direction. >>>>> >>>>> best >>>>> >>>>> Arvid >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >> >> >> --- >> L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le >> logiciel antivirus Avast. >> https://www.avast.com/antivirus >> --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From gnthibault at gmail.com Wed Oct 14 05:38:46 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Wed, 14 Oct 2015 11:38:46 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter Message-ID: Dear all, I recently had troubles while trying to rewrite my code, linked with libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite well, to using fdk reconstruction method. My first question: is there a general way to enable maximum debug log level at runtime in rtk ? My second question, is more specific: is it normal that I see such error message coming from itk when using FDKConeBeamReconstructionFilter : ExceptionObject caught with fdk->Update() in file [...] itk::ExceptionObject (0x7f377c020cb0) Location: "unknown" File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx Line: 416 Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred during SingleMethodExecute /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): Cannot compute FFT of image with size [2048, 1024, 11]. VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose size in each dimension has a prime factorization consisting of only 2s, 3s, or 5s. I suppose that this error arise while performing ramp filtering, but I see no relation between FFT configuration stated in the error log ( [2048, 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 projections. I also tried with 200 projection and I had the same problem, but with [2048, 1024, 34] Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to the total number of projection in my dataset every time. The revision I am currently using: commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 Merge: 578cf89 09d820c Thank you in advance for your help. Regards Thibault Notargiacomo -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 14 12:58:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 14 Oct 2015 18:58:06 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Hi Thibault, No, there is not really a log system that would allow you debugging at run time. You can compile a debug version that would enable a lot of messages related to the pipeline. For this, I think you need to use NDEBUG at compilation (it's an ITK mechanism that I never use). No, it's not normal that you see an error message. There are two things: - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it only handles power of 2/3/5 dimensions and it's slow. I always advise people to use FFTW by turning on ITK_USE_FFTW options during ITK's compilation. - I don't fully understand why vnl doesn't work either. I understand the first two dimensions, for vnl (which I strongly suggest to not use), I pad to the next power of 2 so 780 * 2 (for zero padding) -> 2048 780 -> 1024 but then, if you use 64 projections, why 11? Are you sure the second input image to FDKConeBeamReconstructionImageFilter has the dimension you want? I would try to connect input 2 to an itk::ImageFileWriter and check what are the dimensions of this image. If you're absolutely sure, then I'll try to reproduce and fix the issue. Simon On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < gnthibault at gmail.com> wrote: > Dear all, > > I recently had troubles while trying to rewrite my code, linked with > libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite > well, to using fdk reconstruction method. > > My first question: is there a general way to enable maximum debug log > level at runtime in rtk ? > > My second question, is more specific: is it normal that I see such error > message coming from itk when using FDKConeBeamReconstructionFilter : > > ExceptionObject caught with fdk->Update() in file [...] > > itk::ExceptionObject (0x7f377c020cb0) > Location: "unknown" > File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx > Line: 416 > Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred > during SingleMethodExecute > > /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: > itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): > Cannot compute FFT of image with size [2048, 1024, 11]. > VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose > size in each dimension has a prime factorization consisting of only 2s, 3s, > or 5s. > > I suppose that this error arise while performing ramp filtering, but I see > no relation between FFT configuration stated in the error log ( [2048, > 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 > projections. > > I also tried with 200 projection and I had the same problem, but with > [2048, 1024, 34] > > Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to > the total number of projection in my dataset every time. > > The revision I am currently using: > commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 > Merge: 578cf89 09d820c > > > Thank you in advance for your help. > > Regards > > Thibault Notargiacomo > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scouser27 at gmail.com Wed Oct 14 16:27:48 2015 From: scouser27 at gmail.com (sco user) Date: Wed, 14 Oct 2015 21:27:48 +0100 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi I'm a new user to RTK. I've been able to perform reconstructions of the Catphan and my own copies of Varian CBCT images with some success. I enabled the CUDA flags when making RTK so as to take advantage of the capabilities of my GPU. When I use --hardware="cuda" with the rtkfdk application, I have found that I must specify the lowmem option in order to get the reconstruction to run successfully. If I don't use lowmem, I get the following error: #### Reconstructing and writing... /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ unknown : Cuda Error : out of memory ExceptionObject caught with writer->Update() in file /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 itk::ExceptionObject (0x18e3460) Location: "unknown" File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h Line: 55 Description: Cuda Error : out of memory #### I take from this that I'm out of memory on the GPU. Is that correct? The GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be in order to get a typical Varian reconstruction to run without the lowmem option. On a side note, I know that the cuda option is working because it's a lot quicker than hardware="cpu", despite only having 96 cuda cores. Another question I'd like to ask is if anyone can shed some light on useful values for I-zero, wpc, scatter etc. With thanks in advance, Dave. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Oct 15 03:09:05 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 15 Oct 2015 09:09:05 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Without the lowmem flag all projection images may be loaded into graphics memory at once causing an out-of-memory issues. You can also check this thread: http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html Regards, Chao 2015-10-14 22:27 GMT+02:00 sco user : > Hi > > I'm a new user to RTK. > I've been able to perform reconstructions of the Catphan and my own copies > of Varian CBCT images with some success. I enabled the CUDA flags when > making RTK so as to take advantage of the capabilities of my GPU. > > When I use --hardware="cuda" with the rtkfdk application, I have found > that I must specify the lowmem option in order to get the reconstruction to > run successfully. If I don't use lowmem, I get the following error: > > #### > Reconstructing and writing... > /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ > unknown : Cuda Error : out of memory > > ExceptionObject caught with writer->Update() in file > /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 > > itk::ExceptionObject (0x18e3460) > Location: "unknown" > File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h > Line: 55 > Description: Cuda Error : out of memory > #### > > I take from this that I'm out of memory on the GPU. Is that correct? The > GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be > in order to get a typical Varian reconstruction to run without the lowmem > option. > > On a side note, I know that the cuda option is working because it's a lot > quicker than hardware="cpu", despite only having 96 cuda cores. > > > Another question I'd like to ask is if anyone can shed some light on > useful values for I-zero, wpc, scatter etc. > > With thanks in advance, > Dave. > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Thu Oct 15 03:52:25 2015 From: itkhelpacc at gmail.com (vishal k) Date: Thu, 15 Oct 2015 13:22:25 +0530 Subject: [Rtk-users] Need some help with Projection of 3D CT data Message-ID: hi, Im working on a CT data set using ITK.. Im trying to come up with a registration algorithm for fluoroscopy image obtained from C-Arm taken at some angle wrt to the patient and the projection of CT data taken at the same angle as that of the C-arm.. i need to change the angles of projection and the focal length of the source from time to time for my study.. I was wondering if i could do that using RTK? If yes, could you tell me where I find information that is relevant to my problem..Thank you Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 15 05:11:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:11:00 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Regarding the parameters (I-zero, wpc, scatter etc), we still need to create wiki pages to describe this (as agreed on during the Jul 31 meeting ). In the meantime, you'll find some info in each filter documentation. You can go to the projection pre-processing filter , look at the (complex) clickable graph and try to navigate in it. For example, I0 is for the LUTbasedVariableI0RawToAttenuationImageFilter and (therefore), inapplicable to Varian data as is. I'll keep the mailing list posted when we add info to the wiki. Good luck, Simon On Thu, Oct 15, 2015 at 9:09 AM, Chao Wu wrote: > Hi Dave, > > Without the lowmem flag all projection images may be loaded into graphics > memory at once causing an out-of-memory issues. > You can also check this thread: > http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html > > Regards, > Chao > > 2015-10-14 22:27 GMT+02:00 sco user : > >> Hi >> >> I'm a new user to RTK. >> I've been able to perform reconstructions of the Catphan and my own >> copies of Varian CBCT images with some success. I enabled the CUDA flags >> when making RTK so as to take advantage of the capabilities of my GPU. >> >> When I use --hardware="cuda" with the rtkfdk application, I have found >> that I must specify the lowmem option in order to get the reconstruction to >> run successfully. If I don't use lowmem, I get the following error: >> >> #### >> Reconstructing and writing... >> /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ >> unknown : Cuda Error : out of memory >> >> ExceptionObject caught with writer->Update() in file >> /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 >> >> itk::ExceptionObject (0x18e3460) >> Location: "unknown" >> File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h >> Line: 55 >> Description: Cuda Error : out of memory >> #### >> >> I take from this that I'm out of memory on the GPU. Is that correct? The >> GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be >> in order to get a typical Varian reconstruction to run without the lowmem >> option. >> >> On a side note, I know that the cuda option is working because it's a lot >> quicker than hardware="cpu", despite only having 96 cuda cores. >> >> >> Another question I'd like to ask is if anyone can shed some light on >> useful values for I-zero, wpc, scatter etc. >> >> With thanks in advance, >> Dave. >> >> >> _______________________________________________ >> 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 Thu Oct 15 05:33:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:33:42 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Yes, RTK can certainly do things like that. Start with a simple geometry following the example Forward projection of the wiki and maybe come back to us with more precise questions? Good luck, Simon On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: > hi, > Im working on a CT data set using ITK.. Im trying to come up with a > registration algorithm for fluoroscopy image obtained from C-Arm taken at > some angle wrt to the patient and the projection of CT data taken at the > same angle as that of the C-arm.. i need to change the angles of projection > and the focal length of the source from time to time for my study.. I was > wondering if i could do that using RTK? If yes, could you tell me where I > find information that is relevant to my problem..Thank you > Regards > > _______________________________________________ > Rtk-users mailing 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 Oct 15 05:49:16 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:49:16 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Hi, Please stick to the mailing list. That's exactly what I understood and my previous answer is still valid. Simon On Thu, Oct 15, 2015 at 11:47 AM, vishal k wrote: > hi Simon, > Thanks for ur advice..sorry i couldn't explain it properly...here my > problem explained in detail.. I have to register 3D ct data with > Fluoroscopy image obtained during surgery.. the problem is that they use > different co-ordinate systems.. I thought since i can obtained the C arm > position using the DICOM tags (source to patient distance etc), i could use > these positions values to obtain forward projection of the CT data.. after > doing this I feel my registering the forward projection image and the > actual fluoroscopy image(obtained during the surgery) would be easier...Please > advice me if there is any better way to deal this problem.. > Regards > Vishal > > On Thu, Oct 15, 2015 at 3:03 PM, Simon Rit > wrote: > >> Yes, RTK can certainly do things like that. Start with a simple geometry >> following the example Forward projection >> of the >> wiki and maybe come back to us with more >> precise questions? >> Good luck, >> Simon >> >> On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: >> >>> hi, >>> Im working on a CT data set using ITK.. Im trying to come up with a >>> registration algorithm for fluoroscopy image obtained from C-Arm taken at >>> some angle wrt to the patient and the projection of CT data taken at the >>> same angle as that of the C-arm.. i need to change the angles of projection >>> and the focal length of the source from time to time for my study.. I was >>> wondering if i could do that using RTK? If yes, could you tell me where I >>> find information that is relevant to my problem..Thank you >>> Regards >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnthibault at gmail.com Thu Oct 15 07:55:17 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Thu, 15 Oct 2015 13:55:17 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Thank you very much Simon for this advice, I should have read more carefully the recent posts about FFTWF / FFTWD. Now that Itk has been rebuilt using these flags, I no longer experience the previous problem. Unfortunately, when reconstructing with the CPU version of FDK, it seems that, although Ramp filtering and backprojection now do work very well, I still have issues with the weighting filter of FDK. As I am not familiar with analytic reconstruction methods, I don't know if the geometric parameters that are generated by the import method of Reg23ProjectionGeometry are consistant with the high variability of the gain factor applied to my projection by FDKWeightProjectionFilter: Just a short example: When using the following geometric parameters: SrcToCenter -1045.84 SrcToDet -1261.02 srcOffX 6.56918 srcOffY 6.56918 ProjOffX -151.44 ProjOffY -151.44 => FDKWeighting filter outputs an image that has a mean of -1.518 with a standard deviation of 2.056 with minimum value of -6.130 and maximum value of 1.871 On a frame where the source offset seems to be a little bit lower, I have the following gemetric parameters: SrcToCenter -1042.66 SrcToDet -1257.4 srcOffX 1.25469 srcOffY 1.25469 ProjOffX -150.321 ProjOffY -150.321 => FDKWeighting filter outputs an image that has a mean of -4.279E-4 with a standard deviation of 5.786E-4 with minimum value of -0.005 and maximum value of 5.268E-4 For comparison, our attenuation images in input of FDK have a mean of 0.8 with a standard deviation of 1.09 with minimum value of -1 and maximum value of 3.262. Here the negative values of attenuation arise from a problem while approximating the I0 in our images, although we should work on that problem, it was not that critical in SART reconstruction. I am surprised by such an important difference in gain applied to projection, given that, when disabling manually this weighting filter in RTK code, RampFiltering and BackProjection alone provided visually good reconstruction results. If you have any idea of what could have gone wrong in the process of importing geometry and/or applying weighting filter, I would be glad to hear it. Thank you in advance. Kind regards Thibault Notargiacomo 2015-10-14 18:58 GMT+02:00 Simon Rit : > Hi Thibault, > No, there is not really a log system that would allow you debugging at run > time. You can compile a debug version that would enable a lot of messages > related to the pipeline. For this, I think you need to use NDEBUG at > compilation (it's an ITK mechanism that I never use). > No, it's not normal that you see an error message. There are two things: > - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it > only handles power of 2/3/5 dimensions and it's slow. I always advise > people to use FFTW by turning on ITK_USE_FFTW options during ITK's > compilation. > - I don't fully understand why vnl doesn't work either. I understand the > first two dimensions, for vnl (which I strongly suggest to not use), I pad > to the next power of 2 so > 780 * 2 (for zero padding) -> 2048 > 780 -> 1024 > but then, if you use 64 projections, why 11? Are you sure the second input > image to FDKConeBeamReconstructionImageFilter has the dimension you want? I > would try to connect input 2 to an itk::ImageFileWriter and check what are > the dimensions of this image. If you're absolutely sure, then I'll try to > reproduce and fix the issue. > Simon > > On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < > gnthibault at gmail.com> wrote: > >> Dear all, >> >> I recently had troubles while trying to rewrite my code, linked with >> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >> well, to using fdk reconstruction method. >> >> My first question: is there a general way to enable maximum debug log >> level at runtime in rtk ? >> >> My second question, is more specific: is it normal that I see such error >> message coming from itk when using FDKConeBeamReconstructionFilter : >> >> ExceptionObject caught with fdk->Update() in file [...] >> >> itk::ExceptionObject (0x7f377c020cb0) >> Location: "unknown" >> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >> Line: 416 >> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >> during SingleMethodExecute >> >> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >> Cannot compute FFT of image with size [2048, 1024, 11]. >> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >> size in each dimension has a prime factorization consisting of only 2s, 3s, >> or 5s. >> >> I suppose that this error arise while performing ramp filtering, but I >> see no relation between FFT configuration stated in the error log ( [2048, >> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >> projections. >> >> I also tried with 200 projection and I had the same problem, but with >> [2048, 1024, 34] >> >> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >> to the total number of projection in my dataset every time. >> >> The revision I am currently using: >> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >> Merge: 578cf89 09d820c >> >> >> Thank you in advance for your help. >> >> Regards >> >> Thibault Notargiacomo >> >> _______________________________________________ >> Rtk-users mailing 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 Oct 15 10:50:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 16:50:30 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Interesting... I never used a geometry with negative sdd and sid but that's the issue here in my opinion. I did a quick test with positive and negative sdd/sid and that does not work for me either. Can you make them positive somehow? BTW, do you still use a modified version of the reg23 and can you share it? Thanks, Simon PS: the script I used for the test: rtksimulatedgeometry \ -o g \ -n 360 \ --sdd 1500 \ --sid 1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o pos.mha -g g rtksimulatedgeometry \ -o g \ -n 360 \ --sdd -1500 \ --sid -1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o neg.mha -g g On Thu, Oct 15, 2015 at 1:55 PM, Notargiacomo Thibault wrote: > Thank you very much Simon for this advice, I should have read more > carefully the recent posts about FFTWF / FFTWD. > > Now that Itk has been rebuilt using these flags, I no longer experience > the previous problem. > Unfortunately, when reconstructing with the CPU version of FDK, it seems > that, although Ramp filtering and backprojection now do work very well, I > still have issues with the weighting filter of FDK. > > As I am not familiar with analytic reconstruction methods, I don't know if > the geometric parameters that are generated by the import method of > Reg23ProjectionGeometry are consistant with the high variability of the > gain factor applied to my projection by FDKWeightProjectionFilter: > > Just a short example: > When using the following geometric parameters: > > SrcToCenter -1045.84 > SrcToDet -1261.02 > srcOffX 6.56918 > srcOffY 6.56918 > ProjOffX -151.44 > ProjOffY -151.44 > > => FDKWeighting filter outputs an image that has a mean of -1.518 with a > standard deviation of 2.056 with minimum value of -6.130 and maximum > value of 1.871 > > > On a frame where the source offset seems to be a little bit lower, I have > the following gemetric parameters: > > SrcToCenter -1042.66 > SrcToDet -1257.4 > srcOffX 1.25469 > srcOffY 1.25469 > ProjOffX -150.321 > ProjOffY -150.321 > > => FDKWeighting filter outputs an image that has a mean of -4.279E-4 > with a standard deviation of 5.786E-4 with minimum value of -0.005 and > maximum value of 5.268E-4 > > For comparison, our attenuation images in input of FDK have a mean of 0.8 > with a standard deviation of 1.09 with minimum value of -1 and maximum > value of 3.262. > > Here the negative values of attenuation arise from a problem while > approximating the I0 in our images, although we should work on that > problem, it was not that critical in SART reconstruction. > > I am surprised by such an important difference in gain applied to > projection, given that, when disabling manually this weighting filter in > RTK code, RampFiltering and BackProjection alone provided visually good > reconstruction results. > > If you have any idea of what could have gone wrong in the process of > importing geometry and/or applying weighting filter, I would be glad to > hear it. > > Thank you in advance. > > Kind regards > > Thibault Notargiacomo > > > > > > > > > 2015-10-14 18:58 GMT+02:00 Simon Rit : > >> Hi Thibault, >> No, there is not really a log system that would allow you debugging at >> run time. You can compile a debug version that would enable a lot of >> messages related to the pipeline. For this, I think you need to use NDEBUG >> at compilation (it's an ITK mechanism that I never use). >> No, it's not normal that you see an error message. There are two things: >> - the FFT of itk (compiled by default, based on vnl) is really bad IMO: >> it only handles power of 2/3/5 dimensions and it's slow. I always advise >> people to use FFTW by turning on ITK_USE_FFTW options during ITK's >> compilation. >> - I don't fully understand why vnl doesn't work either. I understand the >> first two dimensions, for vnl (which I strongly suggest to not use), I pad >> to the next power of 2 so >> 780 * 2 (for zero padding) -> 2048 >> 780 -> 1024 >> but then, if you use 64 projections, why 11? Are you sure the second >> input image to FDKConeBeamReconstructionImageFilter has the dimension you >> want? I would try to connect input 2 to an itk::ImageFileWriter and check >> what are the dimensions of this image. If you're absolutely sure, then I'll >> try to reproduce and fix the issue. >> Simon >> >> On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < >> gnthibault at gmail.com> wrote: >> >>> Dear all, >>> >>> I recently had troubles while trying to rewrite my code, linked with >>> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >>> well, to using fdk reconstruction method. >>> >>> My first question: is there a general way to enable maximum debug log >>> level at runtime in rtk ? >>> >>> My second question, is more specific: is it normal that I see such error >>> message coming from itk when using FDKConeBeamReconstructionFilter : >>> >>> ExceptionObject caught with fdk->Update() in file [...] >>> >>> itk::ExceptionObject (0x7f377c020cb0) >>> Location: "unknown" >>> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >>> Line: 416 >>> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >>> during SingleMethodExecute >>> >>> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >>> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >>> Cannot compute FFT of image with size [2048, 1024, 11]. >>> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >>> size in each dimension has a prime factorization consisting of only 2s, 3s, >>> or 5s. >>> >>> I suppose that this error arise while performing ramp filtering, but I >>> see no relation between FFT configuration stated in the error log ( [2048, >>> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >>> projections. >>> >>> I also tried with 200 projection and I had the same problem, but with >>> [2048, 1024, 34] >>> >>> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >>> to the total number of projection in my dataset every time. >>> >>> The revision I am currently using: >>> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >>> Merge: 578cf89 09d820c >>> >>> >>> Thank you in advance for your help. >>> >>> Regards >>> >>> Thibault Notargiacomo >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 03:12:36 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 09:12:36 +0200 Subject: [Rtk-users] Question about the geometry Message-ID: Dear all. Hello again. I writing to you again because I need some help to understand how to declare the geometry of the system. Cyril redirected me towards this document ( http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a lot, but unfortunately it has not been enough to make me reconstruct a tomogram. I have attached a drawing of my setup (setup.jpg). The source-to-detector distance is around 1600 mm. I just rotate the sample instead of the source, and the sample-detector distance is 15 cm which makes the isocenter distance 1450. The field of view is around 2 cm. The aligned projections are located here: https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 and the raw tiffs are here: https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 I would say the input data looks as nice, but when reconstructing I'm still just getting noise: This is how I perform my "reconstruction" # 361 projections from 0 to 360 degrees. The source-detector distance is 1.6 m and the # sample-detector distance is 15 cm # I have tried with many variations of --ssd and --sid but I think they all look the same rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o c:\Work\out_dir\geometry_real.xml # make a mha file out of the tiff files rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output c:\Work\out_dir\cylinder-a.mha --regexp .tif # "Reconstruct" the data. rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 The result can be viewed in the recon_result.PNG attachment. The reconstrcution can be found here: https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 Can someone please help me what I am doing wrong? best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: setup.jpg Type: image/jpeg Size: 29527 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: recon_result.PNG Type: image/png Size: 239196 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 06:09:04 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 12:09:04 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Is the origin and spacing of your projection data correct? What is your projection pixel size? Regards, Chao 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger : > Dear all. Hello again. > > I writing to you again because I need some help to understand how to > declare the geometry of the system. > > Cyril redirected me towards this document ( > http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > lot, but unfortunately it has not been enough to make me reconstruct a > tomogram. > > I have attached a drawing of my setup (setup.jpg). The > source-to-detector distance is around 1600 mm. I just rotate the > sample instead of the source, and the sample-detector distance is 15 > cm which makes the isocenter distance 1450. The field of view is > around 2 cm. > > The aligned projections are located here: > https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > and the raw tiffs are here: > https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > > I would say the input data looks as nice, but when reconstructing I'm > still just getting noise: > > This is how I perform my "reconstruction" > > # 361 projections from 0 to 360 degrees. The source-detector distance > is 1.6 m and the > # sample-detector distance is 15 cm > # I have tried with many variations of --ssd and --sid but I think > they all look the same > rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > c:\Work\out_dir\geometry_real.xml > > # make a mha file out of the tiff files > rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > c:\Work\out_dir\cylinder-a.mha --regexp .tif > > # "Reconstruct" the data. > rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha -g > c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > > The result can be viewed in the recon_result.PNG attachment. > The reconstrcution can be found here: > https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > > Can someone please help me what I am doing wrong? > > best > > Arvid > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 07:15:25 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 13:15:25 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao. Thank you for the reply. However, I'm not quite sure what you mean by origin and spacing. A pixel on the detector is ~200 microns, and the sample is magnified around 1.3 times. I do understand that having a correct geometry is important to get an output image with correct dimensions, but I do not understand it's so difficult for me to make a single successful reconstruction (possibly with a dummy geometry). best Arvid PS: Just to validate the data I'm testing on I installed Octave and created a sinogram I then ran through its iradon implementation. It seemed to work quite nicely (see attachments). On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > Hi Arvid, > > Is the origin and spacing of your projection data correct? What is your > projection pixel size? > > Regards, Chao > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > : >> >> Dear all. Hello again. >> >> I writing to you again because I need some help to understand how to >> declare the geometry of the system. >> >> Cyril redirected me towards this document ( >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> lot, but unfortunately it has not been enough to make me reconstruct a >> tomogram. >> >> I have attached a drawing of my setup (setup.jpg). The >> source-to-detector distance is around 1600 mm. I just rotate the >> sample instead of the source, and the sample-detector distance is 15 >> cm which makes the isocenter distance 1450. The field of view is >> around 2 cm. >> >> The aligned projections are located here: >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> and the raw tiffs are here: >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> I would say the input data looks as nice, but when reconstructing I'm >> still just getting noise: >> >> This is how I perform my "reconstruction" >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> is 1.6 m and the >> # sample-detector distance is 15 cm >> # I have tried with many variations of --ssd and --sid but I think >> they all look the same >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> c:\Work\out_dir\geometry_real.xml >> >> # make a mha file out of the tiff files >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> # "Reconstruct" the data. >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> The result can be viewed in the recon_result.PNG attachment. >> The reconstrcution can be found here: >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> Can someone please help me what I am doing wrong? >> >> best >> >> Arvid >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: Capture.JPG Type: image/jpeg Size: 58155 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 08:03:16 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 14:03:16 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Since you know how important a correct geometry is, you should understand why you need projection origin and spacing. CT geometry has more parameters than sid and sdd. How big the detector pixel size (spacing) and how the detector is places w.r.t. the central ray (origin) also play a role in the geometry. And in-plane/out-of-plane rotations etc. In your dataset the correct spacing and origin information is not stored correctly in the projection data, so the total geometry is wrong. I have tested your data with the following command line and it gives meaningful image. The newspacing and neworigin arguments force rtkfdk to accept spacing and origin information of projections from command line instead of from the data. Also I change the spacing of the volume from 2 to 0.2 because your object is small. rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 Apparently there is still some misalignment between this guessed geometry and the real geometry, which you need to figure out with your own hardware. Regards, Chao 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Hi Chao. > > Thank you for the reply. However, I'm not quite sure what you mean by > origin and spacing. > A pixel on the detector is ~200 microns, and the sample is magnified > around 1.3 times. > > I do understand that having a correct geometry is important to get an > output image with correct dimensions, but I do not understand it's so > difficult for me to make a single successful reconstruction (possibly > with a dummy geometry). > > best > > Arvid > > PS: Just to validate the data I'm testing on I installed Octave and > created a sinogram I then ran through its iradon implementation. It > seemed to work quite nicely (see attachments). > > On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > > Hi Arvid, > > > > Is the origin and spacing of your projection data correct? What is your > > projection pixel size? > > > > Regards, Chao > > > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Dear all. Hello again. > >> > >> I writing to you again because I need some help to understand how to > >> declare the geometry of the system. > >> > >> Cyril redirected me towards this document ( > >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> lot, but unfortunately it has not been enough to make me reconstruct a > >> tomogram. > >> > >> I have attached a drawing of my setup (setup.jpg). The > >> source-to-detector distance is around 1600 mm. I just rotate the > >> sample instead of the source, and the sample-detector distance is 15 > >> cm which makes the isocenter distance 1450. The field of view is > >> around 2 cm. > >> > >> The aligned projections are located here: > >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> and the raw tiffs are here: > >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> > >> I would say the input data looks as nice, but when reconstructing I'm > >> still just getting noise: > >> > >> This is how I perform my "reconstruction" > >> > >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> is 1.6 m and the > >> # sample-detector distance is 15 cm > >> # I have tried with many variations of --ssd and --sid but I think > >> they all look the same > >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> c:\Work\out_dir\geometry_real.xml > >> > >> # make a mha file out of the tiff files > >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> > >> # "Reconstruct" the data. > >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> > >> The result can be viewed in the recon_result.PNG attachment. > >> The reconstrcution can be found here: > >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> > >> Can someone please help me what I am doing wrong? > >> > >> best > >> > >> Arvid > >> > >> _______________________________________________ > >> Rtk-users mailing 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 Fri Oct 16 08:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 16 Oct 2015 14:15:43 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Thanks a lot Chao, I'm so glad that someone else than me did this! Just as a side note, Arvid, if you don't understand what is the origin and the spacing, look at the ITK software guide section 4.1.4, this is VERY important. Simon On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > Hi Arvid, > > Since you know how important a correct geometry is, you should understand > why you need projection origin and spacing. > CT geometry has more parameters than sid and sdd. How big the detector > pixel size (spacing) and how the detector is places w.r.t. the central ray > (origin) also play a role in the geometry. And in-plane/out-of-plane > rotations etc. > In your dataset the correct spacing and origin information is not stored > correctly in the projection data, so the total geometry is wrong. > > I have tested your data with the following command line and it gives > meaningful image. The newspacing and neworigin arguments force rtkfdk to > accept spacing and origin information of projections from command line > instead of from the data. Also I change the spacing of the volume from 2 to > 0.2 because your object is small. > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha > -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 > --newspacing=0.2 --neworigin=-20,-20 > > Apparently there is still some misalignment between this guessed geometry > and the real geometry, which you need to figure out with your own hardware. > > Regards, > Chao > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < > bottiger at gmail.com>: > >> Hi Chao. >> >> Thank you for the reply. However, I'm not quite sure what you mean by >> origin and spacing. >> A pixel on the detector is ~200 microns, and the sample is magnified >> around 1.3 times. >> >> I do understand that having a correct geometry is important to get an >> output image with correct dimensions, but I do not understand it's so >> difficult for me to make a single successful reconstruction (possibly >> with a dummy geometry). >> >> best >> >> Arvid >> >> PS: Just to validate the data I'm testing on I installed Octave and >> created a sinogram I then ran through its iradon implementation. It >> seemed to work quite nicely (see attachments). >> >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >> > Hi Arvid, >> > >> > Is the origin and spacing of your projection data correct? What is your >> > projection pixel size? >> > >> > Regards, Chao >> > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> > : >> >> >> >> Dear all. Hello again. >> >> >> >> I writing to you again because I need some help to understand how to >> >> declare the geometry of the system. >> >> >> >> Cyril redirected me towards this document ( >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> >> lot, but unfortunately it has not been enough to make me reconstruct a >> >> tomogram. >> >> >> >> I have attached a drawing of my setup (setup.jpg). The >> >> source-to-detector distance is around 1600 mm. I just rotate the >> >> sample instead of the source, and the sample-detector distance is 15 >> >> cm which makes the isocenter distance 1450. The field of view is >> >> around 2 cm. >> >> >> >> The aligned projections are located here: >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> >> and the raw tiffs are here: >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> >> >> I would say the input data looks as nice, but when reconstructing I'm >> >> still just getting noise: >> >> >> >> This is how I perform my "reconstruction" >> >> >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> >> is 1.6 m and the >> >> # sample-detector distance is 15 cm >> >> # I have tried with many variations of --ssd and --sid but I think >> >> they all look the same >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> >> c:\Work\out_dir\geometry_real.xml >> >> >> >> # make a mha file out of the tiff files >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> >> >> # "Reconstruct" the data. >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> >> c:\Work\out_dir\cylinder_a_recon.mha -g >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> >> >> The result can be viewed in the recon_result.PNG attachment. >> >> The reconstrcution can be found here: >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> >> >> Can someone please help me what I am doing wrong? >> >> >> >> best >> >> >> >> Arvid >> >> >> >> _______________________________________________ >> >> 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 bottiger at gmail.com Fri Oct 16 08:33:38 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 14:33:38 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao Wu Thank you very much! This is definitely something I can use in order to move forward. I'm not trying to make the best possible reconstruction out of this dataset, but just have something that works so I can start playing around and get familiar with RTK. Which I do have now. And to Simon: Thanks for the link. bets Arvid On Fri, Oct 16, 2015 at 2:15 PM, Simon Rit wrote: > Thanks a lot Chao, I'm so glad that someone else than me did this! > Just as a side note, Arvid, if you don't understand what is the origin and > the spacing, look at the ITK software guide section 4.1.4, this is VERY > important. > Simon > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: >> >> Hi Arvid, >> >> Since you know how important a correct geometry is, you should understand >> why you need projection origin and spacing. >> CT geometry has more parameters than sid and sdd. How big the detector >> pixel size (spacing) and how the detector is places w.r.t. the central ray >> (origin) also play a role in the geometry. And in-plane/out-of-plane >> rotations etc. >> In your dataset the correct spacing and origin information is not stored >> correctly in the projection data, so the total geometry is wrong. >> >> I have tested your data with the following command line and it gives >> meaningful image. The newspacing and neworigin arguments force rtkfdk to >> accept spacing and origin information of projections from command line >> instead of from the data. Also I change the spacing of the volume from 2 to >> 0.2 because your object is small. >> >> rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml >> --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 >> >> Apparently there is still some misalignment between this guessed geometry >> and the real geometry, which you need to figure out with your own hardware. >> >> Regards, >> Chao >> >> >> 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> : >>> >>> Hi Chao. >>> >>> Thank you for the reply. However, I'm not quite sure what you mean by >>> origin and spacing. >>> A pixel on the detector is ~200 microns, and the sample is magnified >>> around 1.3 times. >>> >>> I do understand that having a correct geometry is important to get an >>> output image with correct dimensions, but I do not understand it's so >>> difficult for me to make a single successful reconstruction (possibly >>> with a dummy geometry). >>> >>> best >>> >>> Arvid >>> >>> PS: Just to validate the data I'm testing on I installed Octave and >>> created a sinogram I then ran through its iradon implementation. It >>> seemed to work quite nicely (see attachments). >>> >>> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >>> > Hi Arvid, >>> > >>> > Is the origin and spacing of your projection data correct? What is your >>> > projection pixel size? >>> > >>> > Regards, Chao >>> > >>> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >>> > : >>> >> >>> >> Dear all. Hello again. >>> >> >>> >> I writing to you again because I need some help to understand how to >>> >> declare the geometry of the system. >>> >> >>> >> Cyril redirected me towards this document ( >>> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >>> >> lot, but unfortunately it has not been enough to make me reconstruct a >>> >> tomogram. >>> >> >>> >> I have attached a drawing of my setup (setup.jpg). The >>> >> source-to-detector distance is around 1600 mm. I just rotate the >>> >> sample instead of the source, and the sample-detector distance is 15 >>> >> cm which makes the isocenter distance 1450. The field of view is >>> >> around 2 cm. >>> >> >>> >> The aligned projections are located here: >>> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >>> >> and the raw tiffs are here: >>> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >>> >> >>> >> I would say the input data looks as nice, but when reconstructing I'm >>> >> still just getting noise: >>> >> >>> >> This is how I perform my "reconstruction" >>> >> >>> >> # 361 projections from 0 to 360 degrees. The source-detector distance >>> >> is 1.6 m and the >>> >> # sample-detector distance is 15 cm >>> >> # I have tried with many variations of --ssd and --sid but I think >>> >> they all look the same >>> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >>> >> c:\Work\out_dir\geometry_real.xml >>> >> >>> >> # make a mha file out of the tiff files >>> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >>> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >>> >> >>> >> # "Reconstruct" the data. >>> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >>> >> c:\Work\out_dir\cylinder_a_recon.mha -g >>> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >>> >> >>> >> The result can be viewed in the recon_result.PNG attachment. >>> >> The reconstrcution can be found here: >>> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >>> >> >>> >> Can someone please help me what I am doing wrong? >>> >> >>> >> best >>> >> >>> >> Arvid >>> >> >>> >> _______________________________________________ >>> >> 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 simon.rit at creatis.insa-lyon.fr Tue Oct 20 14:38:24 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 20 Oct 2015 20:38:24 +0200 Subject: [Rtk-users] using RTK with projection matrices and projection images In-Reply-To: References: Message-ID: Dear Shiras Abdurahman, It's better to email the mailing so that everybody can participate our discussion. We developped a tool to do this a while ago but it's never made it to the public repo. I have enclosed it if you want to have a look but it does what you want I think. The part of interest for you is how the variable matProj is converted to an RTK geometry. We'll try to clean it and push it to the main repo in November if you can't figure out how to use it. Good luck! Simon On Tue, Oct 20, 2015 at 5:07 PM, shiras abdurahman < shiras.abdurahman at gmail.com> wrote: > Dear Dr. Rit, > > My name is Shiras Abdurahman and I am a PhD student at ovgu Magdeburg, > Germany. Currently, I am working in tomographic reconstruction and I > started to using RTK. I have projection images and corresponding projection > matrices. I want to reconstruct volume with RTK. Is it possible to set > projection matrices directly and reconstruct the volume. Or do I need to > decompose first and get intrinsic and extrinsic parameters especially > rotation angles and use addProjection function? > I know that geometry can be read from xml file. > > Thank you for your time and patience. > > With regards, > Shiras Abdurahman > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rtkthales.cxx Type: text/x-c++src Size: 9360 bytes Desc: not available URL: From wuchao04 at gmail.com Mon Oct 26 16:30:58 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 26 Oct 2015 21:30:58 +0100 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Well, that's just some guess. I assume the central ray goes towards the center of your detector, so the origin should be denoted as somewhere near (- half_width, - half_height) in millimeter. Then I just fine-tune it manually a little bit to get a little bit better results... Regards, Chao 2015-10-26 19:44 GMT+01:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Dear Chao. > > I am very thankful for the help you provided me some days ago on the > RTK mailing list. However, I have a quick followup question for you, > which I have not been able to learn by reading the (very long) manual > another user provided me with. > > I am now working on another dataset, and get similar artifact when > reconstructing. Could you please help understand why you picked the > parameters you did? I guess the "spacing" is pixel size, but why did > why you pick "neworigin" to be -20,-20 ? > > best > > Arvid > > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > > Hi Arvid, > > > > Since you know how important a correct geometry is, you should understand > > why you need projection origin and spacing. > > CT geometry has more parameters than sid and sdd. How big the detector > pixel > > size (spacing) and how the detector is places w.r.t. the central ray > > (origin) also play a role in the geometry. And in-plane/out-of-plane > > rotations etc. > > In your dataset the correct spacing and origin information is not stored > > correctly in the projection data, so the total geometry is wrong. > > > > I have tested your data with the following command line and it gives > > meaningful image. The newspacing and neworigin arguments force rtkfdk to > > accept spacing and origin information of projections from command line > > instead of from the data. Also I change the spacing of the volume from 2 > to > > 0.2 because your object is small. > > > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > > c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml > > --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 > > > > Apparently there is still some misalignment between this guessed geometry > > and the real geometry, which you need to figure out with your own > hardware. > > > > Regards, > > Chao > > > > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Hi Chao. > >> > >> Thank you for the reply. However, I'm not quite sure what you mean by > >> origin and spacing. > >> A pixel on the detector is ~200 microns, and the sample is magnified > >> around 1.3 times. > >> > >> I do understand that having a correct geometry is important to get an > >> output image with correct dimensions, but I do not understand it's so > >> difficult for me to make a single successful reconstruction (possibly > >> with a dummy geometry). > >> > >> best > >> > >> Arvid > >> > >> PS: Just to validate the data I'm testing on I installed Octave and > >> created a sinogram I then ran through its iradon implementation. It > >> seemed to work quite nicely (see attachments). > >> > >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > >> > Hi Arvid, > >> > > >> > Is the origin and spacing of your projection data correct? What is > your > >> > projection pixel size? > >> > > >> > Regards, Chao > >> > > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > >> > : > >> >> > >> >> Dear all. Hello again. > >> >> > >> >> I writing to you again because I need some help to understand how to > >> >> declare the geometry of the system. > >> >> > >> >> Cyril redirected me towards this document ( > >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> >> lot, but unfortunately it has not been enough to make me reconstruct > a > >> >> tomogram. > >> >> > >> >> I have attached a drawing of my setup (setup.jpg). The > >> >> source-to-detector distance is around 1600 mm. I just rotate the > >> >> sample instead of the source, and the sample-detector distance is 15 > >> >> cm which makes the isocenter distance 1450. The field of view is > >> >> around 2 cm. > >> >> > >> >> The aligned projections are located here: > >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> >> and the raw tiffs are here: > >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> >> > >> >> I would say the input data looks as nice, but when reconstructing I'm > >> >> still just getting noise: > >> >> > >> >> This is how I perform my "reconstruction" > >> >> > >> >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> >> is 1.6 m and the > >> >> # sample-detector distance is 15 cm > >> >> # I have tried with many variations of --ssd and --sid but I think > >> >> they all look the same > >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> >> c:\Work\out_dir\geometry_real.xml > >> >> > >> >> # make a mha file out of the tiff files > >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> >> > >> >> # "Reconstruct" the data. > >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> >> > >> >> The result can be viewed in the recon_result.PNG attachment. > >> >> The reconstrcution can be found here: > >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> >> > >> >> Can someone please help me what I am doing wrong? > >> >> > >> >> best > >> >> > >> >> Arvid > >> >> > >> >> _______________________________________________ > >> >> Rtk-users mailing 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 Wed Oct 28 11:47:13 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Wed, 28 Oct 2015 16:47:13 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter Message-ID: <5630EE01.5070900@cppm.in2p3.fr> Hello everyone, I have a question/suggestion about the set of rtkDraw*ImageFilter. This filter are written as additive filters: for example, in rtkDrawEllipsoidImageFilter.txx, we can find for(..) itOut.Set( ellipsoid.density + itIn.Get() ) instead of for(..) itOut.Set( ellipsoid.density ) I think it can be more flexible the second option, because we can always associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. Moreover, the rtkDrawGeometricPhantomImageFilter class already uses itkAddImageFilter in order to have additive filters (which is redundant in current situation). What do you think ? Regards From shiraska at gmail.com Wed Oct 28 13:12:36 2015 From: shiraska at gmail.com (Shiras Abdurahman) Date: Wed, 28 Oct 2015 18:12:36 +0100 Subject: [Rtk-users] Filtered projection images Message-ID: Hi, I want to access processed projections especially filtered projections which are used for backprojection. Is it possible in RTK? Shiras -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 28 15:52:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:52:10 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: <5630EE01.5070900@cppm.in2p3.fr> References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: Hi Mathieu, Thanks for pointing this out. I agree that it might not be the best solution, yet one could argue that you could simply create a constant image with 0 to do what you'd like from the current implementation. My main problem is that I just tried to do what you suggest and some tests then fail... which shows the obvious, it's not a backward compatible change. I see two solutions: - keep it as is and you use ConstantImageFilter + we remove useless add filters, - a more complex but maybe more elegant solution: add a third template parameter for the operation that would allow the user to do what he'd like in a functor. That's what's done with filters that derive from itk::UnaryImageFilter . The default would be itk::Add2 but we could find or implement another one that simply discards the pixel value. What do you think? Simon PS: looking in the code, I just found that rtk::DrawConeImageFilter is not consistent with the others, it was always setting to 0 outside... that's been fixed! On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont wrote: > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. This > filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can always > associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is redundant in > current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > Rtk-users mailing 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 Oct 28 15:53:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:53:25 +0100 Subject: [Rtk-users] Filtered projection images In-Reply-To: References: Message-ID: Hi, I guess you mean filtered projections that are used in filtered backprojections algorithm? The filter you are looking for is rtk::FFTRampImageFilter which implements the ramp filter. There is a command line tool that can do it, rtkramp. Regards, Simon On Wed, Oct 28, 2015 at 6:12 PM, Shiras Abdurahman wrote: > Hi, > > I want to access processed projections especially filtered projections > which are used for backprojection. Is it possible in RTK? > > Shiras > > _______________________________________________ > Rtk-users mailing 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 Fri Oct 30 06:56:50 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Fri, 30 Oct 2015 11:56:50 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: <56334CF2.8070902@cppm.in2p3.fr> Hi, In case of your first solution, you can not chain several Draw*ImageFilters. For example, if you want to create small cylinders in a big cylinder. Your second solution is better. One another solution can be a thing like itk:SpatialObject but more simpler. An rtk::SpatialObject which one function (isInside(point)). We create a rtkDrawImageFilter class and implement ThreadedGenerateData like this : DrawImageFilter::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType itkNotUsed(threadId) { ... while( !itOut.IsAtEnd() ) { this->GetInput()->TransformIndexToPhysicalPoint(itOut.GetIndex(), point); if(m_rtkSpatialObject.isInside(point) itOut.Set(m_rtkFillFunctor(density, itIn.Get()); ... } DrawConeImageFilter class can be a child of this new DrawImageFilter (with new methods like setAngle, SetRadius which will adjust the rtkConeSpatialObject) This solution suppress duplicated code in Draw*ImageFilter::ThreadedGenerateData and makes easier implementation of another type of filling. On 28/10/2015 20:52, Simon Rit wrote: > Hi Mathieu, > Thanks for pointing this out. I agree that it might not be the best > solution, yet one could argue that you could simply create a constant > image with 0 to do what you'd like from the current implementation. My > main problem is that I just tried to do what you suggest and some tests > then fail... which shows the obvious, it's not a backward compatible change. > I see two solutions: > - keep it as is and you use ConstantImageFilter + we remove useless add > filters, > - a more complex but maybe more elegant solution: add a third template > parameter for the operation that would allow the user to do what he'd > like in a functor. That's what's done with filters that derive from > itk::UnaryImageFilter > . > The default would be itk::Add2 but we could find or implement another > one that simply discards the pixel value. > What do you think? > Simon > > PS: looking in the code, I just found that rtk::DrawConeImageFilter is > not consistent with the others, it was always setting to 0 outside... > that's been fixed! > > On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont > wrote: > > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. > This filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can > always associate Draw*ImageFilter and itkAddImageFilter to get an > additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is > redundant in current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > 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 Oct 1 02:18:53 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 08:18:53 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng wrote: > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: From cyril.mory at uclouvain.be Thu Oct 1 04:02:23 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Thu, 01 Oct 2015 10:02:23 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> Message-ID: <560CE88F.5030807@uclouvain.be> Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I'm using windows system (windows7 64 with VS 2013) and > I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with "ITK + FFTW" in > windows system? > > I'm just trying to use *rtkextractshroudsignal* and it seems to > require FFTW library externally. > > When I tried to use FFTW 3.3.4, I've encountered link errors as shown > below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > I'm running on Ubuntu 14.04 LTS and used the distribution library > (FFTW 3.3.3). If you're running on a Debian-based linux system, you > can also install the full development library set using the following > command: */sudo apt-get install libfftw3-3 libfftw3-dev/*. Then just > make sure that these libraries are being used by rerunning CCMake. > > I'm not quite sure about the error being thrown in your build, but > perhaps one of the main developers would be able to provide some more > insight into the issue. > > Hope this helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK > with those options on as you suggested. > > I've tried to use the up-to-date version of FFTW (3.3.4), but it > seems that it doesn't work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved external > symbol __imp_fftw_execute referenced in function "protected: > virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully using in > which system(Windows or Linux)? > > Thanks. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 6:56 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the inclusion of the > Fast Fourier Transform components. This requires compilation with > the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn't compile that way > initially, and it took a little bit of time to figure out. > > Hope that helps, > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I'm now compiling itk-4.8 to use that feature since I've found > my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:*Friday, September 18, 2015 4:31 PM > *To:*Yang K Park > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success since my > initial posting -- in fact I'm currently working on a new > method for accomplishing this task in certain challenging cases. > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase > signal output when called using the '-p' flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA/* > > From what I've experienced, this generally provides a good > signal [0,1) characterizing the respiratory phase using the > default settings. Occasionally, I've run into issues where > the default 'unsharpness' parameter needs to be adjusted to > give a clear signal (by appending the*--unsharp ##*flag to the > command). On more challenging shroud images -- notably, those > with little detectable signal from background -- additional > contrast-enhancement by pre-processing of the shroud has > assisted in signal extraction. > > I hope that helps -- and please let me know how it works out > for you. > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email:riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I've encountered exactly same issue and it would > be highly appreciated if you can share with me your > updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:*Rtk-users > [mailto:rtk-users-bounces at public.kitware.com]*On Behalf > Of*Joel Beaudry > *Sent:*Tuesday, March 17, 2015 5:25 PM > *To:*Matthew J. Riblett > > *Cc:*rtk-users at public.kitware.com > > *Subject:*Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but > I've had good success with using a Hilbert function in > python (scipy). I'm sure that Matlab has an equivalent > function, and maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett > > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a straightforward method > of going from the results of the rtkamsterdamshroud > and rtkextractshroudsignal applications to a [0,1) > phase signal for performing motion-compensated > reconstruction. I've been following along with the > MC-CBCT Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is used to > process the should signal prior to feeding it back > into the reconstruction application, but there is no > mention of how this is accomplished. I'm trying to > implement this into an automated workflow and I'd love > to know how this was accomplished. > > Thanks! > > --- Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > _______________________________________________ > 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 WEICHENG.SHEN at leidos.com Thu Oct 1 10:57:56 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Thu, 1 Oct 2015 14:57:56 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: image004.png Type: image/png Size: 15591 bytes Desc: image004.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 15591 bytes Desc: image001.png URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 1 11:23:48 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 1 Oct 2015 17:23:48 +0200 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng wrote: > Hello Simon, > > > > Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside > RTK, the following error message appears: > > > > > ================================================================================================ > > > > CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): > By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project > has asked CMake to find a package configuration file provided by > "Gengetopt", but CMake did not find one. > > Could not find a package configuration file provided by "Gengetopt" with > any of the following names: > > GengetoptConfig.cmake > gengetopt-config.cmake > > Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set > "Gengetopt_DIR" to a directory containing one of the above files. If > "Gengetopt" provides a separate development package or SDK, be sure it has > been installed. > > > > > ================================================================================================ > > > > It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake > or gengetopt-config.cmake. I did a manual search for these files in the RTK > directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH > in the cmake GUI when performing configuration. The value of > CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln > file can now be successfully generated. > > > > Next I need to build the project using Visual Studio 2013. > > > > Thanks you very much for your help! > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Thursday, October 01, 2015 2:19 AM > *To:* Shen, Weicheng > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Unknown CMake command "WRAP_GGO" > > > > Hi, > > WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use > WRAP_GGO in an external project you need to do the same as in > applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the > easiest, to start with, is to build the rtktutorialapplication in the RTK > project. > > Let us know if that answered your problem, > > Simon > > > > On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: > > I am a new user of the RTK. The first thing I did is to build the RTK > 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the > RTK is successfully built, I attempted to build a sample application > rtkMyApp following the instructions given at the > rtktutorialapplication.cxx. rtkMyApp is really a copy of the > rtktutorialapplication. Necessary changes are made according to the > instructions in rtktutorialapplication.cxx > > > > However, when I use the CMake to build rtkMyApp, the following error > appears in the ?configure? phase: > > CMake Error at CMakeLists.txt:1 (WRAP_GGO): > Unknown CMake command "WRAP_GGO". > > > > I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly > appreciated. > > > > Thanks, > > > > Weicheng Shen, Ph.D. > > Lead Research Scientist | Leidos > > 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 > > O: (703) 907-2548 | Weicheng.shen at leidos.com > > [image: leidos_logo] > > > > > _______________________________________________ > Rtk-users 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: 15591 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 15591 bytes Desc: not available URL: From theday79 at gmail.com Thu Oct 1 17:33:51 2015 From: theday79 at gmail.com (Yang K Park) Date: Thu, 1 Oct 2015 17:33:51 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <560CE88F.5030807@uclouvain.be> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> Message-ID: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park ; 'Matthew J. Riblett' ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I'm using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with "ITK + FFTW" in windows system? I'm just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I've encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I'm running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you're running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I'm not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I've tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn't work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn't compile that way initially, and it took a little bit of time to figure out. Hope that helps, - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I'm now compiling itk-4.8 to use that feature since I've found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting - in fact I'm currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the '-p' flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I've experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I've run into issues where the default 'unsharpness' parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images - notably, those with little detectable signal from background - additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps - and please let me know how it works out for you. - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I've encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I've been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I'm trying to implement this into an automated workflow and I'd love to know how this was accomplished. Thanks! - Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 joelbeaudry at gmail.com Thu Oct 1 17:40:30 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Thu, 1 Oct 2015 14:40:30 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Cyril, After trying out a few attempts, it seems like some values play nicer than others. Could it be an issue with floating point comparisons with the spacing and/or origins? It might explain why certain values seem to work (1.5) and others do not (0.88). I'll look at what values are being compared and get back to you. Thanks, Joel On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry wrote: > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 > spacing) and re-creating a mask off of that. So the motion mask should have > the same dimensions, spacing, and origin as the intended 4D image since I'm > using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating > my mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I created for > 160 (2), worked but not the case of 512 (0.88), and let you know what I > find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > wrote: > >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the small paragraph after >> the cuda command line : >> >> Note that the reconstructed volume in this example does not fully contain >> the attenuating object, causing hyper-attenuation artifacts on the borders >> of the result. To avoid these artifacts, reconstruct a larger volume >> (--dimension 256) should be fine. *Note that you will have to resize >> your motion mask as well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and allow any motion mask, >> but until I do, you can resize your motion mask using the CLITK tools ( >> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other datasets and it >> seems to be working. I need to increase the resolution and play around with >> the parameters now. >> >> I haven't had time to test it too much, but I do get an error when >> attempting to reconstruct with different dimensions. I'm using Cuda, and >> haven't tried it with just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >> AverageOutOfROIImageFilter: information of ROI image does not match input >> image" >> >> I'll be able to test some other things later and list more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line parameters AND data). Can >>> you restart it from scratch and let me know if you still have problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>> coordinates >>> - the regularization parameters (gamma space and gamma time) were way >>> too high. The regularization with a high gamma-time caused frames to be >>> identical, while it should only discourage variations >>> >>> I hope it works, now. If it doesn't work for you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and indeed, there are >>> several mistakes in it. I am working on correcting them. I'll keep you >>> posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>> >>> Hi RTK-users, >>> >>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>> example. The 5 frames should show some differences pertaining to patient >>> motion but the ones that I'm producing are identical, so no motion is >>> visible. >>> >>> Has anyone been able to follow the example and the provided dataset to >>> create a 4D image? >>> >>> Thanks, >>> Joel >>> >>> >>> _______________________________________________ >>> 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 Fri Oct 2 02:44:21 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 2 Oct 2015 08:44:21 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: Hi Joel, Can you explain how you created your mask? Looking at the code, it seems to me that if you create a 4D image with RTK, create a mask from this image with exactly the same meta info and pass it to ROOSTER, that should work in all cases. If I were you, I would compare the two mhd files (of the mask and the 4D image you used to create it) and verify that the meta info is exactly the same. For ROOSTER, I suggest to add an interpolation when the information is not inconsistent, e.g., in the main() function. I can do it if you agree Cyril. Simon On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry wrote: > Hi Cyril, > > After trying out a few attempts, it seems like some values play nicer than > others. Could it be an issue with floating point comparisons with the > spacing and/or origins? It might explain why certain values seem to work > (1.5) and others do not (0.88). I'll look at what values are being compared > and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >> spacing) and re-creating a mask off of that. So the motion mask should have >> the same dimensions, spacing, and origin as the intended 4D image since I'm >> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >> my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the mask I created >> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >> find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> wrote: >> >>> Hi Joel, >>> >>> Good to hear it's working now. >>> The error you get is explained on the wiki in the small paragraph after >>> the cuda command line : >>> >>> Note that the reconstructed volume in this example does not fully >>> contain the attenuating object, causing hyper-attenuation artifacts on the >>> borders of the result. To avoid these artifacts, reconstruct a larger >>> volume (--dimension 256) should be fine. *Note that you will have to >>> resize your motion mask as well, as 3D the motion mask is expected to have >>> the same size, spacing and origin as the first 3 dimensions of the 4D >>> output. * >>> >>> I guess I should take some time to fix that, and allow any motion mask, >>> but until I do, you can resize your motion mask using the CLITK tools ( >>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>> >>> Cyril >>> >>> >>> >>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other datasets and it >>> seems to be working. I need to increase the resolution and play around with >>> the parameters now. >>> >>> I haven't had time to test it too much, but I do get an error when >>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>> haven't tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>> AverageOutOfROIImageFilter: information of ROI image does not match input >>> image" >>> >>> I'll be able to test some other things later and list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> I have fixed the wiki example (command line parameters AND data). Can >>>> you restart it from scratch and let me know if you still have problems ? >>>> >>>> Roughly, the problems were the following: >>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>> coordinates >>>> - the regularization parameters (gamma space and gamma time) were way >>>> too high. The regularization with a high gamma-time caused frames to be >>>> identical, while it should only discourage variations >>>> >>>> I hope it works, now. If it doesn't work for you, please keep asking >>>> Cyril >>>> >>>> >>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki example, and indeed, there are >>>> several mistakes in it. I am working on correcting them. I'll keep you >>>> posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>> example. The 5 frames should show some differences pertaining to patient >>>> motion but the ones that I'm producing are identical, so no motion is >>>> visible. >>>> >>>> Has anyone been able to follow the example and the provided dataset to >>>> create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 cyril.mory at uclouvain.be Fri Oct 2 03:53:14 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Fri, 02 Oct 2015 09:53:14 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> Message-ID: <560E37EA.1060702@uclouvain.be> Indeed, resampling the mask if needed, to the correct size, spacing, origin and direction, seems the simplest way to deal with this issue. But I would do it in the filter rather than in the application, so that anything built on top of ROOSTER (i.e. incremental ROOSTER, or the rtkfourdroostertest) also benefits from it. Feel free to do it if you want, otherwise I'll take care of it next week :) On 10/02/2015 08:44 AM, Simon Rit wrote: > Hi Joel, > Can you explain how you created your mask? Looking at the code, it > seems to me that if you create a 4D image with RTK, create a mask from > this image with exactly the same meta info and pass it to ROOSTER, > that should work in all cases. If I were you, I would compare the two > mhd files (of the mask and the 4D image you used to create it) and > verify that the meta info is exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is > not inconsistent, e.g., in the main() function. I can do it if you > agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > > Hi Cyril, > > After trying out a few attempts, it seems like some values play > nicer than others. Could it be an issue with floating point > comparisons with the spacing and/or origins? It might explain why > certain values seem to work (1.5) and others do not (0.88). I'll > look at what values are being compared and get back to you. > > Thanks, > Joel > > On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry > > wrote: > > Hi Cyril, > > The thing is I'm reconstructing a FDK image with dimensions > 512 (0.88 spacing) and re-creating a mask off of that. So the > motion mask should have the same dimensions, spacing, and > origin as the intended 4D image since I'm using 4D rooster > with --dimension 512 --spacing 0.88. Perhaps I'm creating my > mask incorrectly? > > I'll try and fiddle with it a bit later and see why the mask I > created for 160 (2), worked but not the case of 512 (0.88), > and let you know what I find. > > Thanks again, > Joel > > On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory > > wrote: > > Hi Joel, > > Good to hear it's working now. > The error you get is explained on the wiki in the small > paragraph after the cuda command line : > > Note that the reconstructed volume in this example does > not fully contain the attenuating object, causing > hyper-attenuation artifacts on the borders of the result. > To avoid these artifacts, reconstruct a larger volume > (--dimension 256) should be fine. *Note that you will have > to resize your motion mask as well, as 3D the motion mask > is expected to have the same size, spacing and origin as > the first 3 dimensions of the 4D output. * > > I guess I should take some time to fix that, and allow any > motion mask, but until I do, you can resize your motion > mask using the CLITK tools > (http://www.creatis.insa-lyon.fr/rio/vv) or any method > that suits you. > > Cyril > > > > On 09/29/2015 09:36 PM, Joel Beaudry wrote: >> Hi Cyril, >> >> Works like a charm, thanks! I tried it on some other >> datasets and it seems to be working. I need to increase >> the resolution and play around with the parameters now. >> >> I haven't had time to test it too much, but I do get an >> error when attempting to reconstruct with different >> dimensions. I'm using Cuda, and haven't tried it with >> just cpu reconstruction yet. >> >> i.e.) >> --dimension 160 --spacing 2 -> works >> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws >> "In AverageOutOfROIImageFilter: information of ROI image >> does not match input image" >> >> I'll be able to test some other things later and list >> more details. >> >> Thanks, >> Joel >> >> >> >> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> I have fixed the wiki example (command line >> parameters AND data). Can you restart it from scratch >> and let me know if you still have problems ? >> >> Roughly, the problems were the following: >> - the "mm_50.mha" motion mask file was not aligned >> with the CBCT coordinates >> - the regularization parameters (gamma space and >> gamma time) were way too high. The regularization >> with a high gamma-time caused frames to be identical, >> while it should only discourage variations >> >> I hope it works, now. If it doesn't work for you, >> please keep asking >> Cyril >> >> >> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>> Hi Joel, >>> >>> I have just tried to reproduce the wiki example, and >>> indeed, there are several mistakes in it. I am >>> working on correcting them. I'll keep you posted. >>> >>> Cyril >>> >>> >>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>> Hi RTK-users, >>>> >>>> I'm unable to reproduce the images from the >>>> 4DROOSTERReconstruction example. The 5 frames >>>> should show some differences pertaining to patient >>>> motion but the ones that I'm producing are >>>> identical, so no motion is visible. >>>> >>>> Has anyone been able to follow the example and the >>>> provided dataset to create a 4D image? >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> _______________________________________________ >>>> 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 joelbeaudry at gmail.com Fri Oct 2 12:31:38 2015 From: joelbeaudry at gmail.com (Joel Beaudry) Date: Fri, 2 Oct 2015 09:31:38 -0700 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: <560E37EA.1060702@uclouvain.be> References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: Hi Simon and Cyril, @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) and then use itkSnap to create a mask from that 3D image. I then use that mask as the input for ROOSTER, to which I again use the same spacing/dimensions. For some values it seems to work and other it doesn't. I'm wondering if itkSnap is truncating the spacing/dimension/origins when I save my mask, and perhaps why something like (160,2,-159) works but (511,0.88,-224.84). I'll take a look at the metadata. I'll try resampling my masks and like you said that should probably fix my issues. Thanks for the help, Joel On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory wrote: > Indeed, resampling the mask if needed, to the correct size, spacing, > origin and direction, seems the simplest way to deal with this issue. > But I would do it in the filter rather than in the application, so that > anything built on top of ROOSTER (i.e. incremental ROOSTER, or the > rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: > > Hi Joel, > Can you explain how you created your mask? Looking at the code, it seems > to me that if you create a 4D image with RTK, create a mask from this image > with exactly the same meta info and pass it to ROOSTER, that should work in > all cases. If I were you, I would compare the two mhd files (of the mask > and the 4D image you used to create it) and verify that the meta info is > exactly the same. > For ROOSTER, I suggest to add an interpolation when the information is not > inconsistent, e.g., in the main() function. I can do it if you agree Cyril. > Simon > > On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry > wrote: > >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values play nicer >> than others. Could it be an issue with floating point comparisons with the >> spacing and/or origins? It might explain why certain values seem to work >> (1.5) and others do not (0.88). I'll look at what values are being compared >> and get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> wrote: >> >>> Hi Cyril, >>> >>> The thing is I'm reconstructing a FDK image with dimensions 512 (0.88 >>> spacing) and re-creating a mask off of that. So the motion mask should have >>> the same dimensions, spacing, and origin as the intended 4D image since I'm >>> using 4D rooster with --dimension 512 --spacing 0.88. Perhaps I'm creating >>> my mask incorrectly? >>> >>> I'll try and fiddle with it a bit later and see why the mask I created >>> for 160 (2), worked but not the case of 512 (0.88), and let you know what I >>> find. >>> >>> Thanks again, >>> Joel >>> >>> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >>> wrote: >>> >>>> Hi Joel, >>>> >>>> Good to hear it's working now. >>>> The error you get is explained on the wiki in the small paragraph after >>>> the cuda command line : >>>> >>>> Note that the reconstructed volume in this example does not fully >>>> contain the attenuating object, causing hyper-attenuation artifacts on the >>>> borders of the result. To avoid these artifacts, reconstruct a larger >>>> volume (--dimension 256) should be fine. *Note that you will have to >>>> resize your motion mask as well, as 3D the motion mask is expected to have >>>> the same size, spacing and origin as the first 3 dimensions of the 4D >>>> output. * >>>> >>>> I guess I should take some time to fix that, and allow any motion mask, >>>> but until I do, you can resize your motion mask using the CLITK tools ( >>>> http://www.creatis.insa-lyon.fr/rio/vv) or any method that suits you. >>>> >>>> Cyril >>>> >>>> >>>> >>>> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>>> >>>> Hi Cyril, >>>> >>>> Works like a charm, thanks! I tried it on some other datasets and it >>>> seems to be working. I need to increase the resolution and play around with >>>> the parameters now. >>>> >>>> I haven't had time to test it too much, but I do get an error when >>>> attempting to reconstruct with different dimensions. I'm using Cuda, and >>>> haven't tried it with just cpu reconstruction yet. >>>> >>>> i.e.) >>>> --dimension 160 --spacing 2 -> works >>>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> throws "In >>>> AverageOutOfROIImageFilter: information of ROI image does not match input >>>> image" >>>> >>>> I'll be able to test some other things later and list more details. >>>> >>>> Thanks, >>>> Joel >>>> >>>> >>>> >>>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>>> wrote: >>>> >>>>> Hi Joel, >>>>> >>>>> I have fixed the wiki example (command line parameters AND data). Can >>>>> you restart it from scratch and let me know if you still have problems ? >>>>> >>>>> Roughly, the problems were the following: >>>>> - the "mm_50.mha" motion mask file was not aligned with the CBCT >>>>> coordinates >>>>> - the regularization parameters (gamma space and gamma time) were way >>>>> too high. The regularization with a high gamma-time caused frames to be >>>>> identical, while it should only discourage variations >>>>> >>>>> I hope it works, now. If it doesn't work for you, please keep asking >>>>> Cyril >>>>> >>>>> >>>>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>>> >>>>> Hi Joel, >>>>> >>>>> I have just tried to reproduce the wiki example, and indeed, there are >>>>> several mistakes in it. I am working on correcting them. I'll keep you >>>>> posted. >>>>> >>>>> Cyril >>>>> >>>>> >>>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the 4DROOSTERReconstruction >>>>> example. The 5 frames should show some differences pertaining to patient >>>>> motion but the ones that I'm producing are identical, so no motion is >>>>> visible. >>>>> >>>>> Has anyone been able to follow the example and the provided dataset to >>>>> create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 WEICHENG.SHEN at leidos.com Fri Oct 2 22:11:05 2015 From: WEICHENG.SHEN at leidos.com (Shen, Weicheng) Date: Sat, 3 Oct 2015 02:11:05 +0000 Subject: [Rtk-users] Unknown CMake command "WRAP_GGO" In-Reply-To: References: <138BB7BB4B88944BBAF7E2E8FBCB55809C977025@EMP-EXMR104.corp.leidos.com> <138BB7BB4B88944BBAF7E2E8FBCB55809C977104@EMP-EXMR104.corp.leidos.com> Message-ID: <138BB7BB4B88944BBAF7E2E8FBCB55809C977222@EMP-EXMR104.corp.leidos.com> Hi Simon, Yes, if I run the CMake at the root of RTK, the example builds successfully. Thanks you very much! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 11:24 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Sorry if I wasn't clear. What I meant is that you should just compile RTK as usual, don't try to point to applications/CMakeLists.txt but to the root CMakeLists.txt of the RTK project. Since you mentionned that RTK successfully compiled, you should have already built rtktutorialapplication. On Thu, Oct 1, 2015 at 4:57 PM, Shen, Weicheng > wrote: Hello Simon, Thanks for the tip! When I run CMake on applications/CMakeLists.txt inside RTK, the following error message appears: ================================================================================================ CMake Warning at CMakeLists.txt:1 (FIND_PACKAGE): By not providing "FindGengetopt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Gengetopt", but CMake did not find one. Could not find a package configuration file provided by "Gengetopt" with any of the following names: GengetoptConfig.cmake gengetopt-config.cmake Add the installation prefix of "Gengetopt" to CMAKE_PREFIX_PATH or set "Gengetopt_DIR" to a directory containing one of the above files. If "Gengetopt" provides a separate development package or SDK, be sure it has been installed. ================================================================================================ It looks like ?FIND_PACKAGE(Gengetopt)? can?t find either GengetoptConfig.cmake or gengetopt-config.cmake. I did a manual search for these files in the RTK directories, and they don?t exist. So I added a variable CMAKE_MODULE_PATH in the cmake GUI when performing configuration. The value of CMAKE_MODULE_PATH is set to the path of FindGengetopt.cmake. The .sln file can now be successfully generated. Next I need to build the project using Visual Studio 2013. Thanks you very much for your help! Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Thursday, October 01, 2015 2:19 AM To: Shen, Weicheng Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Unknown CMake command "WRAP_GGO" Hi, WRAP_GGO is defined in cmake/FindGengetopt.cmake. To be able to use WRAP_GGO in an external project you need to do the same as in applications/CMakeLists.txt, i.e., FIND_PACKAGE(Gengetopt). But the easiest, to start with, is to build the rtktutorialapplication in the RTK project. Let us know if that answered your problem, Simon On Wed, Sep 30, 2015 at 11:32 PM, Shen, Weicheng > wrote: I am a new user of the RTK. The first thing I did is to build the RTK 1.1.0 using Microsoft Visual Studio 2013 on my Window 7 machine. After the RTK is successfully built, I attempted to build a sample application rtkMyApp following the instructions given at the rtktutorialapplication.cxx. rtkMyApp is really a copy of the rtktutorialapplication. Necessary changes are made according to the instructions in rtktutorialapplication.cxx However, when I use the CMake to build rtkMyApp, the following error appears in the ?configure? phase: CMake Error at CMakeLists.txt:1 (WRAP_GGO): Unknown CMake command "WRAP_GGO". I couldn?t figure out where WRAP_GGO is defined. Any help will be greatly appreciated. Thanks, Weicheng Shen, Ph.D. Lead Research Scientist | Leidos 4001 N. Fairfax Drive, Arlington, VA 22203 | Suite 700 O: (703) 907-2548 | Weicheng.shen at leidos.com [leidos_logo] _______________________________________________ Rtk-users 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: 15587 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 15591 bytes Desc: image002.png URL: From simon.rit at creatis.insa-lyon.fr Mon Oct 5 01:45:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 5 Oct 2015 07:45:06 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Mon Oct 5 13:53:11 2015 From: theday79 at gmail.com (Yang K Park) Date: Mon, 5 Oct 2015 13:53:11 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> Message-ID: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error1_using_ITK_FFT.png Type: image/png Size: 17214 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error in code.png Type: image/png Size: 21974 bytes Desc: not available URL: From cyril.mory at uclouvain.be Tue Oct 6 08:08:35 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Tue, 06 Oct 2015 14:08:35 +0200 Subject: [Rtk-users] 4DROOSTERReconstruction example In-Reply-To: References: <5608F1A0.9010903@uclouvain.be> <56092926.30609@uclouvain.be> <560B9036.7060204@uclouvain.be> <560E37EA.1060702@uclouvain.be> Message-ID: <5613B9C3.4070309@uclouvain.be> Hi Joel, I have just pushed a fix for this issue: in the 4DROOSTER filter, I have added a resample filter between the ROI input and the AverageOutOfROIImageFilter. On my side, it runs fine. Let me know if it fixes the issue on your side. Thanks for pointing this out, Cyril On 10/02/2015 06:31 PM, Joel Beaudry wrote: > Hi Simon and Cyril, > > @Simon: I first run rtkfdk with some spacing/dimensions (ex: 0.88,512) > and then use itkSnap to create a mask from that 3D image. I then use > that mask as the input for ROOSTER, to which I again use the same > spacing/dimensions. For some values it seems to work and other it > doesn't. I'm wondering if itkSnap is truncating the > spacing/dimension/origins when I save my mask, and perhaps why > something like (160,2,-159) works but (511,0.88,-224.84). I'll take a > look at the metadata. > > I'll try resampling my masks and like you said that should probably > fix my issues. > > Thanks for the help, > Joel > > On Fri, Oct 2, 2015 at 12:53 AM, Cyril Mory > wrote: > > Indeed, resampling the mask if needed, to the correct size, > spacing, origin and direction, seems the simplest way to deal with > this issue. > But I would do it in the filter rather than in the application, so > that anything built on top of ROOSTER (i.e. incremental ROOSTER, > or the rtkfourdroostertest) also benefits from it. > Feel free to do it if you want, otherwise I'll take care of it > next week :) > > > On 10/02/2015 08:44 AM, Simon Rit wrote: >> Hi Joel, >> Can you explain how you created your mask? Looking at the code, >> it seems to me that if you create a 4D image with RTK, create a >> mask from this image with exactly the same meta info and pass it >> to ROOSTER, that should work in all cases. If I were you, I would >> compare the two mhd files (of the mask and the 4D image you used >> to create it) and verify that the meta info is exactly the same. >> For ROOSTER, I suggest to add an interpolation when the >> information is not inconsistent, e.g., in the main() function. I >> can do it if you agree Cyril. >> Simon >> >> On Thu, Oct 1, 2015 at 11:40 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> After trying out a few attempts, it seems like some values >> play nicer than others. Could it be an issue with floating >> point comparisons with the spacing and/or origins? It might >> explain why certain values seem to work (1.5) and others do >> not (0.88). I'll look at what values are being compared and >> get back to you. >> >> Thanks, >> Joel >> >> On Wed, Sep 30, 2015 at 12:51 PM, Joel Beaudry >> > wrote: >> >> Hi Cyril, >> >> The thing is I'm reconstructing a FDK image with >> dimensions 512 (0.88 spacing) and re-creating a mask off >> of that. So the motion mask should have the same >> dimensions, spacing, and origin as the intended 4D image >> since I'm using 4D rooster with --dimension 512 --spacing >> 0.88. Perhaps I'm creating my mask incorrectly? >> >> I'll try and fiddle with it a bit later and see why the >> mask I created for 160 (2), worked but not the case of >> 512 (0.88), and let you know what I find. >> >> Thanks again, >> Joel >> >> On Wed, Sep 30, 2015 at 12:33 AM, Cyril Mory >> > > wrote: >> >> Hi Joel, >> >> Good to hear it's working now. >> The error you get is explained on the wiki in the >> small paragraph after the cuda command line : >> >> Note that the reconstructed volume in this example >> does not fully contain the attenuating object, >> causing hyper-attenuation artifacts on the borders of >> the result. To avoid these artifacts, reconstruct a >> larger volume (--dimension 256) should be fine. *Note >> that you will have to resize your motion mask as >> well, as 3D the motion mask is expected to have the >> same size, spacing and origin as the first 3 >> dimensions of the 4D output. * >> >> I guess I should take some time to fix that, and >> allow any motion mask, but until I do, you can resize >> your motion mask using the CLITK tools >> (http://www.creatis.insa-lyon.fr/rio/vv) or any >> method that suits you. >> >> Cyril >> >> >> >> On 09/29/2015 09:36 PM, Joel Beaudry wrote: >>> Hi Cyril, >>> >>> Works like a charm, thanks! I tried it on some other >>> datasets and it seems to be working. I need to >>> increase the resolution and play around with the >>> parameters now. >>> >>> I haven't had time to test it too much, but I do get >>> an error when attempting to reconstruct with >>> different dimensions. I'm using Cuda, and haven't >>> tried it with just cpu reconstruction yet. >>> >>> i.e.) >>> --dimension 160 --spacing 2 -> works >>> --dimension 512,64,512 --spacing 0.88,2.5,0.88 --> >>> throws "In AverageOutOfROIImageFilter: information >>> of ROI image does not match input image" >>> >>> I'll be able to test some other things later and >>> list more details. >>> >>> Thanks, >>> Joel >>> >>> >>> >>> On Mon, Sep 28, 2015 at 4:48 AM, Cyril Mory >>> >> > wrote: >>> >>> Hi Joel, >>> >>> I have fixed the wiki example (command line >>> parameters AND data). Can you restart it from >>> scratch and let me know if you still have >>> problems ? >>> >>> Roughly, the problems were the following: >>> - the "mm_50.mha" motion mask file was not >>> aligned with the CBCT coordinates >>> - the regularization parameters (gamma space and >>> gamma time) were way too high. The >>> regularization with a high gamma-time caused >>> frames to be identical, while it should only >>> discourage variations >>> >>> I hope it works, now. If it doesn't work for >>> you, please keep asking >>> Cyril >>> >>> >>> On 09/28/2015 09:52 AM, Cyril Mory wrote: >>>> Hi Joel, >>>> >>>> I have just tried to reproduce the wiki >>>> example, and indeed, there are several mistakes >>>> in it. I am working on correcting them. I'll >>>> keep you posted. >>>> >>>> Cyril >>>> >>>> >>>> On 09/26/2015 05:32 AM, Joel Beaudry wrote: >>>>> Hi RTK-users, >>>>> >>>>> I'm unable to reproduce the images from the >>>>> 4DROOSTERReconstruction example. The 5 frames >>>>> should show some differences pertaining to >>>>> patient motion but the ones that I'm producing >>>>> are identical, so no motion is visible. >>>>> >>>>> Has anyone been able to follow the example and >>>>> the provided dataset to create a 4D image? >>>>> >>>>> Thanks, >>>>> Joel >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 Oct 6 09:11:27 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 6 Oct 2015 15:11:27 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park wrote: > Hi Simon, > > > > I?ve just tried to build it without FFTW library, as you have asked. > > > > I have encountered an error as shown in the attached pictures in running > ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, making > FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > > > Hope it helps. > > > > Yang > > > > *From:* simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of *Simon > Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Thanks a lot Yang for the detailed report, I'm sure that will be helpful > to many people. For my personal information, did you try to compile FFTW > from ITK as well? If it didn't work, could you let us know what was the > problem? > > Simon > > > > > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park wrote: > > Hi Cyril, > > > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally succeeded. > > Following is the final version of my instruction. > > > > Thanks. > > > > Yang > > > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very convenient! I > really like it. Thanks for your hard works on this. > > > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > > > > > 1. Prepare fftw library files > > a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b. Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c. Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) > > d. Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e. Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > > 2. Cmake for ITK > > a. Configure > > b. Turn on the following and reconfigure > > i. ITK_USE_SYSTEM_FFTW > (mandatory to make the following options appear) > > c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i. FFTW_INCLUDE_PATH = > H:/lib/FFTW/fftw-3.3.4-dll64 > > ii. FFTWD_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii. FFTWF_LIB = > H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv. FFTWD_THREADS_LIB and > FFTWF_THREAD_LIB may remain blank. > > d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e. Reconfigure, Generate > > > > 3. Build ITK with Visual Studio > > a. In both Debug and Release > > > > 4. Cmake for RTK > > a. Default settings were used. > > b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > > > 5. Build RTK using Visual Studio > > 6. Copy dll files to RTK bin folders > > a. Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7. Build RTK with Visual Studio > > > > > > > > *From:* Cyril Mory [mailto:cyril.mory at uclouvain.be] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park ; 'Matthew J. Riblett' < > riblettmj at mymail.vcu.edu>; rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just have to > activate it in the CMake options. On Windows, you cannot do that. I do not > have a clue why, but you cannot. You have to install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled DLLs from > http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the .lib files > (that is absolutely necessary). You may have to run the "lib.exe" program > from the VS developer prompt instead of the standard windows cmd.exe > prompt. Specify you CPU architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, and you > should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = > ON (on both ITK and RTK), I don't know if it matters. > > If it works for you, then you might want to play around with the other > FFTW .lib files, and send on this mailing list a more complete set of CMAKE > options that works. I have tried some other combinations without success, > so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I > guess this could be a challenging issue to me. > > > > > > > > Hi RTK users, > > > > Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows > system? > > I?m just trying to use *rtkextractshroudsignal* and it seems to require > FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown > below. > > > > Any help will be highly appreciated. > > > > Yang > > > > > > > > > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW > 3.3.3). If you?re running on a Debian-based linux system, you can also > install the full development library set using the following command: *sudo > apt-get install libfftw3-3 libfftw3-dev*. Then just make sure that these > libraries are being used by rerunning CCMake. > > > > I?m not quite sure about the error being thrown in your build, but perhaps > one of the main developers would be able to provide some more insight into > the issue. > > > > Hope this helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > > > On Sep 30, 2015, at 4:44 PM, Yang K Park wrote: > > > > Hi Matt, > > > > Thank you so much for your advice. > > Recently I have revisited this project and tried to compile ITK with those > options on as you suggested. > > > > I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems > that it doesn?t work with RTK. > > There were some link errors like: > > > > rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol > __imp_fftw_execute referenced in function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter std::complex,1> >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > > > May I ask you which version of fftw you are successfully using in which > system(Windows or Linux)? > > > > Thanks. > > > > Yang > > > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Yang, > > > > One ITK requirement of the new RTK version is the inclusion of the Fast > Fourier Transform components. This requires compilation with the > ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and > it took a little bit of time to figure out. > > > > Hope that helps, > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:55 PM, Yang K Park wrote: > > > > Hi Matt, > > > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since I?ve found my itk > version is a bit obsolete (4.4). > > > > Thanks! > > > > Yang > > > > *From:* Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu > ] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Yang, > > > > Nice to hear from you! I have had some success since my initial posting ? > in fact I?m currently working on a new method for accomplishing this task > in certain challenging cases. > > > > The most recent version of RTK provides an update to the > rtkextractshroudsignal application which provides a phase signal output > when called using the ?-p? flag at runtime: > > > > *rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p > phase_signal.txt --method LINEAR_BETWEEN_MINIMA* > > > > From what I?ve experienced, this generally provides a good signal [0,1) > characterizing the respiratory phase using the default settings. > Occasionally, I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear signal (by appending the *--unsharp > ##* flag to the command). On more challenging shroud images ? notably, > those with little detectable signal from background ? additional > contrast-enhancement by pre-processing of the shroud has assisted in signal > extraction. > > > > I hope that helps ? and please let me know how it works out for you. > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > > > > On Sep 18, 2015, at 4:12 PM, Yang K Park wrote: > > > > Hi Matthew, > > > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue and it would be highly > appreciated if you can share with me your updates on this issue. > > Thanks. > > > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > > > > > > > > > *From:* Rtk-users [mailto:rtk-users-bounces at public.kitware.com > ] *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > *Cc:* rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > > > Hi Matthew, > > I'm not sure of what was used in the Matlab script, but I've had good > success with using a Hilbert function in python (scipy). I'm sure that > Matlab has an equivalent function, and maybe that is what was used? > > Hope that helps, > > Joel > > > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < > riblettmj at mymail.vcu.edu> wrote: > > Hello fellow RTK users, > > > > I was wondering if anyone has a straightforward method of going from the > results of the rtkamsterdamshroud and rtkextractshroudsignal applications > to a [0,1) phase signal for performing motion-compensated reconstruction. > I?ve been following along with the MC-CBCT Reconstruction example ( > http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and > there is an indication that Matlab is used to process the should signal > prior to feeding it back into the reconstruction application, but there is > no mention of how this is accomplished. I?m trying to implement this into > an automated workflow and I?d love to know how this was accomplished. > > > > Thanks! > > > > ? Matt > > > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > > > _______________________________________________ > 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 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theday79 at gmail.com Tue Oct 6 10:49:55 2015 From: theday79 at gmail.com (Yang K Park) Date: Tue, 6 Oct 2015 10:49:55 -0400 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> Message-ID: <001c01d10046$44941080$cdbc3180$@gmail.com> Hi Simon, It seems that I misunderstood before. This time, I?ve followed your suggestion and encountered an error as follows: H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): fatal error C1083: Cannot open include file: 'fftw3.h': No such file or directory I?ve tested this with itk4.8.1, which is the most up-to-date release version. It seems that I need to specify the external fftw header file (fftw3.h), but the user interface for input does not appear in CMake unless I set ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. I hope this report can help itk developers resolve the issue. Thanks. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com] On Behalf Of Simon Rit Sent: Tuesday, October 06, 2015 9:11 AM To: Yang K Park Cc: Cyril Mory ; Matthew J. Riblett ; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks Yang. I think I wasn't clear but what I meant was not to disable FFTW but to compile and use FFTW in ITK by using ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=OFF instead of what I think you used ITK_USE_FFTWF=ON ITK_USE_FFTWD=ON ITK_USE_SYSTEM_FFTW=ON Julien Jomier from Kitware told me that both configurations worked for him but your initial message suggests that the first did not work for you. If you can confirm and explain your config (ITK version, compiler, etc.). Simon PS: your test is useful anyway, I'll try to make the error message clearer when FFTW is not used. On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: Hi Simon, I?ve just tried to build it without FFTW library, as you have asked. I have encountered an error as shown in the attached pictures in running ?rtkextractshroudsignal? application. It seems that ITK_FFT cannot find the peak signals successfully, making FFTW mandatory. (I guess Matt had experienced same issue in Linux environment.) Hope it helps. Yang From: simon.rit at gmail.com [mailto:simon.rit at gmail.com ] On Behalf Of Simon Rit Sent: Monday, October 05, 2015 1:45 AM To: Yang K Park > Cc: Cyril Mory >; Matthew J. Riblett >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Thanks a lot Yang for the detailed report, I'm sure that will be helpful to many people. For my personal information, did you try to compile FFTW from ITK as well? If it didn't work, could you let us know what was the problem? Simon On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: Hi Cyril, Thanks a lot for your advices. Thanks to your help, I did some trials and errors and finally succeeded. Following is the final version of my instruction. Thanks. Yang p.s. To RTK developers Extracting phase signal from CBCT looks beautiful and very convenient! I really like it. Thanks for your hard works on this. [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] - Windows 7 64 bit - Visual Studio 2013 - Cmake 3.1.0 - ITK 4.8.0 - CUDA v6.5 - RTK: Up-to-date (revision: 3346) 1. Prepare fftw library files a. Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html b. Unzip it in a proper directory (e.g. ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) c. Find VS2013 command prompt short-cut (Start --> Program --> Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command Prompt) d. Set "Start in" property of the shortcut to the directory where FFTW files are located and then run the shortcut e. Convert *.def files to *.lib files by typing following commands. "lib /machine:x64 /def:libfftw3-3.def" (for double) "lib /machine:x64 /def:libfftw3f-3.def" (for float) 2. Cmake for ITK a. Configure b. Turn on the following and reconfigure i. ITK_USE_SYSTEM_FFTW (mandatory to make the following options appear) c. Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB values e.g.) i. FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 ii. FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib iii. FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib iv. FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. d. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), BUILD_EXAMPLE can be turned off e. Reconfigure, Generate 3. Build ITK with Visual Studio a. In both Debug and Release 4. Cmake for RTK a. Default settings were used. b. "BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) 5. Build RTK using Visual Studio 6. Copy dll files to RTK bin folders a. Which files?: libfftw3-3.dll, libfftw3f-3.dll b. To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug c. 7. Build RTK with Visual Studio From: Cyril Mory [mailto:cyril.mory at uclouvain.be ] Sent: Thursday, October 01, 2015 4:02 AM To: Yang K Park >; 'Matthew J. Riblett' >; rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, First, a quick explanation: ITK embeds FFTW. On linux, you just have to activate it in the CMake options. On Windows, you cannot do that. I do not have a clue why, but you cannot. You have to install FFTW separately. Now, a solution: The quickest way is to download the precompiled DLLs from http://www.fftw.org/install/windows.html On that same page, follow the indications on how to create the .lib files (that is absolutely necessary). You may have to run the "lib.exe" program from the VS developer prompt instead of the standard windows cmd.exe prompt. Specify you CPU architecture explicitly, just to be sure. Then in the CMake options of ITK, set the following: FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ Let the rest of the FFTW options blank. Compile ITK, then RTK, and you should be fine. I have successfully compiled this with BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it matters. If it works for you, then you might want to play around with the other FFTW .lib files, and send on this mailing list a more complete set of CMAKE options that works. I have tried some other combinations without success, so I'd be happy to learn more. Hope it helps, Cyril On 09/30/2015 11:12 PM, Yang K Park wrote: Hi Matt, Thank you so much for your help, again. Unfortunately, I?m using windows system (windows7 64 with VS 2013) and I guess this could be a challenging issue to me. Hi RTK users, Is there anyone who successfully compiled RTK with ?ITK + FFTW? in windows system? I?m just trying to use rtkextractshroudsignal and it seems to require FFTW library externally. When I tried to use FFTW 3.3.4, I?ve encountered link errors as shown below. Any help will be highly appreciated. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Wednesday, September 30, 2015 5:01 PM To: Yang K Park Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, I?m running on Ubuntu 14.04 LTS and used the distribution library (FFTW 3.3.3). If you?re running on a Debian-based linux system, you can also install the full development library set using the following command: sudo apt-get install libfftw3-3 libfftw3-dev. Then just make sure that these libraries are being used by rerunning CCMake. I?m not quite sure about the error being thrown in your build, but perhaps one of the main developers would be able to provide some more insight into the issue. Hope this helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 30, 2015, at 4:44 PM, Yang K Park > wrote: Hi Matt, Thank you so much for your advice. Recently I have revisited this project and tried to compile ITK with those options on as you suggested. I?ve tried to use the up-to-date version of FFTW (3.3.4), but it seems that it doesn?t work with RTK. There were some link errors like: rtkextractshroudsignal.obj : error LNK2019: unresolved external symbol __imp_fftw_execute referenced in function "protected: virtual void __cdecl itk::FFTWComplexToComplexFFTImageFilter,1> >::BeforeThreadedGenerateData(void)" (?BeforeThreadedGenerateData@? May I ask you which version of fftw you are successfully using in which system(Windows or Linux)? Thanks. Yang From: Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 6:56 PM To: Yang K Park > Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Yang, One ITK requirement of the new RTK version is the inclusion of the Fast Fourier Transform components. This requires compilation with the ITK_USE_FFTWF and the ITK_USE_FFTWD options. I know, I didn?t compile that way initially, and it took a little bit of time to figure out. Hope that helps, ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:55 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matt, That sounds great! I really appreciate your advice. I?m now compiling itk-4.8 to use that feature since I?ve found my itk version is a bit obsolete (4.4). Thanks! Yang From: Matthew J. Riblett [ mailto:riblettmj at mymail.vcu.edu] Sent: Friday, September 18, 2015 4:31 PM To: Yang K Park < theday79 at gmail.com> Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Yang, Nice to hear from you! I have had some success since my initial posting ? in fact I?m currently working on a new method for accomplishing this task in certain challenging cases. The most recent version of RTK provides an update to the rtkextractshroudsignal application which provides a phase signal output when called using the ?-p? flag at runtime: rtkextractshroudsignal -i shroud.mhd -o raw_signal.txt -p phase_signal.txt --method LINEAR_BETWEEN_MINIMA >From what I?ve experienced, this generally provides a good signal [0,1) characterizing the respiratory phase using the default settings. Occasionally, I?ve run into issues where the default ?unsharpness? parameter needs to be adjusted to give a clear signal (by appending the --unsharp ## flag to the command). On more challenging shroud images ? notably, those with little detectable signal from background ? additional contrast-enhancement by pre-processing of the shroud has assisted in signal extraction. I hope that helps ? and please let me know how it works out for you. ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 On Sep 18, 2015, at 4:12 PM, Yang K Park < theday79 at gmail.com> wrote: Hi Matthew, Hello, I found you in the RTK-thread. Recently, I?ve encountered exactly same issue and it would be highly appreciated if you can share with me your updates on this issue. Thanks. Yang _______________________________________________ Yang-Kyun Park, Ph.D., DABR Assistant physicist & Instructor Department of Radiation Oncology Massachusetts General Hospital & Harvard Medical School 55 Fruit Street, Boston, MA 02114 Tel: +1-617-726-0186 Fax: +1-617-726-3603 From: Rtk-users [ mailto:rtk-users-bounces at public.kitware.com] On Behalf Of Joel Beaudry Sent: Tuesday, March 17, 2015 5:25 PM To: Matthew J. Riblett < riblettmj at mymail.vcu.edu> Cc: rtk-users at public.kitware.com Subject: Re: [Rtk-users] Generating signal data from Amsterdam Shroud Hi Matthew, I'm not sure of what was used in the Matlab script, but I've had good success with using a Hilbert function in python (scipy). I'm sure that Matlab has an equivalent function, and maybe that is what was used? Hope that helps, Joel On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. Riblett < riblettmj at mymail.vcu.edu> wrote: Hello fellow RTK users, I was wondering if anyone has a straightforward method of going from the results of the rtkamsterdamshroud and rtkextractshroudsignal applications to a [0,1) phase signal for performing motion-compensated reconstruction. I?ve been following along with the MC-CBCT Reconstruction example ( http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), and there is an indication that Matlab is used to process the should signal prior to feeding it back into the reconstruction application, but there is no mention of how this is accomplished. I?m trying to implement this into an automated workflow and I?d love to know how this was accomplished. Thanks! ? Matt __ Matthew J. Riblett Virginia Commonwealth University Department of Radiation Oncology Medical Physics Graduate Program Office: Sanger Hall, Room B1-013 401 College Street | P.O. Box 980058 Richmond, Virginia 23298 VCU Email: riblettmj at vcu.edu MCV Office Phone: +1.804.628.4858 _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Tue Oct 6 11:00:16 2015 From: julien.jomier at kitware.com (Julien Jomier) Date: Tue, 6 Oct 2015 17:00:16 +0200 Subject: [Rtk-users] Generating signal data from Amsterdam Shroud In-Reply-To: <001c01d10046$44941080$cdbc3180$@gmail.com> References: <02AABEED-A026-4581-B3BC-83E40720FBCD@mymail.vcu.edu> <00b101d0f24e$625fa2b0$271ee810$@gmail.com> <00c701d0f254$4af529a0$e0df7ce0$@gmail.com> <963E1047-7BC1-4C38-9E2A-9412F32421EE@mymail.vcu.edu> <003a01d0fbc0$d2c89e00$7859da00$@gmail.com> <9352809F-7403-4589-B7BE-FD7C0A9D4A69@mymail.vcu.edu> <005801d0fbc4$a9c70a60$fd551f20$@gmail.com> <560CE88F.5030807@uclouvain.be> <000201d0fc90$dde384f0$99aa8ed0$@gmail.com> <006c01d0ff96$b460e290$1d22a7b0$@gmail.com> <001c01d10046$44941080$cdbc3180$@gmail.com> Message-ID: <5613E200.4050001@kitware.com> Yang, Simon, As I mentioned previously, you cannot build ITK with FFTW on Windows without setting ITK_USE_SYSTEM_FFTW=ON. You should get a warning in CMake specifying this. So the only solution to build ITK with FFTW on Windows is to use an externally compiled version of FFTW. Julien On 06/10/2015 16:49, Yang K Park wrote: > Hi Simon, > > It seems that I misunderstood before. This time, I?ve followed your > suggestion and encountered an error as follows: > > H:\lib\itk4.8.1\SRC\Modules\Filtering\FFT\include\itkFFTWGlobalConfiguration.h(31): > fatal error C1083: Cannot open include file: 'fftw3.h': No such file or > directory > > I?ve tested this with itk4.8.1, which is the most up-to-date release > version. > > It seems that I need to specify the external fftw header file (fftw3.h), > but the user interface for input does not appear in CMake unless I set > ITK_USE_SYSTEM_FFTW=ON, as I have pointed out. > > I hope this report can help itk developers resolve the issue. > > Thanks. > > Yang > > *From:*simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On Behalf Of > *Simon Rit > *Sent:* Tuesday, October 06, 2015 9:11 AM > *To:* Yang K Park > *Cc:* Cyril Mory ; Matthew J. Riblett > ; rtk-users at public.kitware.com > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks Yang. I think I wasn't clear but what I meant was not to disable > FFTW but to compile and use FFTW in ITK by using > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=OFF > > instead of what I think you used > ITK_USE_FFTWF=ON > ITK_USE_FFTWD=ON > ITK_USE_SYSTEM_FFTW=ON > > Julien Jomier from Kitware told me that both configurations worked for > him but your initial message suggests that the first did not work for > you. If you can confirm and explain your config (ITK version, compiler, > etc.). > > Simon > > PS: your test is useful anyway, I'll try to make the error message > clearer when FFTW is not used. > > On Mon, Oct 5, 2015 at 7:53 PM, Yang K Park > wrote: > > Hi Simon, > > I?ve just tried to build it without FFTW library, as you have asked. > > I have encountered an error as shown in the attached pictures in > running ?rtkextractshroudsignal? application. > > It seems that ITK_FFT cannot find the peak signals successfully, > making FFTW mandatory. > > (I guess Matt had experienced same issue in Linux environment.) > > Hope it helps. > > Yang > > *From:*simon.rit at gmail.com > [mailto:simon.rit at gmail.com ] *On Behalf > Of *Simon Rit > *Sent:* Monday, October 05, 2015 1:45 AM > *To:* Yang K Park > > *Cc:* Cyril Mory >; Matthew J. Riblett > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam Shroud > > Thanks a lot Yang for the detailed report, I'm sure that will be > helpful to many people. For my personal information, did you try to > compile FFTW from ITK as well? If it didn't work, could you let us > know what was the problem? > > Simon > > On Thu, Oct 1, 2015 at 11:33 PM, Yang K Park > wrote: > > Hi Cyril, > > Thanks a lot for your advices. > > Thanks to your help, I did some trials and errors and finally > succeeded. > > Following is the final version of my instruction. > > Thanks. > > Yang > > p.s. To RTK developers > > Extracting phase signal from CBCT looks beautiful and very > convenient! I really like it. Thanks for your hard works on this. > > [ITK/RTK compile instruction to use FFTW: For windows7 with VS2013] > > > > - Windows 7 64 bit > > - Visual Studio 2013 > > - Cmake 3.1.0 > > - ITK 4.8.0 > > - CUDA v6.5 > > - RTK: Up-to-date (revision: 3346) > > > > 1.Prepare fftw library files > > a.Download FFTW 3.3.4 from http://www.fftw.org/install/windows.html > > b.Unzip it in a proper directory (e.g. > ~/lib/FFTW3.3.4/fftw-3.3.4-dll64) > > c.Find VS2013 command prompt short-cut (Start --> Program --> > Visual Studio 2013 --> Tools -->VS2013 x64 Native Tools Command > Prompt) > > d.Set "Start in" property of the shortcut to the directory where > FFTW files are located and then run the shortcut > > e.Convert *.def files to *.lib files by typing following commands. > > "lib /machine:x64 /def:libfftw3-3.def" (for double) > > "lib /machine:x64 /def:libfftw3f-3.def" (for float) > > 2.Cmake for ITK > > a.Configure > > b.Turn on the following and reconfigure > > i.ITK_USE_SYSTEM_FFTW (mandatory to make the following options > appear) > > c.Set proper paths for FFTW_INCLUDE_PATH, FFTWD_LIB and FFTW_LIB > values > > e.g.) > > i.FFTW_INCLUDE_PATH = H:/lib/FFTW/fftw-3.3.4-dll64 > > ii.FFTWD_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3-3.lib > > iii.FFTWF_LIB = H:/lib/FFTW/fftw-3.3.4-dll64/libfftw3f-3.lib > > iv.FFTWD_THREADS_LIB and FFTWF_THREAD_LIB may remain blank. > > d."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW), > BUILD_EXAMPLE can be turned off > > e.Reconfigure, Generate > > 3.Build ITK with Visual Studio > > a.In both Debug and Release > > 4.Cmake for RTK > > a.Default settings were used. > > b."BUILD_SHARED_LIBS" can be turned off (no effect on FFTW) > > 5.Build RTK using Visual Studio > > 6.Copy dll files to RTK bin folders > > a.Which files?: libfftw3-3.dll, libfftw3f-3.dll > > b.To where?: (~RTK)\bin\Release and (~RTK)\bin\Debug > > c. > > 7.Build RTK with Visual Studio > > *From:*Cyril Mory [mailto:cyril.mory at uclouvain.be > ] > *Sent:* Thursday, October 01, 2015 4:02 AM > *To:* Yang K Park >; 'Matthew J. Riblett' > >; > rtk-users at public.kitware.com > > > *Subject:* Re: [Rtk-users] Generating signal data from Amsterdam > Shroud > > Hi Yang, > > First, a quick explanation: ITK embeds FFTW. On linux, you just > have to activate it in the CMake options. On Windows, you cannot > do that. I do not have a clue why, but you cannot. You have to > install FFTW separately. > > Now, a solution: The quickest way is to download the precompiled > DLLs from http://www.fftw.org/install/windows.html > On that same page, follow the indications on how to create the > .lib files (that is absolutely necessary). You may have to run > the "lib.exe" program from the VS developer prompt instead of > the standard windows cmd.exe prompt. Specify you CPU > architecture explicitly, just to be sure. > > Then in the CMake options of ITK, set the following: > FFTWF_LIB = TheRelevantFolderOnYourSystem/libfftw3f-3.lib > FFTW_INCLUDE_PATH = TheRelevantFolderOnYourSystem/ > > Let the rest of the FFTW options blank. Compile ITK, then RTK, > and you should be fine. I have successfully compiled this with > BUILD_SHARED_LIBS = ON (on both ITK and RTK), I don't know if it > matters. > > If it works for you, then you might want to play around with the > other FFTW .lib files, and send on this mailing list a more > complete set of CMAKE options that works. I have tried some > other combinations without success, so I'd be happy to learn more. > > Hope it helps, > Cyril > > On 09/30/2015 11:12 PM, Yang K Park wrote: > > Hi Matt, > > Thank you so much for your help, again. > > Unfortunately, I?m using windows system (windows7 64 with VS > 2013) and I guess this could be a challenging issue to me. > > Hi RTK users, > > Is there anyone who successfully compiled RTK with ?ITK + > FFTW? in windows system? > > I?m just trying to use *rtkextractshroudsignal* and it seems > to require FFTW library externally. > > When I tried to use FFTW 3.3.4, I?ve encountered link errors > as shown below. > > Any help will be highly appreciated. > > Yang > > *From:*Matthew J. Riblett [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Wednesday, September 30, 2015 5:01 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > I?m running on Ubuntu 14.04 LTS and used the distribution > library (FFTW 3.3.3). If you?re running on a Debian-based > linux system, you can also install the full development > library set using the following command: */sudo apt-get > install libfftw3-3 libfftw3-dev/*. Then just make sure that > these libraries are being used by rerunning CCMake. > > I?m not quite sure about the error being thrown in your > build, but perhaps one of the main developers would be able > to provide some more insight into the issue. > > Hope this helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 30, 2015, at 4:44 PM, Yang K Park > > wrote: > > Hi Matt, > > Thank you so much for your advice. > > Recently I have revisited this project and tried to > compile ITK with those options on as you suggested. > > I?ve tried to use the up-to-date version of FFTW > (3.3.4), but it seems that it doesn?t work with RTK. > > There were some link errors like: > > rtkextractshroudsignal.obj : error LNK2019: unresolved > external symbol __imp_fftw_execute referenced in > function "protected: virtual void __cdecl > itk::FFTWComplexToComplexFFTImageFilter itk::Image,1> > >::BeforeThreadedGenerateData(void)" > (?BeforeThreadedGenerateData@? > > May I ask you which version of fftw you are successfully > using in which system(Windows or Linux)? > > Thanks. > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 6:56 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data from > Amsterdam Shroud > > Yang, > > One ITK requirement of the new RTK version is the > inclusion of the Fast Fourier Transform components. > This requires compilation with the ITK_USE_FFTWF and the > > ITK_USE_FFTWD options. I know, I didn?t compile that > way initially, and it took a little bit of time to > figure out. > > Hope that helps, > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > On Sep 18, 2015, at 4:55 PM, Yang K Park > > wrote: > > Hi Matt, > > That sounds great! I really appreciate your advice. > > I?m now compiling itk-4.8 to use that feature since > I?ve found my itk version is a bit obsolete (4.4). > > Thanks! > > Yang > > *From:* Matthew J. Riblett > [mailto:riblettmj at mymail.vcu.edu] > *Sent:* Friday, September 18, 2015 4:31 PM > *To:* Yang K Park > > *Subject:* Re: [Rtk-users] Generating signal data > from Amsterdam Shroud > > Hi Yang, > > Nice to hear from you! I have had some success > since my initial posting ? in fact I?m currently > working on a new method for accomplishing this task > in certain challenging cases. > > The most recent version of RTK provides an update to > the rtkextractshroudsignal application which > provides a phase signal output when called using the > ?-p? flag at runtime: > > */rtkextractshroudsignal -i shroud.mhd -o > raw_signal.txt -p phase_signal.txt --method > LINEAR_BETWEEN_MINIMA/* > > From what I?ve experienced, this generally provides > a good signal [0,1) characterizing the respiratory > phase using the default settings. Occasionally, > I?ve run into issues where the default ?unsharpness? > parameter needs to be adjusted to give a clear > signal (by appending the *--unsharp ##* flag to the > command). On more challenging shroud images ? > notably, those with little detectable signal from > background ? additional contrast-enhancement by > pre-processing of the shroud has assisted in signal > extraction. > > I hope that helps ? and please let me know how it > works out for you. > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > MCV Office Phone: +1.804.628.4858 > > > On Sep 18, 2015, at 4:12 PM, Yang K Park > > > wrote: > > Hi Matthew, > > Hello, I found you in the RTK-thread. > > Recently, I?ve encountered exactly same issue > and it would be highly appreciated if you can > share with me your updates on this issue. > > Thanks. > > Yang > > _______________________________________________ > > Yang-Kyun Park, Ph.D., DABR > > Assistant physicist & Instructor > > Department of Radiation Oncology > > Massachusetts General Hospital & Harvard Medical > School > > 55 Fruit Street, Boston, MA 02114 > > Tel: +1-617-726-0186 > > Fax: +1-617-726-3603 > > *From:* Rtk-users > [mailto:rtk-users-bounces at public.kitware.com] > *On Behalf Of *Joel Beaudry > *Sent:* Tuesday, March 17, 2015 5:25 PM > *To:* Matthew J. Riblett > > > *Cc:* rtk-users at public.kitware.com > > *Subject:* Re: [Rtk-users] Generating signal > data from Amsterdam Shroud > > Hi Matthew, > > I'm not sure of what was used in the Matlab > script, but I've had good success with using a > Hilbert function in python (scipy). I'm sure > that Matlab has an equivalent function, and > maybe that is what was used? > > Hope that helps, > > Joel > > On Wed, Mar 11, 2015 at 2:40 PM, Matthew J. > Riblett > wrote: > > Hello fellow RTK users, > > I was wondering if anyone has a > straightforward method of going from the > results of the rtkamsterdamshroud and > rtkextractshroudsignal applications to a > [0,1) phase signal for performing > motion-compensated reconstruction. I?ve > been following along with the MC-CBCT > Reconstruction example > (http://wiki.openrtk.org/index.php/RTK/Examples/MCCBCTReconstruction), > and there is an indication that Matlab is > used to process the should signal prior to > feeding it back into the reconstruction > application, but there is no mention of how > this is accomplished. I?m trying to > implement this into an automated workflow > and I?d love to know how this was accomplished. > > Thanks! > > ? Matt > > __ > > Matthew J. Riblett > Virginia Commonwealth University > Department of Radiation Oncology > Medical Physics Graduate Program > > Office: Sanger Hall, Room B1-013 > > 401 College Street | P.O. Box 980058 > > Richmond, Virginia 23298 > > VCU Email: riblettmj at vcu.edu > > MCV Office Phone: +1.804.628.4858 > > > > _______________________________________________ > 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 > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From bottiger at gmail.com Mon Oct 12 05:42:20 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 11:42:20 +0200 Subject: [Rtk-users] Reconstruction problems Message-ID: Hi there I hope someone can help me me get started with RTK. First of all I should mention that I have compiled RTK on Windows 7 using Visual Studio 2013. Everything seems to compile and run just fine. Secondly: I tried to reproduce this example: http://wiki.openrtk.org/index.php/RTK/Scripts/FDK This was somewhat successful - I think. I could generate some projections, and reconstruct them. However, it just looks like an egg and not like a Shepp Logan phantom. See attachment. However, I'm unsure if this is expected or not. I took some homemade projections (of a small cylinder) and converted them into a MHA file (using rtkprojections.exe). The file looks correct in ImageJ. The dimensions are 370 pixels * 195 pixels * 361 projections You can get the file here: https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 The problem is that the reconstruction is wrong (see cylinder_recon). It looks like the dimensions are not read correctly, but I am unsure how I fix that? The rtkfdk.exe has a single --dimension parameter, but I am unsure which dimension that is suppose to be, but neither 195, 370 or any other value I could think of works for me. I hope someone can help me in the right direction. best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: SheppLogan.PNG Type: image/png Size: 150153 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cylinder_recon.PNG Type: image/png Size: 128472 bytes Desc: not available URL: From ghostcz at hotmail.com Mon Oct 12 05:54:44 2015 From: ghostcz at hotmail.com (louie L) Date: Mon, 12 Oct 2015 11:54:44 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Hi, You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? Cheers, Louie Sent from my iOS > On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 05:59:38 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 11:59:38 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: References: Message-ID: <561B848A.9090406@uclouvain.be> Hi Arvid, Well, you're on the right track :-) Your Shepp Logan reconstruction looks fine, I guess it is just a visualization problem: you can use vv http://www.creatis.insa-lyon.fr/rio/vv to open it and you will be able to change the "window" and "level" settings in visualization. Regarding the cylinder, can you send your geometry file too ? Regards Cyril Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here: > https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Mon Oct 12 06:35:27 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:35:27 +0200 Subject: [Rtk-users] {Spam?} Reconstruction problems In-Reply-To: <561B848A.9090406@uclouvain.be> References: <561B848A.9090406@uclouvain.be> Message-ID: Hey Cyril I just wrote another e-mail about how I generated the geometry file (it's just simulated). But just in case I'll attach it here: best Arvid On Mon, Oct 12, 2015 at 11:59 AM, Cyril Mory wrote: > Hi Arvid, > > Well, you're on the right track :-) > Your Shepp Logan reconstruction looks fine, I guess it is just a > visualization problem: you can use vv > http://www.creatis.insa-lyon.fr/rio/vv > to open it and you will be able to change the "window" and "level" > settings in visualization. > > Regarding the cylinder, can you send your geometry file too ? > > Regards > Cyril > > Le 12/10/2015 11:42, Arvid Piehl Lauritsen B?ttiger a ?crit : > > Hi there > > I hope someone can help me me get started with RTK. > > First of all I should mention that I have compiled RTK on Windows 7 > using Visual Studio 2013. Everything seems to compile and run just > fine. > > Secondly: I tried to reproduce this example:http://wiki.openrtk.org/index.php/RTK/Scripts/FDK > > This was somewhat successful - I think. I could generate some > projections, and reconstruct them. However, it just looks like an egg > and not like a Shepp Logan phantom. See attachment. > > However, I'm unsure if this is expected or not. I took some homemade > projections (of a small cylinder) and converted them into a MHA file > (using rtkprojections.exe). The file looks correct in ImageJ. The > dimensions are 370 pixels * 195 pixels * 361 projections > > You can get the file here:https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 > > The problem is that the reconstruction is wrong (see cylinder_recon). > It looks like the dimensions are not read correctly, but I am unsure > how I fix that? The rtkfdk.exe has a single --dimension parameter, but > I am unsure which dimension that is suppose to be, but neither 195, > 370 or any other value I could think of works for me. > > I hope someone can help me in the right direction. > > best > > Arvid > > > > _______________________________________________ > Rtk-users mailing listRtk-users at public.kitware.comhttp://public.kitware.com/mailman/listinfo/rtk-users > > > > > ------------------------------ > [image: Avast logo] > > L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le > logiciel antivirus Avast. > www.avast.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: geometry360.xml Type: text/xml Size: 134495 bytes Desc: not available URL: From bottiger at gmail.com Mon Oct 12 06:36:03 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Mon, 12 Oct 2015 12:36:03 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: Sure. I'll admit I have yet to understand the specifics of the geometry file. Currently I just used a simulated one because that was what the SheppLogan example used, and the input projections looked similar. Here is a complete list of the commands I executed: rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 I did not do anything to the contrast and that is most likely the issue. I downloaded and installed vv and I can see some (very unclear) features inside the SheppLogan reconstruction - so that's nice. However, currently I'm mostly interested in getting the geometry right :) best On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: > Hi, > > You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? > > Cheers, > Louie > > Sent from my iOS > >> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >> >> Hi there >> >> I hope someone can help me me get started with RTK. >> >> First of all I should mention that I have compiled RTK on Windows 7 >> using Visual Studio 2013. Everything seems to compile and run just >> fine. >> >> Secondly: I tried to reproduce this example: >> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >> >> This was somewhat successful - I think. I could generate some >> projections, and reconstruct them. However, it just looks like an egg >> and not like a Shepp Logan phantom. See attachment. >> >> However, I'm unsure if this is expected or not. I took some homemade >> projections (of a small cylinder) and converted them into a MHA file >> (using rtkprojections.exe). The file looks correct in ImageJ. The >> dimensions are 370 pixels * 195 pixels * 361 projections >> >> You can get the file here: >> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >> >> The problem is that the reconstruction is wrong (see cylinder_recon). >> It looks like the dimensions are not read correctly, but I am unsure >> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >> I am unsure which dimension that is suppose to be, but neither 195, >> 370 or any other value I could think of works for me. >> >> I hope someone can help me in the right direction. >> >> best >> >> Arvid >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users From cyril.mory at uclouvain.be Mon Oct 12 15:52:10 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 21:52:10 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: References: Message-ID: <561C0F6A.6080602@uclouvain.be> Hi Arvid, Unfortunately, you cannot do that. You have to obtain the exact geometry of this particular acquisition from the cone beam device you used. If you need help to convert it to the RTK format, well, that's something you can ask for on this mailing list. Can you get the geometry data ? Regards, Cyril Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : > Sure. > > I'll admit I have yet to understand the specifics of the geometry > file. Currently I just used a simulated one because that was what the > SheppLogan example used, and the input projections looked similar. > > Here is a complete list of the commands I executed: > > rtksimulatedgeometry.exe -n 361 -o c:\Users\aplb\Work\out_dir\geometry360.xml > > rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ > --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif > > rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o > c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g > c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 > > I did not do anything to the contrast and that is most likely the > issue. I downloaded and installed vv and I can see some (very unclear) > features inside the SheppLogan reconstruction - so that's nice. > However, currently I'm mostly interested in getting the geometry right :) > > best > > On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >> Hi, >> >> You can specify the size in each dimension. Can you post the arguments you used for the projections and reconstruction? Did you try to adjust the contrast of the output? >> >> Cheers, >> Louie >> >> Sent from my iOS >> >>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger wrote: >>> >>> Hi there >>> >>> I hope someone can help me me get started with RTK. >>> >>> First of all I should mention that I have compiled RTK on Windows 7 >>> using Visual Studio 2013. Everything seems to compile and run just >>> fine. >>> >>> Secondly: I tried to reproduce this example: >>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>> >>> This was somewhat successful - I think. I could generate some >>> projections, and reconstruct them. However, it just looks like an egg >>> and not like a Shepp Logan phantom. See attachment. >>> >>> However, I'm unsure if this is expected or not. I took some homemade >>> projections (of a small cylinder) and converted them into a MHA file >>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>> dimensions are 370 pixels * 195 pixels * 361 projections >>> >>> You can get the file here: >>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>> >>> The problem is that the reconstruction is wrong (see cylinder_recon). >>> It looks like the dimensions are not read correctly, but I am unsure >>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>> I am unsure which dimension that is suppose to be, but neither 195, >>> 370 or any other value I could think of works for me. >>> >>> I hope someone can help me in the right direction. >>> >>> best >>> >>> Arvid >>> >>> >>> _______________________________________________ >>> 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 --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From cyril.mory at uclouvain.be Mon Oct 12 16:36:24 2015 From: cyril.mory at uclouvain.be (Cyril Mory) Date: Mon, 12 Oct 2015 22:36:24 +0200 Subject: [Rtk-users] Reconstruction problems In-Reply-To: <561C1984.9030509@uclouvain.be> References: <561C1984.9030509@uclouvain.be> Message-ID: <561C19C8.5050304@uclouvain.be> Arvid, You can find a description of the geometry here : http://www.creatis.insa-lyon.fr/~srit/geometry.pdf In rtk/applications, several applications are simple converters from the cone beam manufacturer's raw geometry format to RTK geometry format, so you can also have a look at the code of these apps. If you know that you have an almost parallel beam, you can indeed try to use a dummy geometry file, but be careful: rtksimulatedgeometry generates a cone beam geometry, with large fan and cone angles if you leave the default parameters. You can adjust the 'sdd' and 'sid' options to simulate a very distant source, making rays almost parallel to each other (be careful with numerical precision, though). Hope it helps, Cyril Le 12/10/2015 21:59, Arvid Piehl Lauritsen B?ttiger a ?crit : > Hello Cyril > > Thank you for getting back to me. I do have the geometry (albeit not > right here next to me). > However, my problem was that when I looked in the geometry file, I > didn't find it obvious how to define declare it - is it documented > somewhere? > > That said - the measurements I played around with is measured with an > almost parallel beam. I hoped I could reconstruct it (with minor > artifacts) using a dummy geometry file. > > best > > Arvid > > On Mon, Oct 12, 2015 at 9:52 PM, Cyril Mory wrote: >> Hi Arvid, >> >> Unfortunately, you cannot do that. You have to obtain the exact geometry of >> this particular acquisition from the cone beam device you used. >> If you need help to convert it to the RTK format, well, that's something you >> can ask for on this mailing list. >> Can you get the geometry data ? >> >> Regards, >> Cyril >> >> >> Le 12/10/2015 12:36, Arvid Piehl Lauritsen B?ttiger a ?crit : >>> Sure. >>> >>> I'll admit I have yet to understand the specifics of the geometry >>> file. Currently I just used a simulated one because that was what the >>> SheppLogan example used, and the input projections looked similar. >>> >>> Here is a complete list of the commands I executed: >>> >>> rtksimulatedgeometry.exe -n 361 -o >>> c:\Users\aplb\Work\out_dir\geometry360.xml >>> >>> rtkprojections.exe --path c:\Users\aplb\Work\tomography_data\dataset1\ >>> --output c:\Users\aplb\Work\out_dir\cylinder.mha --regexp .tif >>> >>> rtkfdk.exe -p c:\Users\aplb\Work\out_dir\ -r cylinder.mha -o >>> c:\Users\aplb\Work\out_dir\cylinder_recon.mha -g >>> c:\Users\aplb\Work\out_dir\geometry360.xml --spacing 2 --dimension 256 >>> >>> I did not do anything to the contrast and that is most likely the >>> issue. I downloaded and installed vv and I can see some (very unclear) >>> features inside the SheppLogan reconstruction - so that's nice. >>> However, currently I'm mostly interested in getting the geometry right :) >>> >>> best >>> >>> On Mon, Oct 12, 2015 at 11:54 AM, louie L wrote: >>>> Hi, >>>> >>>> You can specify the size in each dimension. Can you post the arguments >>>> you used for the projections and reconstruction? Did you try to adjust the >>>> contrast of the output? >>>> >>>> Cheers, >>>> Louie >>>> >>>> Sent from my iOS >>>> >>>>> On 12 Oct 2015, at 11:42, Arvid Piehl Lauritsen B?ttiger >>>>> wrote: >>>>> >>>>> Hi there >>>>> >>>>> I hope someone can help me me get started with RTK. >>>>> >>>>> First of all I should mention that I have compiled RTK on Windows 7 >>>>> using Visual Studio 2013. Everything seems to compile and run just >>>>> fine. >>>>> >>>>> Secondly: I tried to reproduce this example: >>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK >>>>> >>>>> This was somewhat successful - I think. I could generate some >>>>> projections, and reconstruct them. However, it just looks like an egg >>>>> and not like a Shepp Logan phantom. See attachment. >>>>> >>>>> However, I'm unsure if this is expected or not. I took some homemade >>>>> projections (of a small cylinder) and converted them into a MHA file >>>>> (using rtkprojections.exe). The file looks correct in ImageJ. The >>>>> dimensions are 370 pixels * 195 pixels * 361 projections >>>>> >>>>> You can get the file here: >>>>> https://www.dropbox.com/s/p8tsgsh5xxb468f/cylinder.mha?dl=0 >>>>> >>>>> The problem is that the reconstruction is wrong (see cylinder_recon). >>>>> It looks like the dimensions are not read correctly, but I am unsure >>>>> how I fix that? The rtkfdk.exe has a single --dimension parameter, but >>>>> I am unsure which dimension that is suppose to be, but neither 195, >>>>> 370 or any other value I could think of works for me. >>>>> >>>>> I hope someone can help me in the right direction. >>>>> >>>>> best >>>>> >>>>> Arvid >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >> >> >> --- >> L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le >> logiciel antivirus Avast. >> https://www.avast.com/antivirus >> --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From gnthibault at gmail.com Wed Oct 14 05:38:46 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Wed, 14 Oct 2015 11:38:46 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter Message-ID: Dear all, I recently had troubles while trying to rewrite my code, linked with libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite well, to using fdk reconstruction method. My first question: is there a general way to enable maximum debug log level at runtime in rtk ? My second question, is more specific: is it normal that I see such error message coming from itk when using FDKConeBeamReconstructionFilter : ExceptionObject caught with fdk->Update() in file [...] itk::ExceptionObject (0x7f377c020cb0) Location: "unknown" File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx Line: 416 Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred during SingleMethodExecute /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): Cannot compute FFT of image with size [2048, 1024, 11]. VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose size in each dimension has a prime factorization consisting of only 2s, 3s, or 5s. I suppose that this error arise while performing ramp filtering, but I see no relation between FFT configuration stated in the error log ( [2048, 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 projections. I also tried with 200 projection and I had the same problem, but with [2048, 1024, 34] Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to the total number of projection in my dataset every time. The revision I am currently using: commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 Merge: 578cf89 09d820c Thank you in advance for your help. Regards Thibault Notargiacomo -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 14 12:58:06 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 14 Oct 2015 18:58:06 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Hi Thibault, No, there is not really a log system that would allow you debugging at run time. You can compile a debug version that would enable a lot of messages related to the pipeline. For this, I think you need to use NDEBUG at compilation (it's an ITK mechanism that I never use). No, it's not normal that you see an error message. There are two things: - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it only handles power of 2/3/5 dimensions and it's slow. I always advise people to use FFTW by turning on ITK_USE_FFTW options during ITK's compilation. - I don't fully understand why vnl doesn't work either. I understand the first two dimensions, for vnl (which I strongly suggest to not use), I pad to the next power of 2 so 780 * 2 (for zero padding) -> 2048 780 -> 1024 but then, if you use 64 projections, why 11? Are you sure the second input image to FDKConeBeamReconstructionImageFilter has the dimension you want? I would try to connect input 2 to an itk::ImageFileWriter and check what are the dimensions of this image. If you're absolutely sure, then I'll try to reproduce and fix the issue. Simon On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < gnthibault at gmail.com> wrote: > Dear all, > > I recently had troubles while trying to rewrite my code, linked with > libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite > well, to using fdk reconstruction method. > > My first question: is there a general way to enable maximum debug log > level at runtime in rtk ? > > My second question, is more specific: is it normal that I see such error > message coming from itk when using FDKConeBeamReconstructionFilter : > > ExceptionObject caught with fdk->Update() in file [...] > > itk::ExceptionObject (0x7f377c020cb0) > Location: "unknown" > File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx > Line: 416 > Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred > during SingleMethodExecute > > /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: > itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): > Cannot compute FFT of image with size [2048, 1024, 11]. > VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose > size in each dimension has a prime factorization consisting of only 2s, 3s, > or 5s. > > I suppose that this error arise while performing ramp filtering, but I see > no relation between FFT configuration stated in the error log ( [2048, > 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 > projections. > > I also tried with 200 projection and I had the same problem, but with > [2048, 1024, 34] > > Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to > the total number of projection in my dataset every time. > > The revision I am currently using: > commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 > Merge: 578cf89 09d820c > > > Thank you in advance for your help. > > Regards > > Thibault Notargiacomo > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scouser27 at gmail.com Wed Oct 14 16:27:48 2015 From: scouser27 at gmail.com (sco user) Date: Wed, 14 Oct 2015 21:27:48 +0100 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi I'm a new user to RTK. I've been able to perform reconstructions of the Catphan and my own copies of Varian CBCT images with some success. I enabled the CUDA flags when making RTK so as to take advantage of the capabilities of my GPU. When I use --hardware="cuda" with the rtkfdk application, I have found that I must specify the lowmem option in order to get the reconstruction to run successfully. If I don't use lowmem, I get the following error: #### Reconstructing and writing... /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ unknown : Cuda Error : out of memory ExceptionObject caught with writer->Update() in file /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 itk::ExceptionObject (0x18e3460) Location: "unknown" File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h Line: 55 Description: Cuda Error : out of memory #### I take from this that I'm out of memory on the GPU. Is that correct? The GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be in order to get a typical Varian reconstruction to run without the lowmem option. On a side note, I know that the cuda option is working because it's a lot quicker than hardware="cpu", despite only having 96 cuda cores. Another question I'd like to ask is if anyone can shed some light on useful values for I-zero, wpc, scatter etc. With thanks in advance, Dave. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wuchao04 at gmail.com Thu Oct 15 03:09:05 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Thu, 15 Oct 2015 09:09:05 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Without the lowmem flag all projection images may be loaded into graphics memory at once causing an out-of-memory issues. You can also check this thread: http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html Regards, Chao 2015-10-14 22:27 GMT+02:00 sco user : > Hi > > I'm a new user to RTK. > I've been able to perform reconstructions of the Catphan and my own copies > of Varian CBCT images with some success. I enabled the CUDA flags when > making RTK so as to take advantage of the capabilities of my GPU. > > When I use --hardware="cuda" with the rtkfdk application, I have found > that I must specify the lowmem option in order to get the reconstruction to > run successfully. If I don't use lowmem, I get the following error: > > #### > Reconstructing and writing... > /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ > unknown : Cuda Error : out of memory > > ExceptionObject caught with writer->Update() in file > /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 > > itk::ExceptionObject (0x18e3460) > Location: "unknown" > File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h > Line: 55 > Description: Cuda Error : out of memory > #### > > I take from this that I'm out of memory on the GPU. Is that correct? The > GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be > in order to get a typical Varian reconstruction to run without the lowmem > option. > > On a side note, I know that the cuda option is working because it's a lot > quicker than hardware="cpu", despite only having 96 cuda cores. > > > Another question I'd like to ask is if anyone can shed some light on > useful values for I-zero, wpc, scatter etc. > > With thanks in advance, > Dave. > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From itkhelpacc at gmail.com Thu Oct 15 03:52:25 2015 From: itkhelpacc at gmail.com (vishal k) Date: Thu, 15 Oct 2015 13:22:25 +0530 Subject: [Rtk-users] Need some help with Projection of 3D CT data Message-ID: hi, Im working on a CT data set using ITK.. Im trying to come up with a registration algorithm for fluoroscopy image obtained from C-Arm taken at some angle wrt to the patient and the projection of CT data taken at the same angle as that of the C-arm.. i need to change the angles of projection and the focal length of the source from time to time for my study.. I was wondering if i could do that using RTK? If yes, could you tell me where I find information that is relevant to my problem..Thank you Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Oct 15 05:11:00 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:11:00 +0200 Subject: [Rtk-users] Varian reconstruction question In-Reply-To: References: Message-ID: Hi Dave, Regarding the parameters (I-zero, wpc, scatter etc), we still need to create wiki pages to describe this (as agreed on during the Jul 31 meeting ). In the meantime, you'll find some info in each filter documentation. You can go to the projection pre-processing filter , look at the (complex) clickable graph and try to navigate in it. For example, I0 is for the LUTbasedVariableI0RawToAttenuationImageFilter and (therefore), inapplicable to Varian data as is. I'll keep the mailing list posted when we add info to the wiki. Good luck, Simon On Thu, Oct 15, 2015 at 9:09 AM, Chao Wu wrote: > Hi Dave, > > Without the lowmem flag all projection images may be loaded into graphics > memory at once causing an out-of-memory issues. > You can also check this thread: > http://public.kitware.com/pipermail/rtk-users/2015-June/000510.html > > Regards, > Chao > > 2015-10-14 22:27 GMT+02:00 sco user : > >> Hi >> >> I'm a new user to RTK. >> I've been able to perform reconstructions of the Catphan and my own >> copies of Varian CBCT images with some success. I enabled the CUDA flags >> when making RTK so as to take advantage of the capabilities of my GPU. >> >> When I use --hardware="cuda" with the rtkfdk application, I have found >> that I must specify the lowmem option in order to get the reconstruction to >> run successfully. If I don't use lowmem, I get the following error: >> >> #### >> Reconstructing and writing... >> /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h:55 @ >> unknown : Cuda Error : out of memory >> >> ExceptionObject caught with writer->Update() in file >> /home/dave/RTK/applications/rtkfdk/rtkfdk.cxx line 238 >> >> itk::ExceptionObject (0x18e3460) >> Location: "unknown" >> File: /home/dave/RTK/utilities/ITKCudaCommon/include/itkCudaDataManager.h >> Line: 55 >> Description: Cuda Error : out of memory >> #### >> >> I take from this that I'm out of memory on the GPU. Is that correct? The >> GPU has 2Gb of memory. Can anyone tell me what the minimum memory should be >> in order to get a typical Varian reconstruction to run without the lowmem >> option. >> >> On a side note, I know that the cuda option is working because it's a lot >> quicker than hardware="cpu", despite only having 96 cuda cores. >> >> >> Another question I'd like to ask is if anyone can shed some light on >> useful values for I-zero, wpc, scatter etc. >> >> With thanks in advance, >> Dave. >> >> >> _______________________________________________ >> 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 Thu Oct 15 05:33:42 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:33:42 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Yes, RTK can certainly do things like that. Start with a simple geometry following the example Forward projection of the wiki and maybe come back to us with more precise questions? Good luck, Simon On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: > hi, > Im working on a CT data set using ITK.. Im trying to come up with a > registration algorithm for fluoroscopy image obtained from C-Arm taken at > some angle wrt to the patient and the projection of CT data taken at the > same angle as that of the C-arm.. i need to change the angles of projection > and the focal length of the source from time to time for my study.. I was > wondering if i could do that using RTK? If yes, could you tell me where I > find information that is relevant to my problem..Thank you > Regards > > _______________________________________________ > Rtk-users mailing 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 Oct 15 05:49:16 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 11:49:16 +0200 Subject: [Rtk-users] Need some help with Projection of 3D CT data In-Reply-To: References: Message-ID: Hi, Please stick to the mailing list. That's exactly what I understood and my previous answer is still valid. Simon On Thu, Oct 15, 2015 at 11:47 AM, vishal k wrote: > hi Simon, > Thanks for ur advice..sorry i couldn't explain it properly...here my > problem explained in detail.. I have to register 3D ct data with > Fluoroscopy image obtained during surgery.. the problem is that they use > different co-ordinate systems.. I thought since i can obtained the C arm > position using the DICOM tags (source to patient distance etc), i could use > these positions values to obtain forward projection of the CT data.. after > doing this I feel my registering the forward projection image and the > actual fluoroscopy image(obtained during the surgery) would be easier...Please > advice me if there is any better way to deal this problem.. > Regards > Vishal > > On Thu, Oct 15, 2015 at 3:03 PM, Simon Rit > wrote: > >> Yes, RTK can certainly do things like that. Start with a simple geometry >> following the example Forward projection >> of the >> wiki and maybe come back to us with more >> precise questions? >> Good luck, >> Simon >> >> On Thu, Oct 15, 2015 at 9:52 AM, vishal k wrote: >> >>> hi, >>> Im working on a CT data set using ITK.. Im trying to come up with a >>> registration algorithm for fluoroscopy image obtained from C-Arm taken at >>> some angle wrt to the patient and the projection of CT data taken at the >>> same angle as that of the C-arm.. i need to change the angles of projection >>> and the focal length of the source from time to time for my study.. I was >>> wondering if i could do that using RTK? If yes, could you tell me where I >>> find information that is relevant to my problem..Thank you >>> Regards >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnthibault at gmail.com Thu Oct 15 07:55:17 2015 From: gnthibault at gmail.com (Notargiacomo Thibault) Date: Thu, 15 Oct 2015 13:55:17 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Thank you very much Simon for this advice, I should have read more carefully the recent posts about FFTWF / FFTWD. Now that Itk has been rebuilt using these flags, I no longer experience the previous problem. Unfortunately, when reconstructing with the CPU version of FDK, it seems that, although Ramp filtering and backprojection now do work very well, I still have issues with the weighting filter of FDK. As I am not familiar with analytic reconstruction methods, I don't know if the geometric parameters that are generated by the import method of Reg23ProjectionGeometry are consistant with the high variability of the gain factor applied to my projection by FDKWeightProjectionFilter: Just a short example: When using the following geometric parameters: SrcToCenter -1045.84 SrcToDet -1261.02 srcOffX 6.56918 srcOffY 6.56918 ProjOffX -151.44 ProjOffY -151.44 => FDKWeighting filter outputs an image that has a mean of -1.518 with a standard deviation of 2.056 with minimum value of -6.130 and maximum value of 1.871 On a frame where the source offset seems to be a little bit lower, I have the following gemetric parameters: SrcToCenter -1042.66 SrcToDet -1257.4 srcOffX 1.25469 srcOffY 1.25469 ProjOffX -150.321 ProjOffY -150.321 => FDKWeighting filter outputs an image that has a mean of -4.279E-4 with a standard deviation of 5.786E-4 with minimum value of -0.005 and maximum value of 5.268E-4 For comparison, our attenuation images in input of FDK have a mean of 0.8 with a standard deviation of 1.09 with minimum value of -1 and maximum value of 3.262. Here the negative values of attenuation arise from a problem while approximating the I0 in our images, although we should work on that problem, it was not that critical in SART reconstruction. I am surprised by such an important difference in gain applied to projection, given that, when disabling manually this weighting filter in RTK code, RampFiltering and BackProjection alone provided visually good reconstruction results. If you have any idea of what could have gone wrong in the process of importing geometry and/or applying weighting filter, I would be glad to hear it. Thank you in advance. Kind regards Thibault Notargiacomo 2015-10-14 18:58 GMT+02:00 Simon Rit : > Hi Thibault, > No, there is not really a log system that would allow you debugging at run > time. You can compile a debug version that would enable a lot of messages > related to the pipeline. For this, I think you need to use NDEBUG at > compilation (it's an ITK mechanism that I never use). > No, it's not normal that you see an error message. There are two things: > - the FFT of itk (compiled by default, based on vnl) is really bad IMO: it > only handles power of 2/3/5 dimensions and it's slow. I always advise > people to use FFTW by turning on ITK_USE_FFTW options during ITK's > compilation. > - I don't fully understand why vnl doesn't work either. I understand the > first two dimensions, for vnl (which I strongly suggest to not use), I pad > to the next power of 2 so > 780 * 2 (for zero padding) -> 2048 > 780 -> 1024 > but then, if you use 64 projections, why 11? Are you sure the second input > image to FDKConeBeamReconstructionImageFilter has the dimension you want? I > would try to connect input 2 to an itk::ImageFileWriter and check what are > the dimensions of this image. If you're absolutely sure, then I'll try to > reproduce and fix the issue. > Simon > > On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < > gnthibault at gmail.com> wrote: > >> Dear all, >> >> I recently had troubles while trying to rewrite my code, linked with >> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >> well, to using fdk reconstruction method. >> >> My first question: is there a general way to enable maximum debug log >> level at runtime in rtk ? >> >> My second question, is more specific: is it normal that I see such error >> message coming from itk when using FDKConeBeamReconstructionFilter : >> >> ExceptionObject caught with fdk->Update() in file [...] >> >> itk::ExceptionObject (0x7f377c020cb0) >> Location: "unknown" >> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >> Line: 416 >> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >> during SingleMethodExecute >> >> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >> Cannot compute FFT of image with size [2048, 1024, 11]. >> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >> size in each dimension has a prime factorization consisting of only 2s, 3s, >> or 5s. >> >> I suppose that this error arise while performing ramp filtering, but I >> see no relation between FFT configuration stated in the error log ( [2048, >> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >> projections. >> >> I also tried with 200 projection and I had the same problem, but with >> [2048, 1024, 34] >> >> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >> to the total number of projection in my dataset every time. >> >> The revision I am currently using: >> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >> Merge: 578cf89 09d820c >> >> >> Thank you in advance for your help. >> >> Regards >> >> Thibault Notargiacomo >> >> _______________________________________________ >> Rtk-users mailing 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 Oct 15 10:50:30 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 15 Oct 2015 16:50:30 +0200 Subject: [Rtk-users] Problem with itk 4.8.1 when using rtk::FDKConeBeamReconstructionFilter In-Reply-To: References: Message-ID: Interesting... I never used a geometry with negative sdd and sid but that's the issue here in my opinion. I did a quick test with positive and negative sdd/sid and that does not work for me either. Can you make them positive somehow? BTW, do you still use a modified version of the reg23 and can you share it? Thanks, Simon PS: the script I used for the test: rtksimulatedgeometry \ -o g \ -n 360 \ --sdd 1500 \ --sid 1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o pos.mha -g g rtksimulatedgeometry \ -o g \ -n 360 \ --sdd -1500 \ --sid -1000 rtkprojectshepploganphantom \ -g g \ -o p.mha \ --dimension 256,3,256 \ --spacing 2 rtkfdk -p . -r ^p.mha$ -o neg.mha -g g On Thu, Oct 15, 2015 at 1:55 PM, Notargiacomo Thibault wrote: > Thank you very much Simon for this advice, I should have read more > carefully the recent posts about FFTWF / FFTWD. > > Now that Itk has been rebuilt using these flags, I no longer experience > the previous problem. > Unfortunately, when reconstructing with the CPU version of FDK, it seems > that, although Ramp filtering and backprojection now do work very well, I > still have issues with the weighting filter of FDK. > > As I am not familiar with analytic reconstruction methods, I don't know if > the geometric parameters that are generated by the import method of > Reg23ProjectionGeometry are consistant with the high variability of the > gain factor applied to my projection by FDKWeightProjectionFilter: > > Just a short example: > When using the following geometric parameters: > > SrcToCenter -1045.84 > SrcToDet -1261.02 > srcOffX 6.56918 > srcOffY 6.56918 > ProjOffX -151.44 > ProjOffY -151.44 > > => FDKWeighting filter outputs an image that has a mean of -1.518 with a > standard deviation of 2.056 with minimum value of -6.130 and maximum > value of 1.871 > > > On a frame where the source offset seems to be a little bit lower, I have > the following gemetric parameters: > > SrcToCenter -1042.66 > SrcToDet -1257.4 > srcOffX 1.25469 > srcOffY 1.25469 > ProjOffX -150.321 > ProjOffY -150.321 > > => FDKWeighting filter outputs an image that has a mean of -4.279E-4 > with a standard deviation of 5.786E-4 with minimum value of -0.005 and > maximum value of 5.268E-4 > > For comparison, our attenuation images in input of FDK have a mean of 0.8 > with a standard deviation of 1.09 with minimum value of -1 and maximum > value of 3.262. > > Here the negative values of attenuation arise from a problem while > approximating the I0 in our images, although we should work on that > problem, it was not that critical in SART reconstruction. > > I am surprised by such an important difference in gain applied to > projection, given that, when disabling manually this weighting filter in > RTK code, RampFiltering and BackProjection alone provided visually good > reconstruction results. > > If you have any idea of what could have gone wrong in the process of > importing geometry and/or applying weighting filter, I would be glad to > hear it. > > Thank you in advance. > > Kind regards > > Thibault Notargiacomo > > > > > > > > > 2015-10-14 18:58 GMT+02:00 Simon Rit : > >> Hi Thibault, >> No, there is not really a log system that would allow you debugging at >> run time. You can compile a debug version that would enable a lot of >> messages related to the pipeline. For this, I think you need to use NDEBUG >> at compilation (it's an ITK mechanism that I never use). >> No, it's not normal that you see an error message. There are two things: >> - the FFT of itk (compiled by default, based on vnl) is really bad IMO: >> it only handles power of 2/3/5 dimensions and it's slow. I always advise >> people to use FFTW by turning on ITK_USE_FFTW options during ITK's >> compilation. >> - I don't fully understand why vnl doesn't work either. I understand the >> first two dimensions, for vnl (which I strongly suggest to not use), I pad >> to the next power of 2 so >> 780 * 2 (for zero padding) -> 2048 >> 780 -> 1024 >> but then, if you use 64 projections, why 11? Are you sure the second >> input image to FDKConeBeamReconstructionImageFilter has the dimension you >> want? I would try to connect input 2 to an itk::ImageFileWriter and check >> what are the dimensions of this image. If you're absolutely sure, then I'll >> try to reproduce and fix the issue. >> Simon >> >> On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault < >> gnthibault at gmail.com> wrote: >> >>> Dear all, >>> >>> I recently had troubles while trying to rewrite my code, linked with >>> libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite >>> well, to using fdk reconstruction method. >>> >>> My first question: is there a general way to enable maximum debug log >>> level at runtime in rtk ? >>> >>> My second question, is more specific: is it normal that I see such error >>> message coming from itk when using FDKConeBeamReconstructionFilter : >>> >>> ExceptionObject caught with fdk->Update() in file [...] >>> >>> itk::ExceptionObject (0x7f377c020cb0) >>> Location: "unknown" >>> File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx >>> Line: 416 >>> Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred >>> during SingleMethodExecute >>> >>> /usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60: >>> itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): >>> Cannot compute FFT of image with size [2048, 1024, 11]. >>> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose >>> size in each dimension has a prime factorization consisting of only 2s, 3s, >>> or 5s. >>> >>> I suppose that this error arise while performing ramp filtering, but I >>> see no relation between FFT configuration stated in the error log ( [2048, >>> 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 >>> projections. >>> >>> I also tried with 200 projection and I had the same problem, but with >>> [2048, 1024, 34] >>> >>> Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize >>> to the total number of projection in my dataset every time. >>> >>> The revision I am currently using: >>> commit 4993ddfca5b3d59a2fcf71f94890036ede610a08 >>> Merge: 578cf89 09d820c >>> >>> >>> Thank you in advance for your help. >>> >>> Regards >>> >>> Thibault Notargiacomo >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 03:12:36 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 09:12:36 +0200 Subject: [Rtk-users] Question about the geometry Message-ID: Dear all. Hello again. I writing to you again because I need some help to understand how to declare the geometry of the system. Cyril redirected me towards this document ( http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a lot, but unfortunately it has not been enough to make me reconstruct a tomogram. I have attached a drawing of my setup (setup.jpg). The source-to-detector distance is around 1600 mm. I just rotate the sample instead of the source, and the sample-detector distance is 15 cm which makes the isocenter distance 1450. The field of view is around 2 cm. The aligned projections are located here: https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 and the raw tiffs are here: https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 I would say the input data looks as nice, but when reconstructing I'm still just getting noise: This is how I perform my "reconstruction" # 361 projections from 0 to 360 degrees. The source-detector distance is 1.6 m and the # sample-detector distance is 15 cm # I have tried with many variations of --ssd and --sid but I think they all look the same rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o c:\Work\out_dir\geometry_real.xml # make a mha file out of the tiff files rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output c:\Work\out_dir\cylinder-a.mha --regexp .tif # "Reconstruct" the data. rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 The result can be viewed in the recon_result.PNG attachment. The reconstrcution can be found here: https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 Can someone please help me what I am doing wrong? best Arvid -------------- next part -------------- A non-text attachment was scrubbed... Name: setup.jpg Type: image/jpeg Size: 29527 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: recon_result.PNG Type: image/png Size: 239196 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 06:09:04 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 12:09:04 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Is the origin and spacing of your projection data correct? What is your projection pixel size? Regards, Chao 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger : > Dear all. Hello again. > > I writing to you again because I need some help to understand how to > declare the geometry of the system. > > Cyril redirected me towards this document ( > http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > lot, but unfortunately it has not been enough to make me reconstruct a > tomogram. > > I have attached a drawing of my setup (setup.jpg). The > source-to-detector distance is around 1600 mm. I just rotate the > sample instead of the source, and the sample-detector distance is 15 > cm which makes the isocenter distance 1450. The field of view is > around 2 cm. > > The aligned projections are located here: > https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > and the raw tiffs are here: > https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > > I would say the input data looks as nice, but when reconstructing I'm > still just getting noise: > > This is how I perform my "reconstruction" > > # 361 projections from 0 to 360 degrees. The source-detector distance > is 1.6 m and the > # sample-detector distance is 15 cm > # I have tried with many variations of --ssd and --sid but I think > they all look the same > rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > c:\Work\out_dir\geometry_real.xml > > # make a mha file out of the tiff files > rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > c:\Work\out_dir\cylinder-a.mha --regexp .tif > > # "Reconstruct" the data. > rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha -g > c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > > The result can be viewed in the recon_result.PNG attachment. > The reconstrcution can be found here: > https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > > Can someone please help me what I am doing wrong? > > best > > Arvid > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bottiger at gmail.com Fri Oct 16 07:15:25 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 13:15:25 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao. Thank you for the reply. However, I'm not quite sure what you mean by origin and spacing. A pixel on the detector is ~200 microns, and the sample is magnified around 1.3 times. I do understand that having a correct geometry is important to get an output image with correct dimensions, but I do not understand it's so difficult for me to make a single successful reconstruction (possibly with a dummy geometry). best Arvid PS: Just to validate the data I'm testing on I installed Octave and created a sinogram I then ran through its iradon implementation. It seemed to work quite nicely (see attachments). On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > Hi Arvid, > > Is the origin and spacing of your projection data correct? What is your > projection pixel size? > > Regards, Chao > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > : >> >> Dear all. Hello again. >> >> I writing to you again because I need some help to understand how to >> declare the geometry of the system. >> >> Cyril redirected me towards this document ( >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> lot, but unfortunately it has not been enough to make me reconstruct a >> tomogram. >> >> I have attached a drawing of my setup (setup.jpg). The >> source-to-detector distance is around 1600 mm. I just rotate the >> sample instead of the source, and the sample-detector distance is 15 >> cm which makes the isocenter distance 1450. The field of view is >> around 2 cm. >> >> The aligned projections are located here: >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> and the raw tiffs are here: >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> I would say the input data looks as nice, but when reconstructing I'm >> still just getting noise: >> >> This is how I perform my "reconstruction" >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> is 1.6 m and the >> # sample-detector distance is 15 cm >> # I have tried with many variations of --ssd and --sid but I think >> they all look the same >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> c:\Work\out_dir\geometry_real.xml >> >> # make a mha file out of the tiff files >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> # "Reconstruct" the data. >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> The result can be viewed in the recon_result.PNG attachment. >> The reconstrcution can be found here: >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> Can someone please help me what I am doing wrong? >> >> best >> >> Arvid >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: Capture.JPG Type: image/jpeg Size: 58155 bytes Desc: not available URL: From wuchao04 at gmail.com Fri Oct 16 08:03:16 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Fri, 16 Oct 2015 14:03:16 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Arvid, Since you know how important a correct geometry is, you should understand why you need projection origin and spacing. CT geometry has more parameters than sid and sdd. How big the detector pixel size (spacing) and how the detector is places w.r.t. the central ray (origin) also play a role in the geometry. And in-plane/out-of-plane rotations etc. In your dataset the correct spacing and origin information is not stored correctly in the projection data, so the total geometry is wrong. I have tested your data with the following command line and it gives meaningful image. The newspacing and neworigin arguments force rtkfdk to accept spacing and origin information of projections from command line instead of from the data. Also I change the spacing of the volume from 2 to 0.2 because your object is small. rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 Apparently there is still some misalignment between this guessed geometry and the real geometry, which you need to figure out with your own hardware. Regards, Chao 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Hi Chao. > > Thank you for the reply. However, I'm not quite sure what you mean by > origin and spacing. > A pixel on the detector is ~200 microns, and the sample is magnified > around 1.3 times. > > I do understand that having a correct geometry is important to get an > output image with correct dimensions, but I do not understand it's so > difficult for me to make a single successful reconstruction (possibly > with a dummy geometry). > > best > > Arvid > > PS: Just to validate the data I'm testing on I installed Octave and > created a sinogram I then ran through its iradon implementation. It > seemed to work quite nicely (see attachments). > > On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > > Hi Arvid, > > > > Is the origin and spacing of your projection data correct? What is your > > projection pixel size? > > > > Regards, Chao > > > > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Dear all. Hello again. > >> > >> I writing to you again because I need some help to understand how to > >> declare the geometry of the system. > >> > >> Cyril redirected me towards this document ( > >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> lot, but unfortunately it has not been enough to make me reconstruct a > >> tomogram. > >> > >> I have attached a drawing of my setup (setup.jpg). The > >> source-to-detector distance is around 1600 mm. I just rotate the > >> sample instead of the source, and the sample-detector distance is 15 > >> cm which makes the isocenter distance 1450. The field of view is > >> around 2 cm. > >> > >> The aligned projections are located here: > >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> and the raw tiffs are here: > >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> > >> I would say the input data looks as nice, but when reconstructing I'm > >> still just getting noise: > >> > >> This is how I perform my "reconstruction" > >> > >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> is 1.6 m and the > >> # sample-detector distance is 15 cm > >> # I have tried with many variations of --ssd and --sid but I think > >> they all look the same > >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> c:\Work\out_dir\geometry_real.xml > >> > >> # make a mha file out of the tiff files > >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> > >> # "Reconstruct" the data. > >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> > >> The result can be viewed in the recon_result.PNG attachment. > >> The reconstrcution can be found here: > >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> > >> Can someone please help me what I am doing wrong? > >> > >> best > >> > >> Arvid > >> > >> _______________________________________________ > >> Rtk-users mailing 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 Fri Oct 16 08:15:43 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 16 Oct 2015 14:15:43 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Thanks a lot Chao, I'm so glad that someone else than me did this! Just as a side note, Arvid, if you don't understand what is the origin and the spacing, look at the ITK software guide section 4.1.4, this is VERY important. Simon On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > Hi Arvid, > > Since you know how important a correct geometry is, you should understand > why you need projection origin and spacing. > CT geometry has more parameters than sid and sdd. How big the detector > pixel size (spacing) and how the detector is places w.r.t. the central ray > (origin) also play a role in the geometry. And in-plane/out-of-plane > rotations etc. > In your dataset the correct spacing and origin information is not stored > correctly in the projection data, so the total geometry is wrong. > > I have tested your data with the following command line and it gives > meaningful image. The newspacing and neworigin arguments force rtkfdk to > accept spacing and origin information of projections from command line > instead of from the data. Also I change the spacing of the volume from 2 to > 0.2 because your object is small. > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > c:\Work\out_dir\cylinder_a_recon.mha > -g c:\Work\out_dir\geometry_real.xml --spacing=0.2 --dimension=256 > --newspacing=0.2 --neworigin=-20,-20 > > Apparently there is still some misalignment between this guessed geometry > and the real geometry, which you need to figure out with your own hardware. > > Regards, > Chao > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger < > bottiger at gmail.com>: > >> Hi Chao. >> >> Thank you for the reply. However, I'm not quite sure what you mean by >> origin and spacing. >> A pixel on the detector is ~200 microns, and the sample is magnified >> around 1.3 times. >> >> I do understand that having a correct geometry is important to get an >> output image with correct dimensions, but I do not understand it's so >> difficult for me to make a single successful reconstruction (possibly >> with a dummy geometry). >> >> best >> >> Arvid >> >> PS: Just to validate the data I'm testing on I installed Octave and >> created a sinogram I then ran through its iradon implementation. It >> seemed to work quite nicely (see attachments). >> >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >> > Hi Arvid, >> > >> > Is the origin and spacing of your projection data correct? What is your >> > projection pixel size? >> > >> > Regards, Chao >> > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> > : >> >> >> >> Dear all. Hello again. >> >> >> >> I writing to you again because I need some help to understand how to >> >> declare the geometry of the system. >> >> >> >> Cyril redirected me towards this document ( >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >> >> lot, but unfortunately it has not been enough to make me reconstruct a >> >> tomogram. >> >> >> >> I have attached a drawing of my setup (setup.jpg). The >> >> source-to-detector distance is around 1600 mm. I just rotate the >> >> sample instead of the source, and the sample-detector distance is 15 >> >> cm which makes the isocenter distance 1450. The field of view is >> >> around 2 cm. >> >> >> >> The aligned projections are located here: >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >> >> and the raw tiffs are here: >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >> >> >> >> I would say the input data looks as nice, but when reconstructing I'm >> >> still just getting noise: >> >> >> >> This is how I perform my "reconstruction" >> >> >> >> # 361 projections from 0 to 360 degrees. The source-detector distance >> >> is 1.6 m and the >> >> # sample-detector distance is 15 cm >> >> # I have tried with many variations of --ssd and --sid but I think >> >> they all look the same >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >> >> c:\Work\out_dir\geometry_real.xml >> >> >> >> # make a mha file out of the tiff files >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >> >> >> >> # "Reconstruct" the data. >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >> >> c:\Work\out_dir\cylinder_a_recon.mha -g >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >> >> >> >> The result can be viewed in the recon_result.PNG attachment. >> >> The reconstrcution can be found here: >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >> >> >> >> Can someone please help me what I am doing wrong? >> >> >> >> best >> >> >> >> Arvid >> >> >> >> _______________________________________________ >> >> 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 bottiger at gmail.com Fri Oct 16 08:33:38 2015 From: bottiger at gmail.com (=?UTF-8?Q?Arvid_Piehl_Lauritsen_B=C3=B6ttiger?=) Date: Fri, 16 Oct 2015 14:33:38 +0200 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Hi Chao Wu Thank you very much! This is definitely something I can use in order to move forward. I'm not trying to make the best possible reconstruction out of this dataset, but just have something that works so I can start playing around and get familiar with RTK. Which I do have now. And to Simon: Thanks for the link. bets Arvid On Fri, Oct 16, 2015 at 2:15 PM, Simon Rit wrote: > Thanks a lot Chao, I'm so glad that someone else than me did this! > Just as a side note, Arvid, if you don't understand what is the origin and > the spacing, look at the ITK software guide section 4.1.4, this is VERY > important. > Simon > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: >> >> Hi Arvid, >> >> Since you know how important a correct geometry is, you should understand >> why you need projection origin and spacing. >> CT geometry has more parameters than sid and sdd. How big the detector >> pixel size (spacing) and how the detector is places w.r.t. the central ray >> (origin) also play a role in the geometry. And in-plane/out-of-plane >> rotations etc. >> In your dataset the correct spacing and origin information is not stored >> correctly in the projection data, so the total geometry is wrong. >> >> I have tested your data with the following command line and it gives >> meaningful image. The newspacing and neworigin arguments force rtkfdk to >> accept spacing and origin information of projections from command line >> instead of from the data. Also I change the spacing of the volume from 2 to >> 0.2 because your object is small. >> >> rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o >> c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml >> --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 >> >> Apparently there is still some misalignment between this guessed geometry >> and the real geometry, which you need to figure out with your own hardware. >> >> Regards, >> Chao >> >> >> 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >> : >>> >>> Hi Chao. >>> >>> Thank you for the reply. However, I'm not quite sure what you mean by >>> origin and spacing. >>> A pixel on the detector is ~200 microns, and the sample is magnified >>> around 1.3 times. >>> >>> I do understand that having a correct geometry is important to get an >>> output image with correct dimensions, but I do not understand it's so >>> difficult for me to make a single successful reconstruction (possibly >>> with a dummy geometry). >>> >>> best >>> >>> Arvid >>> >>> PS: Just to validate the data I'm testing on I installed Octave and >>> created a sinogram I then ran through its iradon implementation. It >>> seemed to work quite nicely (see attachments). >>> >>> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: >>> > Hi Arvid, >>> > >>> > Is the origin and spacing of your projection data correct? What is your >>> > projection pixel size? >>> > >>> > Regards, Chao >>> > >>> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger >>> > : >>> >> >>> >> Dear all. Hello again. >>> >> >>> >> I writing to you again because I need some help to understand how to >>> >> declare the geometry of the system. >>> >> >>> >> Cyril redirected me towards this document ( >>> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a >>> >> lot, but unfortunately it has not been enough to make me reconstruct a >>> >> tomogram. >>> >> >>> >> I have attached a drawing of my setup (setup.jpg). The >>> >> source-to-detector distance is around 1600 mm. I just rotate the >>> >> sample instead of the source, and the sample-detector distance is 15 >>> >> cm which makes the isocenter distance 1450. The field of view is >>> >> around 2 cm. >>> >> >>> >> The aligned projections are located here: >>> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 >>> >> and the raw tiffs are here: >>> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 >>> >> >>> >> I would say the input data looks as nice, but when reconstructing I'm >>> >> still just getting noise: >>> >> >>> >> This is how I perform my "reconstruction" >>> >> >>> >> # 361 projections from 0 to 360 degrees. The source-detector distance >>> >> is 1.6 m and the >>> >> # sample-detector distance is 15 cm >>> >> # I have tried with many variations of --ssd and --sid but I think >>> >> they all look the same >>> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o >>> >> c:\Work\out_dir\geometry_real.xml >>> >> >>> >> # make a mha file out of the tiff files >>> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output >>> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif >>> >> >>> >> # "Reconstruct" the data. >>> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o >>> >> c:\Work\out_dir\cylinder_a_recon.mha -g >>> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 >>> >> >>> >> The result can be viewed in the recon_result.PNG attachment. >>> >> The reconstrcution can be found here: >>> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 >>> >> >>> >> Can someone please help me what I am doing wrong? >>> >> >>> >> best >>> >> >>> >> Arvid >>> >> >>> >> _______________________________________________ >>> >> 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 simon.rit at creatis.insa-lyon.fr Tue Oct 20 14:38:24 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 20 Oct 2015 20:38:24 +0200 Subject: [Rtk-users] using RTK with projection matrices and projection images In-Reply-To: References: Message-ID: Dear Shiras Abdurahman, It's better to email the mailing so that everybody can participate our discussion. We developped a tool to do this a while ago but it's never made it to the public repo. I have enclosed it if you want to have a look but it does what you want I think. The part of interest for you is how the variable matProj is converted to an RTK geometry. We'll try to clean it and push it to the main repo in November if you can't figure out how to use it. Good luck! Simon On Tue, Oct 20, 2015 at 5:07 PM, shiras abdurahman < shiras.abdurahman at gmail.com> wrote: > Dear Dr. Rit, > > My name is Shiras Abdurahman and I am a PhD student at ovgu Magdeburg, > Germany. Currently, I am working in tomographic reconstruction and I > started to using RTK. I have projection images and corresponding projection > matrices. I want to reconstruct volume with RTK. Is it possible to set > projection matrices directly and reconstruct the volume. Or do I need to > decompose first and get intrinsic and extrinsic parameters especially > rotation angles and use addProjection function? > I know that geometry can be read from xml file. > > Thank you for your time and patience. > > With regards, > Shiras Abdurahman > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rtkthales.cxx Type: text/x-c++src Size: 9360 bytes Desc: not available URL: From wuchao04 at gmail.com Mon Oct 26 16:30:58 2015 From: wuchao04 at gmail.com (Chao Wu) Date: Mon, 26 Oct 2015 21:30:58 +0100 Subject: [Rtk-users] Question about the geometry In-Reply-To: References: Message-ID: Well, that's just some guess. I assume the central ray goes towards the center of your detector, so the origin should be denoted as somewhere near (- half_width, - half_height) in millimeter. Then I just fine-tune it manually a little bit to get a little bit better results... Regards, Chao 2015-10-26 19:44 GMT+01:00 Arvid Piehl Lauritsen B?ttiger < bottiger at gmail.com>: > Dear Chao. > > I am very thankful for the help you provided me some days ago on the > RTK mailing list. However, I have a quick followup question for you, > which I have not been able to learn by reading the (very long) manual > another user provided me with. > > I am now working on another dataset, and get similar artifact when > reconstructing. Could you please help understand why you picked the > parameters you did? I guess the "spacing" is pixel size, but why did > why you pick "neworigin" to be -20,-20 ? > > best > > Arvid > > > On Fri, Oct 16, 2015 at 2:03 PM, Chao Wu wrote: > > Hi Arvid, > > > > Since you know how important a correct geometry is, you should understand > > why you need projection origin and spacing. > > CT geometry has more parameters than sid and sdd. How big the detector > pixel > > size (spacing) and how the detector is places w.r.t. the central ray > > (origin) also play a role in the geometry. And in-plane/out-of-plane > > rotations etc. > > In your dataset the correct spacing and origin information is not stored > > correctly in the projection data, so the total geometry is wrong. > > > > I have tested your data with the following command line and it gives > > meaningful image. The newspacing and neworigin arguments force rtkfdk to > > accept spacing and origin information of projections from command line > > instead of from the data. Also I change the spacing of the volume from 2 > to > > 0.2 because your object is small. > > > > rtkfdk -p c:\Work\out_dir\ -r cylinder-a.mha -o > > c:\Work\out_dir\cylinder_a_recon.mha -g c:\Work\out_dir\geometry_real.xml > > --spacing=0.2 --dimension=256 --newspacing=0.2 --neworigin=-20,-20 > > > > Apparently there is still some misalignment between this guessed geometry > > and the real geometry, which you need to figure out with your own > hardware. > > > > Regards, > > Chao > > > > > > 2015-10-16 13:15 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > > : > >> > >> Hi Chao. > >> > >> Thank you for the reply. However, I'm not quite sure what you mean by > >> origin and spacing. > >> A pixel on the detector is ~200 microns, and the sample is magnified > >> around 1.3 times. > >> > >> I do understand that having a correct geometry is important to get an > >> output image with correct dimensions, but I do not understand it's so > >> difficult for me to make a single successful reconstruction (possibly > >> with a dummy geometry). > >> > >> best > >> > >> Arvid > >> > >> PS: Just to validate the data I'm testing on I installed Octave and > >> created a sinogram I then ran through its iradon implementation. It > >> seemed to work quite nicely (see attachments). > >> > >> On Fri, Oct 16, 2015 at 12:09 PM, Chao Wu wrote: > >> > Hi Arvid, > >> > > >> > Is the origin and spacing of your projection data correct? What is > your > >> > projection pixel size? > >> > > >> > Regards, Chao > >> > > >> > 2015-10-16 9:12 GMT+02:00 Arvid Piehl Lauritsen B?ttiger > >> > : > >> >> > >> >> Dear all. Hello again. > >> >> > >> >> I writing to you again because I need some help to understand how to > >> >> declare the geometry of the system. > >> >> > >> >> Cyril redirected me towards this document ( > >> >> http://www.creatis.insa-lyon.fr/~srit/geometry.pdf ) which helped a > >> >> lot, but unfortunately it has not been enough to make me reconstruct > a > >> >> tomogram. > >> >> > >> >> I have attached a drawing of my setup (setup.jpg). The > >> >> source-to-detector distance is around 1600 mm. I just rotate the > >> >> sample instead of the source, and the sample-detector distance is 15 > >> >> cm which makes the isocenter distance 1450. The field of view is > >> >> around 2 cm. > >> >> > >> >> The aligned projections are located here: > >> >> https://www.dropbox.com/s/ycg41qkeym61kec/cylinder-a.mha?dl=0 > >> >> and the raw tiffs are here: > >> >> https://www.dropbox.com/s/hb67pkueyb3zcc3/tiffs.zip?dl=0 > >> >> > >> >> I would say the input data looks as nice, but when reconstructing I'm > >> >> still just getting noise: > >> >> > >> >> This is how I perform my "reconstruction" > >> >> > >> >> # 361 projections from 0 to 360 degrees. The source-detector distance > >> >> is 1.6 m and the > >> >> # sample-detector distance is 15 cm > >> >> # I have tried with many variations of --ssd and --sid but I think > >> >> they all look the same > >> >> rtksimulatedgeometry.exe -f 0 -n 361 -a 360 --sdd 1600 --sid 1450 -o > >> >> c:\Work\out_dir\geometry_real.xml > >> >> > >> >> # make a mha file out of the tiff files > >> >> rtkprojections.exe --path c:\Work\tomography_data\tiffs\ --output > >> >> c:\Work\out_dir\cylinder-a.mha --regexp .tif > >> >> > >> >> # "Reconstruct" the data. > >> >> rtkfdk.exe -p c:\Work\out_dir\ -r cylinder-a.mha -o > >> >> c:\Work\out_dir\cylinder_a_recon.mha -g > >> >> c:\Work\out_dir\geometry_real.xml --spacing 2 --dimension 256 > >> >> > >> >> The result can be viewed in the recon_result.PNG attachment. > >> >> The reconstrcution can be found here: > >> >> https://www.dropbox.com/s/cbwwnbbzvhqiyvy/cylinder_a_recon.mha?dl=0 > >> >> > >> >> Can someone please help me what I am doing wrong? > >> >> > >> >> best > >> >> > >> >> Arvid > >> >> > >> >> _______________________________________________ > >> >> Rtk-users mailing 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 Wed Oct 28 11:47:13 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Wed, 28 Oct 2015 16:47:13 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter Message-ID: <5630EE01.5070900@cppm.in2p3.fr> Hello everyone, I have a question/suggestion about the set of rtkDraw*ImageFilter. This filter are written as additive filters: for example, in rtkDrawEllipsoidImageFilter.txx, we can find for(..) itOut.Set( ellipsoid.density + itIn.Get() ) instead of for(..) itOut.Set( ellipsoid.density ) I think it can be more flexible the second option, because we can always associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. Moreover, the rtkDrawGeometricPhantomImageFilter class already uses itkAddImageFilter in order to have additive filters (which is redundant in current situation). What do you think ? Regards From shiraska at gmail.com Wed Oct 28 13:12:36 2015 From: shiraska at gmail.com (Shiras Abdurahman) Date: Wed, 28 Oct 2015 18:12:36 +0100 Subject: [Rtk-users] Filtered projection images Message-ID: Hi, I want to access processed projections especially filtered projections which are used for backprojection. Is it possible in RTK? Shiras -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Oct 28 15:52:10 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:52:10 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: <5630EE01.5070900@cppm.in2p3.fr> References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: Hi Mathieu, Thanks for pointing this out. I agree that it might not be the best solution, yet one could argue that you could simply create a constant image with 0 to do what you'd like from the current implementation. My main problem is that I just tried to do what you suggest and some tests then fail... which shows the obvious, it's not a backward compatible change. I see two solutions: - keep it as is and you use ConstantImageFilter + we remove useless add filters, - a more complex but maybe more elegant solution: add a third template parameter for the operation that would allow the user to do what he'd like in a functor. That's what's done with filters that derive from itk::UnaryImageFilter . The default would be itk::Add2 but we could find or implement another one that simply discards the pixel value. What do you think? Simon PS: looking in the code, I just found that rtk::DrawConeImageFilter is not consistent with the others, it was always setting to 0 outside... that's been fixed! On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont wrote: > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. This > filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can always > associate Draw*ImageFilter and itkAddImageFilter to get an additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is redundant in > current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > Rtk-users mailing 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 Oct 28 15:53:25 2015 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Oct 2015 20:53:25 +0100 Subject: [Rtk-users] Filtered projection images In-Reply-To: References: Message-ID: Hi, I guess you mean filtered projections that are used in filtered backprojections algorithm? The filter you are looking for is rtk::FFTRampImageFilter which implements the ramp filter. There is a command line tool that can do it, rtkramp. Regards, Simon On Wed, Oct 28, 2015 at 6:12 PM, Shiras Abdurahman wrote: > Hi, > > I want to access processed projections especially filtered projections > which are used for backprojection. Is it possible in RTK? > > Shiras > > _______________________________________________ > Rtk-users mailing 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 Fri Oct 30 06:56:50 2015 From: mdupont at cppm.in2p3.fr (Mathieu Dupont) Date: Fri, 30 Oct 2015 11:56:50 +0100 Subject: [Rtk-users] question about rtkDraw*ImageFilter In-Reply-To: References: <5630EE01.5070900@cppm.in2p3.fr> Message-ID: <56334CF2.8070902@cppm.in2p3.fr> Hi, In case of your first solution, you can not chain several Draw*ImageFilters. For example, if you want to create small cylinders in a big cylinder. Your second solution is better. One another solution can be a thing like itk:SpatialObject but more simpler. An rtk::SpatialObject which one function (isInside(point)). We create a rtkDrawImageFilter class and implement ThreadedGenerateData like this : DrawImageFilter::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType itkNotUsed(threadId) { ... while( !itOut.IsAtEnd() ) { this->GetInput()->TransformIndexToPhysicalPoint(itOut.GetIndex(), point); if(m_rtkSpatialObject.isInside(point) itOut.Set(m_rtkFillFunctor(density, itIn.Get()); ... } DrawConeImageFilter class can be a child of this new DrawImageFilter (with new methods like setAngle, SetRadius which will adjust the rtkConeSpatialObject) This solution suppress duplicated code in Draw*ImageFilter::ThreadedGenerateData and makes easier implementation of another type of filling. On 28/10/2015 20:52, Simon Rit wrote: > Hi Mathieu, > Thanks for pointing this out. I agree that it might not be the best > solution, yet one could argue that you could simply create a constant > image with 0 to do what you'd like from the current implementation. My > main problem is that I just tried to do what you suggest and some tests > then fail... which shows the obvious, it's not a backward compatible change. > I see two solutions: > - keep it as is and you use ConstantImageFilter + we remove useless add > filters, > - a more complex but maybe more elegant solution: add a third template > parameter for the operation that would allow the user to do what he'd > like in a functor. That's what's done with filters that derive from > itk::UnaryImageFilter > . > The default would be itk::Add2 but we could find or implement another > one that simply discards the pixel value. > What do you think? > Simon > > PS: looking in the code, I just found that rtk::DrawConeImageFilter is > not consistent with the others, it was always setting to 0 outside... > that's been fixed! > > On Wed, Oct 28, 2015 at 4:47 PM, Mathieu Dupont > wrote: > > Hello everyone, > > I have a question/suggestion about the set of rtkDraw*ImageFilter. > This filter are written as additive filters: for example, in > rtkDrawEllipsoidImageFilter.txx, we can find > > for(..) > itOut.Set( ellipsoid.density + itIn.Get() ) > > instead of > > for(..) > itOut.Set( ellipsoid.density ) > > > I think it can be more flexible the second option, because we can > always associate Draw*ImageFilter and itkAddImageFilter to get an > additive filter. > > Moreover, the rtkDrawGeometricPhantomImageFilter class already uses > itkAddImageFilter in order to have additive filters (which is > redundant in current situation). > > What do you think ? > > > > > > Regards > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > >