[Rtk-users] Generating signal data from Amsterdam Shroud

Simon Rit simon.rit at creatis.insa-lyon.fr
Tue Oct 6 09:11:27 EDT 2015


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 <theday79 at gmail.com> 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 <theday79 at gmail.com>
> *Cc:* Cyril Mory <cyril.mory at uclouvain.be>; 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 <theday79 at gmail.com> 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]
>
>
>
> <System used for this test>
>
> - Windows 7 64 bit
>
> - Visual Studio 2013
>
> - Cmake 3.1.0
>
> - ITK 4.8.0
>
> - CUDA v6.5
>
> - RTK: Up-to-date (revision: 3346)
>
>
>
> <Procedures>
>
>
>
> 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 <theday79 at gmail.com>; '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
> <riblettmj at mymail.vcu.edu>]
> *Sent:* Wednesday, September 30, 2015 5:01 PM
> *To:* Yang K Park <theday79 at gmail.com> <theday79 at gmail.com>
> *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 <theday79 at gmail.com> 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<class itk::Image<class
> std::complex<double>,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
> <riblettmj at mymail.vcu.edu>]
> *Sent:* Friday, September 18, 2015 6:56 PM
> *To:* Yang K Park <theday79 at gmail.com>
> *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
> <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
> <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: <http://public.kitware.com/pipermail/rtk-users/attachments/20151006/fff5164d/attachment-0010.html>


More information about the Rtk-users mailing list