From hsieandy at gmail.com Thu Nov 8 11:58:35 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 9 Nov 2012 00:58:35 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Thank you. At the moment I'm just doing something similar to what you did for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and minus the log of intensity plus one (I assume the plus one is to avoid taking the log of zero?). Another few question: 1. Are you doing any normalization after reconstruction or forward projection? Are the negative values in the reconstructed images simply a result of the ramp filtering? 2. If I want to compare a reprojection from an image reconstructed using RTK with the original projection, how should I make sure the normalization is correct? i.e. should I plus/minus or multiply the reprojected attenuation before I use exponential and make it back to intensity values? 3. The rtkforward projections doesn't seem to work correctly when I'm projecting using a geometry file containing several Projection (Angle). The output mha file seems to "repeat" after a couple of projections instead of showing all projections. I'm testing this on a Varian Half Fan geometry - it works fine if I break the geometry file down into one each for each projection angle and do the forward projection separately. I can send you a reprojection mha file if my description is unclear to you. Thanks Simon!! Cheers, Andy. 2012/10/24 Simon Rit > Hi Andy, > Yes you're right, I have actually noticed recently that but I have not > worked a lot on Varian images because we don't have a Varian CBCT in > Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that > I used to roughly check the geometry. As far as I can remember, when I > wrote this piece of code, I tried to use the same code as Plastimatch > but I could well have done it wrongly. I'm actually waiting for a new > complete Catphan acquisition from Greg to correct for this but if you > already have a patch to suggest or a set of images to send, feel free > to do it. > Thanks, > Simon > > On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: > > Hi Simon, > > > > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the > > attenuation is calculated from the projection image simply via a negative > > transformation (1-Intensity/HND_MaxIntensity). > > Is it usually the way this is done, and is there any reason for doing > this? > > I would have thought attenuation should be calculated from intensity via > > logarithm (since I=I_0 exp(-mu x)). > > Thanks!! > > > > Cheers, > > Andy > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at openrtk.org > > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Nov 9 03:03:04 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 9 Nov 2012 09:03:04 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: > Hi Simon, > > Thank you. At the moment I'm just doing something similar to what you did > for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and > minus the log of intensity plus one (I assume the plus one is to avoid > taking the log of zero?). Does it improve the results? You are welcome to share it if you feel that this is of interest for other people. > > Another few question: > 1. Are you doing any normalization after reconstruction or forward > projection? No. Assuming you have line integral of the attenuation as input of the reconstruction algorithm, you get the attenuation. Are the negative values in the reconstructed images simply a > result of the ramp filtering? Probably. You can use rtkprojections to look at what is the input of the reconstruction algorithm. > 2. If I want to compare a reprojection from an image reconstructed using RTK > with the original projection, how should I make sure the normalization is > correct? i.e. should I plus/minus or multiply the reprojected attenuation > before I use exponential and make it back to intensity values? You basically have to do the inverse formula to what you have done. An easy way of looking at what is going on with forward projections is to look at this example: http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > 3. The rtkforward projections doesn't seem to work correctly when I'm > projecting using a geometry file containing several Projection (Angle). The > output mha file seems to "repeat" after a couple of projections instead of > showing all projections. I'm testing this on a Varian Half Fan geometry - it > works fine if I break the geometry file down into one each for each > projection angle and do the forward projection separately. I can send you a > reprojection mha file if my description is unclear to you. I works for me. Would you be able to fill in a bug report (http://bug.openrtk.org/) with an example? You can generate volumes and projections with rtkdrawgeometricphantom and rtkprojectgeometricphantom. Simon > > Thanks Simon!! > > Cheers, > Andy. > > > > 2012/10/24 Simon Rit >> >> Hi Andy, >> Yes you're right, I have actually noticed recently that but I have not >> worked a lot on Varian images because we don't have a Varian CBCT in >> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> I used to roughly check the geometry. As far as I can remember, when I >> wrote this piece of code, I tried to use the same code as Plastimatch >> but I could well have done it wrongly. I'm actually waiting for a new >> complete Catphan acquisition from Greg to correct for this but if you >> already have a patch to suggest or a set of images to send, feel free >> to do it. >> Thanks, >> Simon >> >> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >> > attenuation is calculated from the projection image simply via a >> > negative >> > transformation (1-Intensity/HND_MaxIntensity). >> > Is it usually the way this is done, and is there any reason for doing >> > this? >> > I would have thought attenuation should be calculated from intensity via >> > logarithm (since I=I_0 exp(-mu x)). >> > Thanks!! >> > >> > Cheers, >> > Andy >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at openrtk.org >> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> > > > From simon.rit at creatis.insa-lyon.fr Mon Nov 19 05:37:18 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 19 Nov 2012 11:37:18 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, I have pushed a fix for the Varian raw to attenuation conversion. Let me know if it meets what you've done. I will let you know if there is any other improvement of the conversion in the future. Simon On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit wrote: > Hi Andy, > > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> Hi Simon, >> >> Thank you. At the moment I'm just doing something similar to what you did >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and >> minus the log of intensity plus one (I assume the plus one is to avoid >> taking the log of zero?). > Does it improve the results? You are welcome to share it if you feel > that this is of interest for other people. > >> >> Another few question: >> 1. Are you doing any normalization after reconstruction or forward >> projection? > No. Assuming you have line integral of the attenuation as input of the > reconstruction algorithm, you get the attenuation. > > Are the negative values in the reconstructed images simply a >> result of the ramp filtering? > Probably. You can use rtkprojections to look at what is the input of > the reconstruction algorithm. > >> 2. If I want to compare a reprojection from an image reconstructed using RTK >> with the original projection, how should I make sure the normalization is >> correct? i.e. should I plus/minus or multiply the reprojected attenuation >> before I use exponential and make it back to intensity values? > You basically have to do the inverse formula to what you have done. An > easy way of looking at what is going on with forward projections is to > look at this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> projecting using a geometry file containing several Projection (Angle). The >> output mha file seems to "repeat" after a couple of projections instead of >> showing all projections. I'm testing this on a Varian Half Fan geometry - it >> works fine if I break the geometry file down into one each for each >> projection angle and do the forward projection separately. I can send you a >> reprojection mha file if my description is unclear to you. > I works for me. Would you be able to fill in a bug report > (http://bug.openrtk.org/) with an example? You can generate volumes > and projections with rtkdrawgeometricphantom and > rtkprojectgeometricphantom. > Simon > >> >> Thanks Simon!! >> >> Cheers, >> Andy. >> >> >> >> 2012/10/24 Simon Rit >>> >>> Hi Andy, >>> Yes you're right, I have actually noticed recently that but I have not >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >>> I used to roughly check the geometry. As far as I can remember, when I >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> but I could well have done it wrongly. I'm actually waiting for a new >>> complete Catphan acquisition from Greg to correct for this but if you >>> already have a patch to suggest or a set of images to send, feel free >>> to do it. >>> Thanks, >>> Simon >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >>> > Hi Simon, >>> > >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >>> > attenuation is calculated from the projection image simply via a >>> > negative >>> > transformation (1-Intensity/HND_MaxIntensity). >>> > Is it usually the way this is done, and is there any reason for doing >>> > this? >>> > I would have thought attenuation should be calculated from intensity via >>> > logarithm (since I=I_0 exp(-mu x)). >>> > Thanks!! >>> > >>> > Cheers, >>> > Andy >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at openrtk.org >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > >> >> From hsieandy at gmail.com Fri Nov 23 06:35:22 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 23 Nov 2012 19:35:22 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Just to let you know that the code works well!! Thanks! By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know him?), and he mentioned that he's been putting quite some effort on making RTK compatible with Varian format (HNC mainly). He mentioned that for the Varian format, we usually read in the "Norm Chamber value" (It's usually around 300) from each HNC header, and calculate the CT number by log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is around 10000. I'm not too sure about the details, but I believe he will discuss it with you soon when he has time! Cheers, Andy > > > 2012/11/19 Simon Rit > >> Hi Andy, >> I have pushed a fix for the Varian raw to attenuation conversion. Let >> me know if it meets what you've done. I will let you know if there is >> any other improvement of the conversion in the future. >> Simon >> >> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >> wrote: >> > Hi Andy, >> > >> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> >> Hi Simon, >> >> >> >> Thank you. At the moment I'm just doing something similar to what you >> did >> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >> and >> >> minus the log of intensity plus one (I assume the plus one is to avoid >> >> taking the log of zero?). >> > Does it improve the results? You are welcome to share it if you feel >> > that this is of interest for other people. >> > >> >> >> >> Another few question: >> >> 1. Are you doing any normalization after reconstruction or forward >> >> projection? >> > No. Assuming you have line integral of the attenuation as input of the >> > reconstruction algorithm, you get the attenuation. >> > >> > Are the negative values in the reconstructed images simply a >> >> result of the ramp filtering? >> > Probably. You can use rtkprojections to look at what is the input of >> > the reconstruction algorithm. >> > >> >> 2. If I want to compare a reprojection from an image reconstructed >> using RTK >> >> with the original projection, how should I make sure the normalization >> is >> >> correct? i.e. should I plus/minus or multiply the reprojected >> attenuation >> >> before I use exponential and make it back to intensity values? >> > You basically have to do the inverse formula to what you have done. An >> > easy way of looking at what is going on with forward projections is to >> > look at this example: >> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >> > >> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> >> projecting using a geometry file containing several Projection >> (Angle). The >> >> output mha file seems to "repeat" after a couple of projections >> instead of >> >> showing all projections. I'm testing this on a Varian Half Fan >> geometry - it >> >> works fine if I break the geometry file down into one each for each >> >> projection angle and do the forward projection separately. I can send >> you a >> >> reprojection mha file if my description is unclear to you. >> > I works for me. Would you be able to fill in a bug report >> > (http://bug.openrtk.org/) with an example? You can generate volumes >> > and projections with rtkdrawgeometricphantom and >> > rtkprojectgeometricphantom. >> > Simon >> > >> >> >> >> Thanks Simon!! >> >> >> >> Cheers, >> >> Andy. >> >> >> >> >> >> >> >> 2012/10/24 Simon Rit >> >>> >> >>> Hi Andy, >> >>> Yes you're right, I have actually noticed recently that but I have not >> >>> worked a lot on Varian images because we don't have a Varian CBCT in >> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> >>> I used to roughly check the geometry. As far as I can remember, when I >> >>> wrote this piece of code, I tried to use the same code as Plastimatch >> >>> but I could well have done it wrongly. I'm actually waiting for a new >> >>> complete Catphan acquisition from Greg to correct for this but if you >> >>> already have a patch to suggest or a set of images to send, feel free >> >>> to do it. >> >>> Thanks, >> >>> Simon >> >>> >> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >> wrote: >> >>> > Hi Simon, >> >>> > >> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >> the >> >>> > attenuation is calculated from the projection image simply via a >> >>> > negative >> >>> > transformation (1-Intensity/HND_MaxIntensity). >> >>> > Is it usually the way this is done, and is there any reason for >> doing >> >>> > this? >> >>> > I would have thought attenuation should be calculated from >> intensity via >> >>> > logarithm (since I=I_0 exp(-mu x)). >> >>> > Thanks!! >> >>> > >> >>> > Cheers, >> >>> > Andy >> >>> > >> >>> > _______________________________________________ >> >>> > Rtk-users mailing list >> >>> > Rtk-users at openrtk.org >> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> > >> >> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Mon Nov 26 08:45:42 2012 From: gdhugo at vcu.edu (Geoff Hugo) Date: Mon, 26 Nov 2012 08:45:42 -0500 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: <50B37286.7020809@vcu.edu> An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 28 03:51:12 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Nov 2012 09:51:12 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: <50B37286.7020809@vcu.edu> References: <50B37286.7020809@vcu.edu> Message-ID: Hi, Thanks for the feeback. I don't know any users that actively use Varian projection images. I will put a Catphan dataset online soon that has been provided by Greg Sharp and I'll try to adjust reconstructed values to linear attenuation. A filter to convert from linear to attenuation to HU is rather easy to add if one feels it's required. Simon On Mon, Nov 26, 2012 at 2:45 PM, Geoff Hugo wrote: > Hi Simon and Andy, > > The ScaleFactor we use at VCU is a rough conversion from linear attenuation > coefficient (the output of RTK) to something roughly around CT number > (Hounsfield Units). This is not a proper conversion, just a placeholder for > now. I'm not sure how useful the HNC-compatible version we have at VCU will > be to the wider community, as HNC is not a generally available format and > HND is the more common one. Are there any other users of RTK that use > Varian HNC format projections? > > Geoff > > On 11/23/12 6:35 AM, Andy Shieh wrote: > > Hi Simon, > > Just to let you know that the code works well!! Thanks! > > By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know > him?), and he mentioned that he's been putting quite some effort on making > RTK compatible with Varian format (HNC mainly). He mentioned that for the > Varian format, we usually read in the "Norm Chamber value" (It's usually > around 300) from each HNC header, and calculate the CT number by > log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is > around 10000. I'm not too sure about the details, but I believe he will > discuss it with you soon when he has time! > > Cheers, > Andy > >> >> >> >> 2012/11/19 Simon Rit >>> >>> Hi Andy, >>> I have pushed a fix for the Varian raw to attenuation conversion. Let >>> me know if it meets what you've done. I will let you know if there is >>> any other improvement of the conversion in the future. >>> Simon >>> >>> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >>> wrote: >>> > Hi Andy, >>> > >>> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >>> >> Hi Simon, >>> >> >>> >> Thank you. At the moment I'm just doing something similar to what you >>> >> did >>> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >>> >> and >>> >> minus the log of intensity plus one (I assume the plus one is to avoid >>> >> taking the log of zero?). >>> > Does it improve the results? You are welcome to share it if you feel >>> > that this is of interest for other people. >>> > >>> >> >>> >> Another few question: >>> >> 1. Are you doing any normalization after reconstruction or forward >>> >> projection? >>> > No. Assuming you have line integral of the attenuation as input of the >>> > reconstruction algorithm, you get the attenuation. >>> > >>> > Are the negative values in the reconstructed images simply a >>> >> result of the ramp filtering? >>> > Probably. You can use rtkprojections to look at what is the input of >>> > the reconstruction algorithm. >>> > >>> >> 2. If I want to compare a reprojection from an image reconstructed >>> >> using RTK >>> >> with the original projection, how should I make sure the normalization >>> >> is >>> >> correct? i.e. should I plus/minus or multiply the reprojected >>> >> attenuation >>> >> before I use exponential and make it back to intensity values? >>> > You basically have to do the inverse formula to what you have done. An >>> > easy way of looking at what is going on with forward projections is to >>> > look at this example: >>> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >>> > >>> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >>> >> projecting using a geometry file containing several Projection >>> >> (Angle). The >>> >> output mha file seems to "repeat" after a couple of projections >>> >> instead of >>> >> showing all projections. I'm testing this on a Varian Half Fan >>> >> geometry - it >>> >> works fine if I break the geometry file down into one each for each >>> >> projection angle and do the forward projection separately. I can send >>> >> you a >>> >> reprojection mha file if my description is unclear to you. >>> > I works for me. Would you be able to fill in a bug report >>> > (http://bug.openrtk.org/) with an example? You can generate volumes >>> > and projections with rtkdrawgeometricphantom and >>> > rtkprojectgeometricphantom. >>> > Simon >>> > >>> >> >>> >> Thanks Simon!! >>> >> >>> >> Cheers, >>> >> Andy. >>> >> >>> >> >>> >> >>> >> 2012/10/24 Simon Rit >>> >>> >>> >>> Hi Andy, >>> >>> Yes you're right, I have actually noticed recently that but I have >>> >>> not >>> >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan >>> >>> that >>> >>> I used to roughly check the geometry. As far as I can remember, when >>> >>> I >>> >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> >>> but I could well have done it wrongly. I'm actually waiting for a new >>> >>> complete Catphan acquisition from Greg to correct for this but if you >>> >>> already have a patch to suggest or a set of images to send, feel free >>> >>> to do it. >>> >>> Thanks, >>> >>> Simon >>> >>> >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >>> >>> wrote: >>> >>> > Hi Simon, >>> >>> > >>> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >>> >>> > the >>> >>> > attenuation is calculated from the projection image simply via a >>> >>> > negative >>> >>> > transformation (1-Intensity/HND_MaxIntensity). >>> >>> > Is it usually the way this is done, and is there any reason for >>> >>> > doing >>> >>> > this? >>> >>> > I would have thought attenuation should be calculated from >>> >>> > intensity via >>> >>> > logarithm (since I=I_0 exp(-mu x)). >>> >>> > Thanks!! >>> >>> > >>> >>> > Cheers, >>> >>> > Andy >>> >>> > >>> >>> > _______________________________________________ >>> >>> > Rtk-users mailing list >>> >>> > Rtk-users at openrtk.org >>> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> >>> > >>> >> >>> >> >> >> > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -- > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Assistant Professor > Dept. of Radiation Oncology > Virginia Commonwealth University > gdhugo at vcu.edu From hsieandy at gmail.com Thu Nov 29 01:03:44 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 14:03:44 +0800 Subject: [Rtk-users] Compiling with CUDA Message-ID: Hi Simon, Lately I've been trying to build RTK with CUDA. I tried both the CUDA production release 5.0 and 4.2. I doubled checked that CUDA is actually working (the CUDA examples run properly). And I made sure that the CUDA and CUDA SDK directories are correctly specified in the configuration when generating the build files. However, I keep getting these linking errors when I tried to compile RTK using Visual Studio 2010. Do you have any idea what might be going on? Thanks. I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. ============================================= Error 1 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 2 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 3 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 4 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 5 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkinlinefdk Error 6 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk Error 7 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 8 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 9 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 10 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 11 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkfdk Error 12 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk ============================================= Cheers, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 02:11:32 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 15:11:32 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, The problem seems to disappear when I updated the whole directory to the newest version of RTK. Cheers, Andy 2012/11/29 Andy Shieh > Hi Simon, > > Lately I've been trying to build RTK with CUDA. I tried both the CUDA > production release 5.0 and 4.2. I doubled checked that CUDA is actually > working (the CUDA examples run properly). And I made sure that the CUDA and > CUDA SDK directories are correctly specified in the configuration when > generating the build files. However, I keep getting these linking errors > when I tried to compile RTK using Visual Studio 2010. Do you have any idea > what might be going on? Thanks. > > I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > > ============================================= > Error 1 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 2 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 3 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 4 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 5 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkinlinefdk > Error 6 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk > Error 7 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 8 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 9 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 10 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 11 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkfdk > Error 12 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > ============================================= > > Cheers, > Andy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 02:15:48 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 08:15:48 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Great! I had no clue what the problem was.... Let us know if when we can help you with anything else, Simon On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > Hi Simon, > > The problem seems to disappear when I updated the whole directory to the > newest version of RTK. > > Cheers, > Andy > > > 2012/11/29 Andy Shieh > >> Hi Simon, >> >> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> production release 5.0 and 4.2. I doubled checked that CUDA is actually >> working (the CUDA examples run properly). And I made sure that the CUDA and >> CUDA SDK directories are correctly specified in the configuration when >> generating the build files. However, I keep getting these linking errors >> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >> what might be going on? Thanks. >> >> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >> ============================================= >> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 2 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkinlinefdk >> Error 6 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 8 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkfdk >> Error 12 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> ============================================= >> >> Cheers, >> Andy >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 03:57:51 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 16:57:51 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, I do encounter another problem though. So everything compiled file and rtkfdk works fine with cpu. However, when I change the hardware argument to cuda, I get the following runtime error when rtkfdk is "Reconstructing and Writing": ======================== ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000B3EC88) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 85 Description: itk::ERROR: CUFFT ERROR #2 ========================== I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. Do you know what might be happening? Thanks! Cheers, Andy 2012/11/29 Simon Rit > Great! I had no clue what the problem was.... Let us know if when we can > help you with anything else, > Simon > On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >> Hi Simon, >> >> The problem seems to disappear when I updated the whole directory to the >> newest version of RTK. >> >> Cheers, >> Andy >> >> >> 2012/11/29 Andy Shieh >> >>> Hi Simon, >>> >>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>> working (the CUDA examples run properly). And I made sure that the CUDA and >>> CUDA SDK directories are correctly specified in the configuration when >>> generating the build files. However, I keep getting these linking errors >>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>> what might be going on? Thanks. >>> >>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>> >>> ============================================= >>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 2 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkinlinefdk >>> Error 6 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >>> rtkinlinefdk >>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 8 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkfdk >>> Error 12 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>> ============================================= >>> >>> Cheers, >>> Andy >>> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at openrtk.org >> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 05:08:15 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 11:08:15 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi, It's seems to be an allocation problem. How big are your projection images? You can always change the parameter m_ProjectionSubsetSize to 1 with http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 to lower the amount of projection images in the GPU memory. Simon On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > Hi Simon, > > I do encounter another problem though. > So everything compiled file and rtkfdk works fine with cpu. > However, when I change the hardware argument to cuda, I get the following > runtime error when rtkfdk is "Reconstructing and Writing": > > ======================== > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000B3EC88) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 85 > Description: itk::ERROR: CUFFT ERROR #2 > ========================== > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. > Do you know what might be happening? Thanks! > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Great! I had no clue what the problem was.... Let us know if when we can >> help you with anything else, >> Simon >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >>> >>> Hi Simon, >>> >>> The problem seems to disappear when I updated the whole directory to the >>> newest version of RTK. >>> >>> Cheers, >>> Andy >>> >>> >>> 2012/11/29 Andy Shieh >>>> >>>> Hi Simon, >>>> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>>> working (the CUDA examples run properly). And I made sure that the CUDA and >>>> CUDA SDK directories are correctly specified in the configuration when >>>> generating the build files. However, I keep getting these linking errors >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>>> what might be going on? Thanks. >>>> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>>> >>>> ============================================= >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 2 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkinlinefdk >>>> Error 6 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 8 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkfdk >>>> Error 12 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>>> ============================================= >>>> >>>> Cheers, >>>> Andy >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at openrtk.org >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > From hsieandy at gmail.com Thu Nov 29 07:53:57 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 20:53:57 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, Thanks for the suggestion. I tried, but it gave another error message. When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following runtime error: =============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A5E8D8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 102 Description: itk::ERROR: CUDA ERROR: invalid configuration argument ================ When I set it to the default value of 4, I get the CUFFT error in the previous maile. When I set it to 5, 6, and beyond, I get the following runtime error: ============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A2ECB8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 69 Description: itk::ERROR: CUDA ERROR: out of memory ============== Cheers, Andy 2012/11/29 Simon Rit > Hi, > It's seems to be an allocation problem. How big are your projection images? > You can always change the parameter m_ProjectionSubsetSize to 1 with > > http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 > to lower the amount of projection images in the GPU memory. > Simon > > On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > > Hi Simon, > > > > I do encounter another problem though. > > So everything compiled file and rtkfdk works fine with cpu. > > However, when I change the hardware argument to cuda, I get the following > > runtime error when rtkfdk is "Reconstructing and Writing": > > > > ======================== > > ExceptionObject caught with writer->Update() > > > > itk::ExceptionObject (0000000000B3EC88) > > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > > Line: 85 > > Description: itk::ERROR: CUFFT ERROR #2 > > ========================== > > > > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't > help. > > Do you know what might be happening? Thanks! > > > > Cheers, > > Andy > > > > > > 2012/11/29 Simon Rit > >> > >> Great! I had no clue what the problem was.... Let us know if when we can > >> help you with anything else, > >> Simon > >> > >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >>> > >>> Hi Simon, > >>> > >>> The problem seems to disappear when I updated the whole directory to > the > >>> newest version of RTK. > >>> > >>> Cheers, > >>> Andy > >>> > >>> > >>> 2012/11/29 Andy Shieh > >>>> > >>>> Hi Simon, > >>>> > >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA > >>>> production release 5.0 and 4.2. I doubled checked that CUDA is > actually > >>>> working (the CUDA examples run properly). And I made sure that the > CUDA and > >>>> CUDA SDK directories are correctly specified in the configuration when > >>>> generating the build files. However, I keep getting these linking > errors > >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any > idea > >>>> what might be going on? Thanks. > >>>> > >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > >>>> > >>>> ============================================= > >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 2 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 6 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe > rtkinlinefdk > >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 8 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkfdk > >>>> Error 12 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > >>>> ============================================= > >>>> > >>>> Cheers, > >>>> Andy > >>> > >>> > >>> > >>> _______________________________________________ > >>> Rtk-users mailing list > >>> Rtk-users at openrtk.org > >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > >>> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 13:33:56 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 19:33:56 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Andy, It seems that you have very little GPU memory. Do you know what graphics card you have? If I were you, I would start with a smaller volume with the --dimension option if you use my command line tools (modify as well the spacing at first, e.g., --spacing 8 --dimension 32). You can also use the --divisions option to split the volume in pieces but you then redo the filtering of all projection images. BTW, would you have two graphics card, there is nohing to select one over the other. Maybe this is what happens to you? You can then modify "GetListOfCudaDevices" and add some parameters to select the graphics card based on the memory. Let me know if I can help more, Simon On Thu, Nov 29, 2012 at 1:53 PM, Andy Shieh wrote: > Hi Simon, > > Thanks for the suggestion. I tried, but it gave another error message. > > When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following > runtime error: > =============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A5E8D8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 102 > Description: itk::ERROR: CUDA ERROR: invalid configuration argument > ================ > > > When I set it to the default value of 4, I get the CUFFT error in the > previous maile. > > > When I set it to 5, 6, and beyond, I get the following runtime error: > ============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A2ECB8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 69 > Description: itk::ERROR: CUDA ERROR: out of memory > ============== > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Hi, >> It's seems to be an allocation problem. How big are your projection >> images? >> You can always change the parameter m_ProjectionSubsetSize to 1 with >> >> http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 >> to lower the amount of projection images in the GPU memory. >> Simon >> >> On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I do encounter another problem though. >> > So everything compiled file and rtkfdk works fine with cpu. >> > However, when I change the hardware argument to cuda, I get the >> > following >> > runtime error when rtkfdk is "Reconstructing and Writing": >> > >> > ======================== >> > ExceptionObject caught with writer->Update() >> > >> > itk::ExceptionObject (0000000000B3EC88) >> > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" >> > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu >> > Line: 85 >> > Description: itk::ERROR: CUFFT ERROR #2 >> > ========================== >> > >> > >> > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't >> > help. >> > Do you know what might be happening? Thanks! >> > >> > Cheers, >> > Andy >> > >> > >> > 2012/11/29 Simon Rit >> >> >> >> Great! I had no clue what the problem was.... Let us know if when we >> >> can >> >> help you with anything else, >> >> Simon >> >> >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >> >>> >> >>> Hi Simon, >> >>> >> >>> The problem seems to disappear when I updated the whole directory to >> >>> the >> >>> newest version of RTK. >> >>> >> >>> Cheers, >> >>> Andy >> >>> >> >>> >> >>> 2012/11/29 Andy Shieh >> >>>> >> >>>> Hi Simon, >> >>>> >> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> >>>> production release 5.0 and 4.2. I doubled checked that CUDA is >> >>>> actually >> >>>> working (the CUDA examples run properly). And I made sure that the >> >>>> CUDA and >> >>>> CUDA SDK directories are correctly specified in the configuration >> >>>> when >> >>>> generating the build files. However, I keep getting these linking >> >>>> errors >> >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any >> >>>> idea >> >>>> what might be going on? Thanks. >> >>>> >> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >>>> >> >>>> ============================================= >> >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 2 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 6 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >> >>>> rtkinlinefdk >> >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 8 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 12 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> >>>> ============================================= >> >>>> >> >>>> Cheers, >> >>>> Andy >> >>> >> >>> >> >>> >> >>> _______________________________________________ >> >>> Rtk-users mailing list >> >>> Rtk-users at openrtk.org >> >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> >> > > > From hsieandy at gmail.com Thu Nov 8 11:58:35 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 9 Nov 2012 00:58:35 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Thank you. At the moment I'm just doing something similar to what you did for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and minus the log of intensity plus one (I assume the plus one is to avoid taking the log of zero?). Another few question: 1. Are you doing any normalization after reconstruction or forward projection? Are the negative values in the reconstructed images simply a result of the ramp filtering? 2. If I want to compare a reprojection from an image reconstructed using RTK with the original projection, how should I make sure the normalization is correct? i.e. should I plus/minus or multiply the reprojected attenuation before I use exponential and make it back to intensity values? 3. The rtkforward projections doesn't seem to work correctly when I'm projecting using a geometry file containing several Projection (Angle). The output mha file seems to "repeat" after a couple of projections instead of showing all projections. I'm testing this on a Varian Half Fan geometry - it works fine if I break the geometry file down into one each for each projection angle and do the forward projection separately. I can send you a reprojection mha file if my description is unclear to you. Thanks Simon!! Cheers, Andy. 2012/10/24 Simon Rit > Hi Andy, > Yes you're right, I have actually noticed recently that but I have not > worked a lot on Varian images because we don't have a Varian CBCT in > Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that > I used to roughly check the geometry. As far as I can remember, when I > wrote this piece of code, I tried to use the same code as Plastimatch > but I could well have done it wrongly. I'm actually waiting for a new > complete Catphan acquisition from Greg to correct for this but if you > already have a patch to suggest or a set of images to send, feel free > to do it. > Thanks, > Simon > > On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: > > Hi Simon, > > > > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the > > attenuation is calculated from the projection image simply via a negative > > transformation (1-Intensity/HND_MaxIntensity). > > Is it usually the way this is done, and is there any reason for doing > this? > > I would have thought attenuation should be calculated from intensity via > > logarithm (since I=I_0 exp(-mu x)). > > Thanks!! > > > > Cheers, > > Andy > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at openrtk.org > > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Nov 9 03:03:04 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 9 Nov 2012 09:03:04 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: > Hi Simon, > > Thank you. At the moment I'm just doing something similar to what you did > for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and > minus the log of intensity plus one (I assume the plus one is to avoid > taking the log of zero?). Does it improve the results? You are welcome to share it if you feel that this is of interest for other people. > > Another few question: > 1. Are you doing any normalization after reconstruction or forward > projection? No. Assuming you have line integral of the attenuation as input of the reconstruction algorithm, you get the attenuation. Are the negative values in the reconstructed images simply a > result of the ramp filtering? Probably. You can use rtkprojections to look at what is the input of the reconstruction algorithm. > 2. If I want to compare a reprojection from an image reconstructed using RTK > with the original projection, how should I make sure the normalization is > correct? i.e. should I plus/minus or multiply the reprojected attenuation > before I use exponential and make it back to intensity values? You basically have to do the inverse formula to what you have done. An easy way of looking at what is going on with forward projections is to look at this example: http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > 3. The rtkforward projections doesn't seem to work correctly when I'm > projecting using a geometry file containing several Projection (Angle). The > output mha file seems to "repeat" after a couple of projections instead of > showing all projections. I'm testing this on a Varian Half Fan geometry - it > works fine if I break the geometry file down into one each for each > projection angle and do the forward projection separately. I can send you a > reprojection mha file if my description is unclear to you. I works for me. Would you be able to fill in a bug report (http://bug.openrtk.org/) with an example? You can generate volumes and projections with rtkdrawgeometricphantom and rtkprojectgeometricphantom. Simon > > Thanks Simon!! > > Cheers, > Andy. > > > > 2012/10/24 Simon Rit >> >> Hi Andy, >> Yes you're right, I have actually noticed recently that but I have not >> worked a lot on Varian images because we don't have a Varian CBCT in >> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> I used to roughly check the geometry. As far as I can remember, when I >> wrote this piece of code, I tried to use the same code as Plastimatch >> but I could well have done it wrongly. I'm actually waiting for a new >> complete Catphan acquisition from Greg to correct for this but if you >> already have a patch to suggest or a set of images to send, feel free >> to do it. >> Thanks, >> Simon >> >> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >> > attenuation is calculated from the projection image simply via a >> > negative >> > transformation (1-Intensity/HND_MaxIntensity). >> > Is it usually the way this is done, and is there any reason for doing >> > this? >> > I would have thought attenuation should be calculated from intensity via >> > logarithm (since I=I_0 exp(-mu x)). >> > Thanks!! >> > >> > Cheers, >> > Andy >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at openrtk.org >> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> > > > From simon.rit at creatis.insa-lyon.fr Mon Nov 19 05:37:18 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 19 Nov 2012 11:37:18 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, I have pushed a fix for the Varian raw to attenuation conversion. Let me know if it meets what you've done. I will let you know if there is any other improvement of the conversion in the future. Simon On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit wrote: > Hi Andy, > > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> Hi Simon, >> >> Thank you. At the moment I'm just doing something similar to what you did >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and >> minus the log of intensity plus one (I assume the plus one is to avoid >> taking the log of zero?). > Does it improve the results? You are welcome to share it if you feel > that this is of interest for other people. > >> >> Another few question: >> 1. Are you doing any normalization after reconstruction or forward >> projection? > No. Assuming you have line integral of the attenuation as input of the > reconstruction algorithm, you get the attenuation. > > Are the negative values in the reconstructed images simply a >> result of the ramp filtering? > Probably. You can use rtkprojections to look at what is the input of > the reconstruction algorithm. > >> 2. If I want to compare a reprojection from an image reconstructed using RTK >> with the original projection, how should I make sure the normalization is >> correct? i.e. should I plus/minus or multiply the reprojected attenuation >> before I use exponential and make it back to intensity values? > You basically have to do the inverse formula to what you have done. An > easy way of looking at what is going on with forward projections is to > look at this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> projecting using a geometry file containing several Projection (Angle). The >> output mha file seems to "repeat" after a couple of projections instead of >> showing all projections. I'm testing this on a Varian Half Fan geometry - it >> works fine if I break the geometry file down into one each for each >> projection angle and do the forward projection separately. I can send you a >> reprojection mha file if my description is unclear to you. > I works for me. Would you be able to fill in a bug report > (http://bug.openrtk.org/) with an example? You can generate volumes > and projections with rtkdrawgeometricphantom and > rtkprojectgeometricphantom. > Simon > >> >> Thanks Simon!! >> >> Cheers, >> Andy. >> >> >> >> 2012/10/24 Simon Rit >>> >>> Hi Andy, >>> Yes you're right, I have actually noticed recently that but I have not >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >>> I used to roughly check the geometry. As far as I can remember, when I >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> but I could well have done it wrongly. I'm actually waiting for a new >>> complete Catphan acquisition from Greg to correct for this but if you >>> already have a patch to suggest or a set of images to send, feel free >>> to do it. >>> Thanks, >>> Simon >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >>> > Hi Simon, >>> > >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >>> > attenuation is calculated from the projection image simply via a >>> > negative >>> > transformation (1-Intensity/HND_MaxIntensity). >>> > Is it usually the way this is done, and is there any reason for doing >>> > this? >>> > I would have thought attenuation should be calculated from intensity via >>> > logarithm (since I=I_0 exp(-mu x)). >>> > Thanks!! >>> > >>> > Cheers, >>> > Andy >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at openrtk.org >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > >> >> From hsieandy at gmail.com Fri Nov 23 06:35:22 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 23 Nov 2012 19:35:22 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Just to let you know that the code works well!! Thanks! By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know him?), and he mentioned that he's been putting quite some effort on making RTK compatible with Varian format (HNC mainly). He mentioned that for the Varian format, we usually read in the "Norm Chamber value" (It's usually around 300) from each HNC header, and calculate the CT number by log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is around 10000. I'm not too sure about the details, but I believe he will discuss it with you soon when he has time! Cheers, Andy > > > 2012/11/19 Simon Rit > >> Hi Andy, >> I have pushed a fix for the Varian raw to attenuation conversion. Let >> me know if it meets what you've done. I will let you know if there is >> any other improvement of the conversion in the future. >> Simon >> >> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >> wrote: >> > Hi Andy, >> > >> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> >> Hi Simon, >> >> >> >> Thank you. At the moment I'm just doing something similar to what you >> did >> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >> and >> >> minus the log of intensity plus one (I assume the plus one is to avoid >> >> taking the log of zero?). >> > Does it improve the results? You are welcome to share it if you feel >> > that this is of interest for other people. >> > >> >> >> >> Another few question: >> >> 1. Are you doing any normalization after reconstruction or forward >> >> projection? >> > No. Assuming you have line integral of the attenuation as input of the >> > reconstruction algorithm, you get the attenuation. >> > >> > Are the negative values in the reconstructed images simply a >> >> result of the ramp filtering? >> > Probably. You can use rtkprojections to look at what is the input of >> > the reconstruction algorithm. >> > >> >> 2. If I want to compare a reprojection from an image reconstructed >> using RTK >> >> with the original projection, how should I make sure the normalization >> is >> >> correct? i.e. should I plus/minus or multiply the reprojected >> attenuation >> >> before I use exponential and make it back to intensity values? >> > You basically have to do the inverse formula to what you have done. An >> > easy way of looking at what is going on with forward projections is to >> > look at this example: >> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >> > >> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> >> projecting using a geometry file containing several Projection >> (Angle). The >> >> output mha file seems to "repeat" after a couple of projections >> instead of >> >> showing all projections. I'm testing this on a Varian Half Fan >> geometry - it >> >> works fine if I break the geometry file down into one each for each >> >> projection angle and do the forward projection separately. I can send >> you a >> >> reprojection mha file if my description is unclear to you. >> > I works for me. Would you be able to fill in a bug report >> > (http://bug.openrtk.org/) with an example? You can generate volumes >> > and projections with rtkdrawgeometricphantom and >> > rtkprojectgeometricphantom. >> > Simon >> > >> >> >> >> Thanks Simon!! >> >> >> >> Cheers, >> >> Andy. >> >> >> >> >> >> >> >> 2012/10/24 Simon Rit >> >>> >> >>> Hi Andy, >> >>> Yes you're right, I have actually noticed recently that but I have not >> >>> worked a lot on Varian images because we don't have a Varian CBCT in >> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> >>> I used to roughly check the geometry. As far as I can remember, when I >> >>> wrote this piece of code, I tried to use the same code as Plastimatch >> >>> but I could well have done it wrongly. I'm actually waiting for a new >> >>> complete Catphan acquisition from Greg to correct for this but if you >> >>> already have a patch to suggest or a set of images to send, feel free >> >>> to do it. >> >>> Thanks, >> >>> Simon >> >>> >> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >> wrote: >> >>> > Hi Simon, >> >>> > >> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >> the >> >>> > attenuation is calculated from the projection image simply via a >> >>> > negative >> >>> > transformation (1-Intensity/HND_MaxIntensity). >> >>> > Is it usually the way this is done, and is there any reason for >> doing >> >>> > this? >> >>> > I would have thought attenuation should be calculated from >> intensity via >> >>> > logarithm (since I=I_0 exp(-mu x)). >> >>> > Thanks!! >> >>> > >> >>> > Cheers, >> >>> > Andy >> >>> > >> >>> > _______________________________________________ >> >>> > Rtk-users mailing list >> >>> > Rtk-users at openrtk.org >> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> > >> >> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Mon Nov 26 08:45:42 2012 From: gdhugo at vcu.edu (Geoff Hugo) Date: Mon, 26 Nov 2012 08:45:42 -0500 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: <50B37286.7020809@vcu.edu> An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 28 03:51:12 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Nov 2012 09:51:12 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: <50B37286.7020809@vcu.edu> References: <50B37286.7020809@vcu.edu> Message-ID: Hi, Thanks for the feeback. I don't know any users that actively use Varian projection images. I will put a Catphan dataset online soon that has been provided by Greg Sharp and I'll try to adjust reconstructed values to linear attenuation. A filter to convert from linear to attenuation to HU is rather easy to add if one feels it's required. Simon On Mon, Nov 26, 2012 at 2:45 PM, Geoff Hugo wrote: > Hi Simon and Andy, > > The ScaleFactor we use at VCU is a rough conversion from linear attenuation > coefficient (the output of RTK) to something roughly around CT number > (Hounsfield Units). This is not a proper conversion, just a placeholder for > now. I'm not sure how useful the HNC-compatible version we have at VCU will > be to the wider community, as HNC is not a generally available format and > HND is the more common one. Are there any other users of RTK that use > Varian HNC format projections? > > Geoff > > On 11/23/12 6:35 AM, Andy Shieh wrote: > > Hi Simon, > > Just to let you know that the code works well!! Thanks! > > By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know > him?), and he mentioned that he's been putting quite some effort on making > RTK compatible with Varian format (HNC mainly). He mentioned that for the > Varian format, we usually read in the "Norm Chamber value" (It's usually > around 300) from each HNC header, and calculate the CT number by > log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is > around 10000. I'm not too sure about the details, but I believe he will > discuss it with you soon when he has time! > > Cheers, > Andy > >> >> >> >> 2012/11/19 Simon Rit >>> >>> Hi Andy, >>> I have pushed a fix for the Varian raw to attenuation conversion. Let >>> me know if it meets what you've done. I will let you know if there is >>> any other improvement of the conversion in the future. >>> Simon >>> >>> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >>> wrote: >>> > Hi Andy, >>> > >>> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >>> >> Hi Simon, >>> >> >>> >> Thank you. At the moment I'm just doing something similar to what you >>> >> did >>> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >>> >> and >>> >> minus the log of intensity plus one (I assume the plus one is to avoid >>> >> taking the log of zero?). >>> > Does it improve the results? You are welcome to share it if you feel >>> > that this is of interest for other people. >>> > >>> >> >>> >> Another few question: >>> >> 1. Are you doing any normalization after reconstruction or forward >>> >> projection? >>> > No. Assuming you have line integral of the attenuation as input of the >>> > reconstruction algorithm, you get the attenuation. >>> > >>> > Are the negative values in the reconstructed images simply a >>> >> result of the ramp filtering? >>> > Probably. You can use rtkprojections to look at what is the input of >>> > the reconstruction algorithm. >>> > >>> >> 2. If I want to compare a reprojection from an image reconstructed >>> >> using RTK >>> >> with the original projection, how should I make sure the normalization >>> >> is >>> >> correct? i.e. should I plus/minus or multiply the reprojected >>> >> attenuation >>> >> before I use exponential and make it back to intensity values? >>> > You basically have to do the inverse formula to what you have done. An >>> > easy way of looking at what is going on with forward projections is to >>> > look at this example: >>> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >>> > >>> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >>> >> projecting using a geometry file containing several Projection >>> >> (Angle). The >>> >> output mha file seems to "repeat" after a couple of projections >>> >> instead of >>> >> showing all projections. I'm testing this on a Varian Half Fan >>> >> geometry - it >>> >> works fine if I break the geometry file down into one each for each >>> >> projection angle and do the forward projection separately. I can send >>> >> you a >>> >> reprojection mha file if my description is unclear to you. >>> > I works for me. Would you be able to fill in a bug report >>> > (http://bug.openrtk.org/) with an example? You can generate volumes >>> > and projections with rtkdrawgeometricphantom and >>> > rtkprojectgeometricphantom. >>> > Simon >>> > >>> >> >>> >> Thanks Simon!! >>> >> >>> >> Cheers, >>> >> Andy. >>> >> >>> >> >>> >> >>> >> 2012/10/24 Simon Rit >>> >>> >>> >>> Hi Andy, >>> >>> Yes you're right, I have actually noticed recently that but I have >>> >>> not >>> >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan >>> >>> that >>> >>> I used to roughly check the geometry. As far as I can remember, when >>> >>> I >>> >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> >>> but I could well have done it wrongly. I'm actually waiting for a new >>> >>> complete Catphan acquisition from Greg to correct for this but if you >>> >>> already have a patch to suggest or a set of images to send, feel free >>> >>> to do it. >>> >>> Thanks, >>> >>> Simon >>> >>> >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >>> >>> wrote: >>> >>> > Hi Simon, >>> >>> > >>> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >>> >>> > the >>> >>> > attenuation is calculated from the projection image simply via a >>> >>> > negative >>> >>> > transformation (1-Intensity/HND_MaxIntensity). >>> >>> > Is it usually the way this is done, and is there any reason for >>> >>> > doing >>> >>> > this? >>> >>> > I would have thought attenuation should be calculated from >>> >>> > intensity via >>> >>> > logarithm (since I=I_0 exp(-mu x)). >>> >>> > Thanks!! >>> >>> > >>> >>> > Cheers, >>> >>> > Andy >>> >>> > >>> >>> > _______________________________________________ >>> >>> > Rtk-users mailing list >>> >>> > Rtk-users at openrtk.org >>> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> >>> > >>> >> >>> >> >> >> > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -- > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Assistant Professor > Dept. of Radiation Oncology > Virginia Commonwealth University > gdhugo at vcu.edu From hsieandy at gmail.com Thu Nov 29 01:03:44 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 14:03:44 +0800 Subject: [Rtk-users] Compiling with CUDA Message-ID: Hi Simon, Lately I've been trying to build RTK with CUDA. I tried both the CUDA production release 5.0 and 4.2. I doubled checked that CUDA is actually working (the CUDA examples run properly). And I made sure that the CUDA and CUDA SDK directories are correctly specified in the configuration when generating the build files. However, I keep getting these linking errors when I tried to compile RTK using Visual Studio 2010. Do you have any idea what might be going on? Thanks. I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. ============================================= Error 1 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 2 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 3 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 4 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 5 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkinlinefdk Error 6 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk Error 7 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 8 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 9 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 10 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 11 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkfdk Error 12 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk ============================================= Cheers, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 02:11:32 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 15:11:32 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, The problem seems to disappear when I updated the whole directory to the newest version of RTK. Cheers, Andy 2012/11/29 Andy Shieh > Hi Simon, > > Lately I've been trying to build RTK with CUDA. I tried both the CUDA > production release 5.0 and 4.2. I doubled checked that CUDA is actually > working (the CUDA examples run properly). And I made sure that the CUDA and > CUDA SDK directories are correctly specified in the configuration when > generating the build files. However, I keep getting these linking errors > when I tried to compile RTK using Visual Studio 2010. Do you have any idea > what might be going on? Thanks. > > I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > > ============================================= > Error 1 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 2 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 3 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 4 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 5 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkinlinefdk > Error 6 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk > Error 7 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 8 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 9 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 10 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 11 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkfdk > Error 12 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > ============================================= > > Cheers, > Andy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 02:15:48 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 08:15:48 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Great! I had no clue what the problem was.... Let us know if when we can help you with anything else, Simon On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > Hi Simon, > > The problem seems to disappear when I updated the whole directory to the > newest version of RTK. > > Cheers, > Andy > > > 2012/11/29 Andy Shieh > >> Hi Simon, >> >> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> production release 5.0 and 4.2. I doubled checked that CUDA is actually >> working (the CUDA examples run properly). And I made sure that the CUDA and >> CUDA SDK directories are correctly specified in the configuration when >> generating the build files. However, I keep getting these linking errors >> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >> what might be going on? Thanks. >> >> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >> ============================================= >> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 2 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkinlinefdk >> Error 6 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 8 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkfdk >> Error 12 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> ============================================= >> >> Cheers, >> Andy >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 03:57:51 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 16:57:51 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, I do encounter another problem though. So everything compiled file and rtkfdk works fine with cpu. However, when I change the hardware argument to cuda, I get the following runtime error when rtkfdk is "Reconstructing and Writing": ======================== ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000B3EC88) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 85 Description: itk::ERROR: CUFFT ERROR #2 ========================== I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. Do you know what might be happening? Thanks! Cheers, Andy 2012/11/29 Simon Rit > Great! I had no clue what the problem was.... Let us know if when we can > help you with anything else, > Simon > On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >> Hi Simon, >> >> The problem seems to disappear when I updated the whole directory to the >> newest version of RTK. >> >> Cheers, >> Andy >> >> >> 2012/11/29 Andy Shieh >> >>> Hi Simon, >>> >>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>> working (the CUDA examples run properly). And I made sure that the CUDA and >>> CUDA SDK directories are correctly specified in the configuration when >>> generating the build files. However, I keep getting these linking errors >>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>> what might be going on? Thanks. >>> >>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>> >>> ============================================= >>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 2 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkinlinefdk >>> Error 6 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >>> rtkinlinefdk >>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 8 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkfdk >>> Error 12 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>> ============================================= >>> >>> Cheers, >>> Andy >>> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at openrtk.org >> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 05:08:15 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 11:08:15 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi, It's seems to be an allocation problem. How big are your projection images? You can always change the parameter m_ProjectionSubsetSize to 1 with http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 to lower the amount of projection images in the GPU memory. Simon On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > Hi Simon, > > I do encounter another problem though. > So everything compiled file and rtkfdk works fine with cpu. > However, when I change the hardware argument to cuda, I get the following > runtime error when rtkfdk is "Reconstructing and Writing": > > ======================== > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000B3EC88) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 85 > Description: itk::ERROR: CUFFT ERROR #2 > ========================== > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. > Do you know what might be happening? Thanks! > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Great! I had no clue what the problem was.... Let us know if when we can >> help you with anything else, >> Simon >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >>> >>> Hi Simon, >>> >>> The problem seems to disappear when I updated the whole directory to the >>> newest version of RTK. >>> >>> Cheers, >>> Andy >>> >>> >>> 2012/11/29 Andy Shieh >>>> >>>> Hi Simon, >>>> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>>> working (the CUDA examples run properly). And I made sure that the CUDA and >>>> CUDA SDK directories are correctly specified in the configuration when >>>> generating the build files. However, I keep getting these linking errors >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>>> what might be going on? Thanks. >>>> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>>> >>>> ============================================= >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 2 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkinlinefdk >>>> Error 6 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 8 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkfdk >>>> Error 12 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>>> ============================================= >>>> >>>> Cheers, >>>> Andy >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at openrtk.org >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > From hsieandy at gmail.com Thu Nov 29 07:53:57 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 20:53:57 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, Thanks for the suggestion. I tried, but it gave another error message. When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following runtime error: =============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A5E8D8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 102 Description: itk::ERROR: CUDA ERROR: invalid configuration argument ================ When I set it to the default value of 4, I get the CUFFT error in the previous maile. When I set it to 5, 6, and beyond, I get the following runtime error: ============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A2ECB8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 69 Description: itk::ERROR: CUDA ERROR: out of memory ============== Cheers, Andy 2012/11/29 Simon Rit > Hi, > It's seems to be an allocation problem. How big are your projection images? > You can always change the parameter m_ProjectionSubsetSize to 1 with > > http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 > to lower the amount of projection images in the GPU memory. > Simon > > On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > > Hi Simon, > > > > I do encounter another problem though. > > So everything compiled file and rtkfdk works fine with cpu. > > However, when I change the hardware argument to cuda, I get the following > > runtime error when rtkfdk is "Reconstructing and Writing": > > > > ======================== > > ExceptionObject caught with writer->Update() > > > > itk::ExceptionObject (0000000000B3EC88) > > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > > Line: 85 > > Description: itk::ERROR: CUFFT ERROR #2 > > ========================== > > > > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't > help. > > Do you know what might be happening? Thanks! > > > > Cheers, > > Andy > > > > > > 2012/11/29 Simon Rit > >> > >> Great! I had no clue what the problem was.... Let us know if when we can > >> help you with anything else, > >> Simon > >> > >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >>> > >>> Hi Simon, > >>> > >>> The problem seems to disappear when I updated the whole directory to > the > >>> newest version of RTK. > >>> > >>> Cheers, > >>> Andy > >>> > >>> > >>> 2012/11/29 Andy Shieh > >>>> > >>>> Hi Simon, > >>>> > >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA > >>>> production release 5.0 and 4.2. I doubled checked that CUDA is > actually > >>>> working (the CUDA examples run properly). And I made sure that the > CUDA and > >>>> CUDA SDK directories are correctly specified in the configuration when > >>>> generating the build files. However, I keep getting these linking > errors > >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any > idea > >>>> what might be going on? Thanks. > >>>> > >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > >>>> > >>>> ============================================= > >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 2 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 6 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe > rtkinlinefdk > >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 8 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkfdk > >>>> Error 12 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > >>>> ============================================= > >>>> > >>>> Cheers, > >>>> Andy > >>> > >>> > >>> > >>> _______________________________________________ > >>> Rtk-users mailing list > >>> Rtk-users at openrtk.org > >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > >>> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 13:33:56 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 19:33:56 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Andy, It seems that you have very little GPU memory. Do you know what graphics card you have? If I were you, I would start with a smaller volume with the --dimension option if you use my command line tools (modify as well the spacing at first, e.g., --spacing 8 --dimension 32). You can also use the --divisions option to split the volume in pieces but you then redo the filtering of all projection images. BTW, would you have two graphics card, there is nohing to select one over the other. Maybe this is what happens to you? You can then modify "GetListOfCudaDevices" and add some parameters to select the graphics card based on the memory. Let me know if I can help more, Simon On Thu, Nov 29, 2012 at 1:53 PM, Andy Shieh wrote: > Hi Simon, > > Thanks for the suggestion. I tried, but it gave another error message. > > When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following > runtime error: > =============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A5E8D8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 102 > Description: itk::ERROR: CUDA ERROR: invalid configuration argument > ================ > > > When I set it to the default value of 4, I get the CUFFT error in the > previous maile. > > > When I set it to 5, 6, and beyond, I get the following runtime error: > ============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A2ECB8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 69 > Description: itk::ERROR: CUDA ERROR: out of memory > ============== > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Hi, >> It's seems to be an allocation problem. How big are your projection >> images? >> You can always change the parameter m_ProjectionSubsetSize to 1 with >> >> http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 >> to lower the amount of projection images in the GPU memory. >> Simon >> >> On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I do encounter another problem though. >> > So everything compiled file and rtkfdk works fine with cpu. >> > However, when I change the hardware argument to cuda, I get the >> > following >> > runtime error when rtkfdk is "Reconstructing and Writing": >> > >> > ======================== >> > ExceptionObject caught with writer->Update() >> > >> > itk::ExceptionObject (0000000000B3EC88) >> > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" >> > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu >> > Line: 85 >> > Description: itk::ERROR: CUFFT ERROR #2 >> > ========================== >> > >> > >> > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't >> > help. >> > Do you know what might be happening? Thanks! >> > >> > Cheers, >> > Andy >> > >> > >> > 2012/11/29 Simon Rit >> >> >> >> Great! I had no clue what the problem was.... Let us know if when we >> >> can >> >> help you with anything else, >> >> Simon >> >> >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >> >>> >> >>> Hi Simon, >> >>> >> >>> The problem seems to disappear when I updated the whole directory to >> >>> the >> >>> newest version of RTK. >> >>> >> >>> Cheers, >> >>> Andy >> >>> >> >>> >> >>> 2012/11/29 Andy Shieh >> >>>> >> >>>> Hi Simon, >> >>>> >> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> >>>> production release 5.0 and 4.2. I doubled checked that CUDA is >> >>>> actually >> >>>> working (the CUDA examples run properly). And I made sure that the >> >>>> CUDA and >> >>>> CUDA SDK directories are correctly specified in the configuration >> >>>> when >> >>>> generating the build files. However, I keep getting these linking >> >>>> errors >> >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any >> >>>> idea >> >>>> what might be going on? Thanks. >> >>>> >> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >>>> >> >>>> ============================================= >> >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 2 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 6 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >> >>>> rtkinlinefdk >> >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 8 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 12 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> >>>> ============================================= >> >>>> >> >>>> Cheers, >> >>>> Andy >> >>> >> >>> >> >>> >> >>> _______________________________________________ >> >>> Rtk-users mailing list >> >>> Rtk-users at openrtk.org >> >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> >> > > > From hsieandy at gmail.com Thu Nov 8 11:58:35 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 9 Nov 2012 00:58:35 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Thank you. At the moment I'm just doing something similar to what you did for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and minus the log of intensity plus one (I assume the plus one is to avoid taking the log of zero?). Another few question: 1. Are you doing any normalization after reconstruction or forward projection? Are the negative values in the reconstructed images simply a result of the ramp filtering? 2. If I want to compare a reprojection from an image reconstructed using RTK with the original projection, how should I make sure the normalization is correct? i.e. should I plus/minus or multiply the reprojected attenuation before I use exponential and make it back to intensity values? 3. The rtkforward projections doesn't seem to work correctly when I'm projecting using a geometry file containing several Projection (Angle). The output mha file seems to "repeat" after a couple of projections instead of showing all projections. I'm testing this on a Varian Half Fan geometry - it works fine if I break the geometry file down into one each for each projection angle and do the forward projection separately. I can send you a reprojection mha file if my description is unclear to you. Thanks Simon!! Cheers, Andy. 2012/10/24 Simon Rit > Hi Andy, > Yes you're right, I have actually noticed recently that but I have not > worked a lot on Varian images because we don't have a Varian CBCT in > Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that > I used to roughly check the geometry. As far as I can remember, when I > wrote this piece of code, I tried to use the same code as Plastimatch > but I could well have done it wrongly. I'm actually waiting for a new > complete Catphan acquisition from Greg to correct for this but if you > already have a patch to suggest or a set of images to send, feel free > to do it. > Thanks, > Simon > > On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: > > Hi Simon, > > > > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the > > attenuation is calculated from the projection image simply via a negative > > transformation (1-Intensity/HND_MaxIntensity). > > Is it usually the way this is done, and is there any reason for doing > this? > > I would have thought attenuation should be calculated from intensity via > > logarithm (since I=I_0 exp(-mu x)). > > Thanks!! > > > > Cheers, > > Andy > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at openrtk.org > > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Nov 9 03:03:04 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 9 Nov 2012 09:03:04 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: > Hi Simon, > > Thank you. At the moment I'm just doing something similar to what you did > for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and > minus the log of intensity plus one (I assume the plus one is to avoid > taking the log of zero?). Does it improve the results? You are welcome to share it if you feel that this is of interest for other people. > > Another few question: > 1. Are you doing any normalization after reconstruction or forward > projection? No. Assuming you have line integral of the attenuation as input of the reconstruction algorithm, you get the attenuation. Are the negative values in the reconstructed images simply a > result of the ramp filtering? Probably. You can use rtkprojections to look at what is the input of the reconstruction algorithm. > 2. If I want to compare a reprojection from an image reconstructed using RTK > with the original projection, how should I make sure the normalization is > correct? i.e. should I plus/minus or multiply the reprojected attenuation > before I use exponential and make it back to intensity values? You basically have to do the inverse formula to what you have done. An easy way of looking at what is going on with forward projections is to look at this example: http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > 3. The rtkforward projections doesn't seem to work correctly when I'm > projecting using a geometry file containing several Projection (Angle). The > output mha file seems to "repeat" after a couple of projections instead of > showing all projections. I'm testing this on a Varian Half Fan geometry - it > works fine if I break the geometry file down into one each for each > projection angle and do the forward projection separately. I can send you a > reprojection mha file if my description is unclear to you. I works for me. Would you be able to fill in a bug report (http://bug.openrtk.org/) with an example? You can generate volumes and projections with rtkdrawgeometricphantom and rtkprojectgeometricphantom. Simon > > Thanks Simon!! > > Cheers, > Andy. > > > > 2012/10/24 Simon Rit >> >> Hi Andy, >> Yes you're right, I have actually noticed recently that but I have not >> worked a lot on Varian images because we don't have a Varian CBCT in >> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> I used to roughly check the geometry. As far as I can remember, when I >> wrote this piece of code, I tried to use the same code as Plastimatch >> but I could well have done it wrongly. I'm actually waiting for a new >> complete Catphan acquisition from Greg to correct for this but if you >> already have a patch to suggest or a set of images to send, feel free >> to do it. >> Thanks, >> Simon >> >> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >> > attenuation is calculated from the projection image simply via a >> > negative >> > transformation (1-Intensity/HND_MaxIntensity). >> > Is it usually the way this is done, and is there any reason for doing >> > this? >> > I would have thought attenuation should be calculated from intensity via >> > logarithm (since I=I_0 exp(-mu x)). >> > Thanks!! >> > >> > Cheers, >> > Andy >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at openrtk.org >> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> > > > From simon.rit at creatis.insa-lyon.fr Mon Nov 19 05:37:18 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 19 Nov 2012 11:37:18 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, I have pushed a fix for the Varian raw to attenuation conversion. Let me know if it meets what you've done. I will let you know if there is any other improvement of the conversion in the future. Simon On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit wrote: > Hi Andy, > > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> Hi Simon, >> >> Thank you. At the moment I'm just doing something similar to what you did >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and >> minus the log of intensity plus one (I assume the plus one is to avoid >> taking the log of zero?). > Does it improve the results? You are welcome to share it if you feel > that this is of interest for other people. > >> >> Another few question: >> 1. Are you doing any normalization after reconstruction or forward >> projection? > No. Assuming you have line integral of the attenuation as input of the > reconstruction algorithm, you get the attenuation. > > Are the negative values in the reconstructed images simply a >> result of the ramp filtering? > Probably. You can use rtkprojections to look at what is the input of > the reconstruction algorithm. > >> 2. If I want to compare a reprojection from an image reconstructed using RTK >> with the original projection, how should I make sure the normalization is >> correct? i.e. should I plus/minus or multiply the reprojected attenuation >> before I use exponential and make it back to intensity values? > You basically have to do the inverse formula to what you have done. An > easy way of looking at what is going on with forward projections is to > look at this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> projecting using a geometry file containing several Projection (Angle). The >> output mha file seems to "repeat" after a couple of projections instead of >> showing all projections. I'm testing this on a Varian Half Fan geometry - it >> works fine if I break the geometry file down into one each for each >> projection angle and do the forward projection separately. I can send you a >> reprojection mha file if my description is unclear to you. > I works for me. Would you be able to fill in a bug report > (http://bug.openrtk.org/) with an example? You can generate volumes > and projections with rtkdrawgeometricphantom and > rtkprojectgeometricphantom. > Simon > >> >> Thanks Simon!! >> >> Cheers, >> Andy. >> >> >> >> 2012/10/24 Simon Rit >>> >>> Hi Andy, >>> Yes you're right, I have actually noticed recently that but I have not >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >>> I used to roughly check the geometry. As far as I can remember, when I >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> but I could well have done it wrongly. I'm actually waiting for a new >>> complete Catphan acquisition from Greg to correct for this but if you >>> already have a patch to suggest or a set of images to send, feel free >>> to do it. >>> Thanks, >>> Simon >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >>> > Hi Simon, >>> > >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >>> > attenuation is calculated from the projection image simply via a >>> > negative >>> > transformation (1-Intensity/HND_MaxIntensity). >>> > Is it usually the way this is done, and is there any reason for doing >>> > this? >>> > I would have thought attenuation should be calculated from intensity via >>> > logarithm (since I=I_0 exp(-mu x)). >>> > Thanks!! >>> > >>> > Cheers, >>> > Andy >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at openrtk.org >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > >> >> From hsieandy at gmail.com Fri Nov 23 06:35:22 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 23 Nov 2012 19:35:22 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Just to let you know that the code works well!! Thanks! By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know him?), and he mentioned that he's been putting quite some effort on making RTK compatible with Varian format (HNC mainly). He mentioned that for the Varian format, we usually read in the "Norm Chamber value" (It's usually around 300) from each HNC header, and calculate the CT number by log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is around 10000. I'm not too sure about the details, but I believe he will discuss it with you soon when he has time! Cheers, Andy > > > 2012/11/19 Simon Rit > >> Hi Andy, >> I have pushed a fix for the Varian raw to attenuation conversion. Let >> me know if it meets what you've done. I will let you know if there is >> any other improvement of the conversion in the future. >> Simon >> >> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >> wrote: >> > Hi Andy, >> > >> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> >> Hi Simon, >> >> >> >> Thank you. At the moment I'm just doing something similar to what you >> did >> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >> and >> >> minus the log of intensity plus one (I assume the plus one is to avoid >> >> taking the log of zero?). >> > Does it improve the results? You are welcome to share it if you feel >> > that this is of interest for other people. >> > >> >> >> >> Another few question: >> >> 1. Are you doing any normalization after reconstruction or forward >> >> projection? >> > No. Assuming you have line integral of the attenuation as input of the >> > reconstruction algorithm, you get the attenuation. >> > >> > Are the negative values in the reconstructed images simply a >> >> result of the ramp filtering? >> > Probably. You can use rtkprojections to look at what is the input of >> > the reconstruction algorithm. >> > >> >> 2. If I want to compare a reprojection from an image reconstructed >> using RTK >> >> with the original projection, how should I make sure the normalization >> is >> >> correct? i.e. should I plus/minus or multiply the reprojected >> attenuation >> >> before I use exponential and make it back to intensity values? >> > You basically have to do the inverse formula to what you have done. An >> > easy way of looking at what is going on with forward projections is to >> > look at this example: >> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >> > >> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> >> projecting using a geometry file containing several Projection >> (Angle). The >> >> output mha file seems to "repeat" after a couple of projections >> instead of >> >> showing all projections. I'm testing this on a Varian Half Fan >> geometry - it >> >> works fine if I break the geometry file down into one each for each >> >> projection angle and do the forward projection separately. I can send >> you a >> >> reprojection mha file if my description is unclear to you. >> > I works for me. Would you be able to fill in a bug report >> > (http://bug.openrtk.org/) with an example? You can generate volumes >> > and projections with rtkdrawgeometricphantom and >> > rtkprojectgeometricphantom. >> > Simon >> > >> >> >> >> Thanks Simon!! >> >> >> >> Cheers, >> >> Andy. >> >> >> >> >> >> >> >> 2012/10/24 Simon Rit >> >>> >> >>> Hi Andy, >> >>> Yes you're right, I have actually noticed recently that but I have not >> >>> worked a lot on Varian images because we don't have a Varian CBCT in >> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> >>> I used to roughly check the geometry. As far as I can remember, when I >> >>> wrote this piece of code, I tried to use the same code as Plastimatch >> >>> but I could well have done it wrongly. I'm actually waiting for a new >> >>> complete Catphan acquisition from Greg to correct for this but if you >> >>> already have a patch to suggest or a set of images to send, feel free >> >>> to do it. >> >>> Thanks, >> >>> Simon >> >>> >> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >> wrote: >> >>> > Hi Simon, >> >>> > >> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >> the >> >>> > attenuation is calculated from the projection image simply via a >> >>> > negative >> >>> > transformation (1-Intensity/HND_MaxIntensity). >> >>> > Is it usually the way this is done, and is there any reason for >> doing >> >>> > this? >> >>> > I would have thought attenuation should be calculated from >> intensity via >> >>> > logarithm (since I=I_0 exp(-mu x)). >> >>> > Thanks!! >> >>> > >> >>> > Cheers, >> >>> > Andy >> >>> > >> >>> > _______________________________________________ >> >>> > Rtk-users mailing list >> >>> > Rtk-users at openrtk.org >> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> > >> >> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Mon Nov 26 08:45:42 2012 From: gdhugo at vcu.edu (Geoff Hugo) Date: Mon, 26 Nov 2012 08:45:42 -0500 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: <50B37286.7020809@vcu.edu> An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 28 03:51:12 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Nov 2012 09:51:12 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: <50B37286.7020809@vcu.edu> References: <50B37286.7020809@vcu.edu> Message-ID: Hi, Thanks for the feeback. I don't know any users that actively use Varian projection images. I will put a Catphan dataset online soon that has been provided by Greg Sharp and I'll try to adjust reconstructed values to linear attenuation. A filter to convert from linear to attenuation to HU is rather easy to add if one feels it's required. Simon On Mon, Nov 26, 2012 at 2:45 PM, Geoff Hugo wrote: > Hi Simon and Andy, > > The ScaleFactor we use at VCU is a rough conversion from linear attenuation > coefficient (the output of RTK) to something roughly around CT number > (Hounsfield Units). This is not a proper conversion, just a placeholder for > now. I'm not sure how useful the HNC-compatible version we have at VCU will > be to the wider community, as HNC is not a generally available format and > HND is the more common one. Are there any other users of RTK that use > Varian HNC format projections? > > Geoff > > On 11/23/12 6:35 AM, Andy Shieh wrote: > > Hi Simon, > > Just to let you know that the code works well!! Thanks! > > By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know > him?), and he mentioned that he's been putting quite some effort on making > RTK compatible with Varian format (HNC mainly). He mentioned that for the > Varian format, we usually read in the "Norm Chamber value" (It's usually > around 300) from each HNC header, and calculate the CT number by > log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is > around 10000. I'm not too sure about the details, but I believe he will > discuss it with you soon when he has time! > > Cheers, > Andy > >> >> >> >> 2012/11/19 Simon Rit >>> >>> Hi Andy, >>> I have pushed a fix for the Varian raw to attenuation conversion. Let >>> me know if it meets what you've done. I will let you know if there is >>> any other improvement of the conversion in the future. >>> Simon >>> >>> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >>> wrote: >>> > Hi Andy, >>> > >>> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >>> >> Hi Simon, >>> >> >>> >> Thank you. At the moment I'm just doing something similar to what you >>> >> did >>> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >>> >> and >>> >> minus the log of intensity plus one (I assume the plus one is to avoid >>> >> taking the log of zero?). >>> > Does it improve the results? You are welcome to share it if you feel >>> > that this is of interest for other people. >>> > >>> >> >>> >> Another few question: >>> >> 1. Are you doing any normalization after reconstruction or forward >>> >> projection? >>> > No. Assuming you have line integral of the attenuation as input of the >>> > reconstruction algorithm, you get the attenuation. >>> > >>> > Are the negative values in the reconstructed images simply a >>> >> result of the ramp filtering? >>> > Probably. You can use rtkprojections to look at what is the input of >>> > the reconstruction algorithm. >>> > >>> >> 2. If I want to compare a reprojection from an image reconstructed >>> >> using RTK >>> >> with the original projection, how should I make sure the normalization >>> >> is >>> >> correct? i.e. should I plus/minus or multiply the reprojected >>> >> attenuation >>> >> before I use exponential and make it back to intensity values? >>> > You basically have to do the inverse formula to what you have done. An >>> > easy way of looking at what is going on with forward projections is to >>> > look at this example: >>> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >>> > >>> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >>> >> projecting using a geometry file containing several Projection >>> >> (Angle). The >>> >> output mha file seems to "repeat" after a couple of projections >>> >> instead of >>> >> showing all projections. I'm testing this on a Varian Half Fan >>> >> geometry - it >>> >> works fine if I break the geometry file down into one each for each >>> >> projection angle and do the forward projection separately. I can send >>> >> you a >>> >> reprojection mha file if my description is unclear to you. >>> > I works for me. Would you be able to fill in a bug report >>> > (http://bug.openrtk.org/) with an example? You can generate volumes >>> > and projections with rtkdrawgeometricphantom and >>> > rtkprojectgeometricphantom. >>> > Simon >>> > >>> >> >>> >> Thanks Simon!! >>> >> >>> >> Cheers, >>> >> Andy. >>> >> >>> >> >>> >> >>> >> 2012/10/24 Simon Rit >>> >>> >>> >>> Hi Andy, >>> >>> Yes you're right, I have actually noticed recently that but I have >>> >>> not >>> >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan >>> >>> that >>> >>> I used to roughly check the geometry. As far as I can remember, when >>> >>> I >>> >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> >>> but I could well have done it wrongly. I'm actually waiting for a new >>> >>> complete Catphan acquisition from Greg to correct for this but if you >>> >>> already have a patch to suggest or a set of images to send, feel free >>> >>> to do it. >>> >>> Thanks, >>> >>> Simon >>> >>> >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >>> >>> wrote: >>> >>> > Hi Simon, >>> >>> > >>> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >>> >>> > the >>> >>> > attenuation is calculated from the projection image simply via a >>> >>> > negative >>> >>> > transformation (1-Intensity/HND_MaxIntensity). >>> >>> > Is it usually the way this is done, and is there any reason for >>> >>> > doing >>> >>> > this? >>> >>> > I would have thought attenuation should be calculated from >>> >>> > intensity via >>> >>> > logarithm (since I=I_0 exp(-mu x)). >>> >>> > Thanks!! >>> >>> > >>> >>> > Cheers, >>> >>> > Andy >>> >>> > >>> >>> > _______________________________________________ >>> >>> > Rtk-users mailing list >>> >>> > Rtk-users at openrtk.org >>> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> >>> > >>> >> >>> >> >> >> > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -- > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Assistant Professor > Dept. of Radiation Oncology > Virginia Commonwealth University > gdhugo at vcu.edu From hsieandy at gmail.com Thu Nov 29 01:03:44 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 14:03:44 +0800 Subject: [Rtk-users] Compiling with CUDA Message-ID: Hi Simon, Lately I've been trying to build RTK with CUDA. I tried both the CUDA production release 5.0 and 4.2. I doubled checked that CUDA is actually working (the CUDA examples run properly). And I made sure that the CUDA and CUDA SDK directories are correctly specified in the configuration when generating the build files. However, I keep getting these linking errors when I tried to compile RTK using Visual Studio 2010. Do you have any idea what might be going on? Thanks. I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. ============================================= Error 1 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 2 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 3 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 4 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 5 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkinlinefdk Error 6 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk Error 7 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 8 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 9 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 10 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 11 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkfdk Error 12 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk ============================================= Cheers, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 02:11:32 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 15:11:32 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, The problem seems to disappear when I updated the whole directory to the newest version of RTK. Cheers, Andy 2012/11/29 Andy Shieh > Hi Simon, > > Lately I've been trying to build RTK with CUDA. I tried both the CUDA > production release 5.0 and 4.2. I doubled checked that CUDA is actually > working (the CUDA examples run properly). And I made sure that the CUDA and > CUDA SDK directories are correctly specified in the configuration when > generating the build files. However, I keep getting these linking errors > when I tried to compile RTK using Visual Studio 2010. Do you have any idea > what might be going on? Thanks. > > I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > > ============================================= > Error 1 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 2 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 3 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 4 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 5 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkinlinefdk > Error 6 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk > Error 7 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 8 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 9 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 10 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 11 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkfdk > Error 12 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > ============================================= > > Cheers, > Andy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 02:15:48 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 08:15:48 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Great! I had no clue what the problem was.... Let us know if when we can help you with anything else, Simon On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > Hi Simon, > > The problem seems to disappear when I updated the whole directory to the > newest version of RTK. > > Cheers, > Andy > > > 2012/11/29 Andy Shieh > >> Hi Simon, >> >> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> production release 5.0 and 4.2. I doubled checked that CUDA is actually >> working (the CUDA examples run properly). And I made sure that the CUDA and >> CUDA SDK directories are correctly specified in the configuration when >> generating the build files. However, I keep getting these linking errors >> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >> what might be going on? Thanks. >> >> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >> ============================================= >> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 2 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkinlinefdk >> Error 6 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 8 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkfdk >> Error 12 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> ============================================= >> >> Cheers, >> Andy >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 03:57:51 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 16:57:51 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, I do encounter another problem though. So everything compiled file and rtkfdk works fine with cpu. However, when I change the hardware argument to cuda, I get the following runtime error when rtkfdk is "Reconstructing and Writing": ======================== ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000B3EC88) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 85 Description: itk::ERROR: CUFFT ERROR #2 ========================== I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. Do you know what might be happening? Thanks! Cheers, Andy 2012/11/29 Simon Rit > Great! I had no clue what the problem was.... Let us know if when we can > help you with anything else, > Simon > On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >> Hi Simon, >> >> The problem seems to disappear when I updated the whole directory to the >> newest version of RTK. >> >> Cheers, >> Andy >> >> >> 2012/11/29 Andy Shieh >> >>> Hi Simon, >>> >>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>> working (the CUDA examples run properly). And I made sure that the CUDA and >>> CUDA SDK directories are correctly specified in the configuration when >>> generating the build files. However, I keep getting these linking errors >>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>> what might be going on? Thanks. >>> >>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>> >>> ============================================= >>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 2 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkinlinefdk >>> Error 6 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >>> rtkinlinefdk >>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 8 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkfdk >>> Error 12 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>> ============================================= >>> >>> Cheers, >>> Andy >>> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at openrtk.org >> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 05:08:15 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 11:08:15 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi, It's seems to be an allocation problem. How big are your projection images? You can always change the parameter m_ProjectionSubsetSize to 1 with http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 to lower the amount of projection images in the GPU memory. Simon On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > Hi Simon, > > I do encounter another problem though. > So everything compiled file and rtkfdk works fine with cpu. > However, when I change the hardware argument to cuda, I get the following > runtime error when rtkfdk is "Reconstructing and Writing": > > ======================== > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000B3EC88) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 85 > Description: itk::ERROR: CUFFT ERROR #2 > ========================== > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. > Do you know what might be happening? Thanks! > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Great! I had no clue what the problem was.... Let us know if when we can >> help you with anything else, >> Simon >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >>> >>> Hi Simon, >>> >>> The problem seems to disappear when I updated the whole directory to the >>> newest version of RTK. >>> >>> Cheers, >>> Andy >>> >>> >>> 2012/11/29 Andy Shieh >>>> >>>> Hi Simon, >>>> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>>> working (the CUDA examples run properly). And I made sure that the CUDA and >>>> CUDA SDK directories are correctly specified in the configuration when >>>> generating the build files. However, I keep getting these linking errors >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>>> what might be going on? Thanks. >>>> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>>> >>>> ============================================= >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 2 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkinlinefdk >>>> Error 6 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 8 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkfdk >>>> Error 12 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>>> ============================================= >>>> >>>> Cheers, >>>> Andy >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at openrtk.org >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > From hsieandy at gmail.com Thu Nov 29 07:53:57 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 20:53:57 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, Thanks for the suggestion. I tried, but it gave another error message. When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following runtime error: =============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A5E8D8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 102 Description: itk::ERROR: CUDA ERROR: invalid configuration argument ================ When I set it to the default value of 4, I get the CUFFT error in the previous maile. When I set it to 5, 6, and beyond, I get the following runtime error: ============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A2ECB8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 69 Description: itk::ERROR: CUDA ERROR: out of memory ============== Cheers, Andy 2012/11/29 Simon Rit > Hi, > It's seems to be an allocation problem. How big are your projection images? > You can always change the parameter m_ProjectionSubsetSize to 1 with > > http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 > to lower the amount of projection images in the GPU memory. > Simon > > On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > > Hi Simon, > > > > I do encounter another problem though. > > So everything compiled file and rtkfdk works fine with cpu. > > However, when I change the hardware argument to cuda, I get the following > > runtime error when rtkfdk is "Reconstructing and Writing": > > > > ======================== > > ExceptionObject caught with writer->Update() > > > > itk::ExceptionObject (0000000000B3EC88) > > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > > Line: 85 > > Description: itk::ERROR: CUFFT ERROR #2 > > ========================== > > > > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't > help. > > Do you know what might be happening? Thanks! > > > > Cheers, > > Andy > > > > > > 2012/11/29 Simon Rit > >> > >> Great! I had no clue what the problem was.... Let us know if when we can > >> help you with anything else, > >> Simon > >> > >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >>> > >>> Hi Simon, > >>> > >>> The problem seems to disappear when I updated the whole directory to > the > >>> newest version of RTK. > >>> > >>> Cheers, > >>> Andy > >>> > >>> > >>> 2012/11/29 Andy Shieh > >>>> > >>>> Hi Simon, > >>>> > >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA > >>>> production release 5.0 and 4.2. I doubled checked that CUDA is > actually > >>>> working (the CUDA examples run properly). And I made sure that the > CUDA and > >>>> CUDA SDK directories are correctly specified in the configuration when > >>>> generating the build files. However, I keep getting these linking > errors > >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any > idea > >>>> what might be going on? Thanks. > >>>> > >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > >>>> > >>>> ============================================= > >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 2 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 6 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe > rtkinlinefdk > >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 8 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkfdk > >>>> Error 12 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > >>>> ============================================= > >>>> > >>>> Cheers, > >>>> Andy > >>> > >>> > >>> > >>> _______________________________________________ > >>> Rtk-users mailing list > >>> Rtk-users at openrtk.org > >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > >>> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 13:33:56 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 19:33:56 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Andy, It seems that you have very little GPU memory. Do you know what graphics card you have? If I were you, I would start with a smaller volume with the --dimension option if you use my command line tools (modify as well the spacing at first, e.g., --spacing 8 --dimension 32). You can also use the --divisions option to split the volume in pieces but you then redo the filtering of all projection images. BTW, would you have two graphics card, there is nohing to select one over the other. Maybe this is what happens to you? You can then modify "GetListOfCudaDevices" and add some parameters to select the graphics card based on the memory. Let me know if I can help more, Simon On Thu, Nov 29, 2012 at 1:53 PM, Andy Shieh wrote: > Hi Simon, > > Thanks for the suggestion. I tried, but it gave another error message. > > When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following > runtime error: > =============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A5E8D8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 102 > Description: itk::ERROR: CUDA ERROR: invalid configuration argument > ================ > > > When I set it to the default value of 4, I get the CUFFT error in the > previous maile. > > > When I set it to 5, 6, and beyond, I get the following runtime error: > ============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A2ECB8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 69 > Description: itk::ERROR: CUDA ERROR: out of memory > ============== > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Hi, >> It's seems to be an allocation problem. How big are your projection >> images? >> You can always change the parameter m_ProjectionSubsetSize to 1 with >> >> http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 >> to lower the amount of projection images in the GPU memory. >> Simon >> >> On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I do encounter another problem though. >> > So everything compiled file and rtkfdk works fine with cpu. >> > However, when I change the hardware argument to cuda, I get the >> > following >> > runtime error when rtkfdk is "Reconstructing and Writing": >> > >> > ======================== >> > ExceptionObject caught with writer->Update() >> > >> > itk::ExceptionObject (0000000000B3EC88) >> > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" >> > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu >> > Line: 85 >> > Description: itk::ERROR: CUFFT ERROR #2 >> > ========================== >> > >> > >> > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't >> > help. >> > Do you know what might be happening? Thanks! >> > >> > Cheers, >> > Andy >> > >> > >> > 2012/11/29 Simon Rit >> >> >> >> Great! I had no clue what the problem was.... Let us know if when we >> >> can >> >> help you with anything else, >> >> Simon >> >> >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >> >>> >> >>> Hi Simon, >> >>> >> >>> The problem seems to disappear when I updated the whole directory to >> >>> the >> >>> newest version of RTK. >> >>> >> >>> Cheers, >> >>> Andy >> >>> >> >>> >> >>> 2012/11/29 Andy Shieh >> >>>> >> >>>> Hi Simon, >> >>>> >> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> >>>> production release 5.0 and 4.2. I doubled checked that CUDA is >> >>>> actually >> >>>> working (the CUDA examples run properly). And I made sure that the >> >>>> CUDA and >> >>>> CUDA SDK directories are correctly specified in the configuration >> >>>> when >> >>>> generating the build files. However, I keep getting these linking >> >>>> errors >> >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any >> >>>> idea >> >>>> what might be going on? Thanks. >> >>>> >> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >>>> >> >>>> ============================================= >> >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 2 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 6 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >> >>>> rtkinlinefdk >> >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 8 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 12 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> >>>> ============================================= >> >>>> >> >>>> Cheers, >> >>>> Andy >> >>> >> >>> >> >>> >> >>> _______________________________________________ >> >>> Rtk-users mailing list >> >>> Rtk-users at openrtk.org >> >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> >> > > > From hsieandy at gmail.com Thu Nov 8 11:58:35 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 9 Nov 2012 00:58:35 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Thank you. At the moment I'm just doing something similar to what you did for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and minus the log of intensity plus one (I assume the plus one is to avoid taking the log of zero?). Another few question: 1. Are you doing any normalization after reconstruction or forward projection? Are the negative values in the reconstructed images simply a result of the ramp filtering? 2. If I want to compare a reprojection from an image reconstructed using RTK with the original projection, how should I make sure the normalization is correct? i.e. should I plus/minus or multiply the reprojected attenuation before I use exponential and make it back to intensity values? 3. The rtkforward projections doesn't seem to work correctly when I'm projecting using a geometry file containing several Projection (Angle). The output mha file seems to "repeat" after a couple of projections instead of showing all projections. I'm testing this on a Varian Half Fan geometry - it works fine if I break the geometry file down into one each for each projection angle and do the forward projection separately. I can send you a reprojection mha file if my description is unclear to you. Thanks Simon!! Cheers, Andy. 2012/10/24 Simon Rit > Hi Andy, > Yes you're right, I have actually noticed recently that but I have not > worked a lot on Varian images because we don't have a Varian CBCT in > Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that > I used to roughly check the geometry. As far as I can remember, when I > wrote this piece of code, I tried to use the same code as Plastimatch > but I could well have done it wrongly. I'm actually waiting for a new > complete Catphan acquisition from Greg to correct for this but if you > already have a patch to suggest or a set of images to send, feel free > to do it. > Thanks, > Simon > > On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: > > Hi Simon, > > > > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the > > attenuation is calculated from the projection image simply via a negative > > transformation (1-Intensity/HND_MaxIntensity). > > Is it usually the way this is done, and is there any reason for doing > this? > > I would have thought attenuation should be calculated from intensity via > > logarithm (since I=I_0 exp(-mu x)). > > Thanks!! > > > > Cheers, > > Andy > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at openrtk.org > > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Nov 9 03:03:04 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 9 Nov 2012 09:03:04 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: > Hi Simon, > > Thank you. At the moment I'm just doing something similar to what you did > for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and > minus the log of intensity plus one (I assume the plus one is to avoid > taking the log of zero?). Does it improve the results? You are welcome to share it if you feel that this is of interest for other people. > > Another few question: > 1. Are you doing any normalization after reconstruction or forward > projection? No. Assuming you have line integral of the attenuation as input of the reconstruction algorithm, you get the attenuation. Are the negative values in the reconstructed images simply a > result of the ramp filtering? Probably. You can use rtkprojections to look at what is the input of the reconstruction algorithm. > 2. If I want to compare a reprojection from an image reconstructed using RTK > with the original projection, how should I make sure the normalization is > correct? i.e. should I plus/minus or multiply the reprojected attenuation > before I use exponential and make it back to intensity values? You basically have to do the inverse formula to what you have done. An easy way of looking at what is going on with forward projections is to look at this example: http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > 3. The rtkforward projections doesn't seem to work correctly when I'm > projecting using a geometry file containing several Projection (Angle). The > output mha file seems to "repeat" after a couple of projections instead of > showing all projections. I'm testing this on a Varian Half Fan geometry - it > works fine if I break the geometry file down into one each for each > projection angle and do the forward projection separately. I can send you a > reprojection mha file if my description is unclear to you. I works for me. Would you be able to fill in a bug report (http://bug.openrtk.org/) with an example? You can generate volumes and projections with rtkdrawgeometricphantom and rtkprojectgeometricphantom. Simon > > Thanks Simon!! > > Cheers, > Andy. > > > > 2012/10/24 Simon Rit >> >> Hi Andy, >> Yes you're right, I have actually noticed recently that but I have not >> worked a lot on Varian images because we don't have a Varian CBCT in >> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> I used to roughly check the geometry. As far as I can remember, when I >> wrote this piece of code, I tried to use the same code as Plastimatch >> but I could well have done it wrongly. I'm actually waiting for a new >> complete Catphan acquisition from Greg to correct for this but if you >> already have a patch to suggest or a set of images to send, feel free >> to do it. >> Thanks, >> Simon >> >> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >> > attenuation is calculated from the projection image simply via a >> > negative >> > transformation (1-Intensity/HND_MaxIntensity). >> > Is it usually the way this is done, and is there any reason for doing >> > this? >> > I would have thought attenuation should be calculated from intensity via >> > logarithm (since I=I_0 exp(-mu x)). >> > Thanks!! >> > >> > Cheers, >> > Andy >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at openrtk.org >> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> > > > From simon.rit at creatis.insa-lyon.fr Mon Nov 19 05:37:18 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 19 Nov 2012 11:37:18 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, I have pushed a fix for the Varian raw to attenuation conversion. Let me know if it meets what you've done. I will let you know if there is any other improvement of the conversion in the future. Simon On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit wrote: > Hi Andy, > > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> Hi Simon, >> >> Thank you. At the moment I'm just doing something similar to what you did >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and >> minus the log of intensity plus one (I assume the plus one is to avoid >> taking the log of zero?). > Does it improve the results? You are welcome to share it if you feel > that this is of interest for other people. > >> >> Another few question: >> 1. Are you doing any normalization after reconstruction or forward >> projection? > No. Assuming you have line integral of the attenuation as input of the > reconstruction algorithm, you get the attenuation. > > Are the negative values in the reconstructed images simply a >> result of the ramp filtering? > Probably. You can use rtkprojections to look at what is the input of > the reconstruction algorithm. > >> 2. If I want to compare a reprojection from an image reconstructed using RTK >> with the original projection, how should I make sure the normalization is >> correct? i.e. should I plus/minus or multiply the reprojected attenuation >> before I use exponential and make it back to intensity values? > You basically have to do the inverse formula to what you have done. An > easy way of looking at what is going on with forward projections is to > look at this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> projecting using a geometry file containing several Projection (Angle). The >> output mha file seems to "repeat" after a couple of projections instead of >> showing all projections. I'm testing this on a Varian Half Fan geometry - it >> works fine if I break the geometry file down into one each for each >> projection angle and do the forward projection separately. I can send you a >> reprojection mha file if my description is unclear to you. > I works for me. Would you be able to fill in a bug report > (http://bug.openrtk.org/) with an example? You can generate volumes > and projections with rtkdrawgeometricphantom and > rtkprojectgeometricphantom. > Simon > >> >> Thanks Simon!! >> >> Cheers, >> Andy. >> >> >> >> 2012/10/24 Simon Rit >>> >>> Hi Andy, >>> Yes you're right, I have actually noticed recently that but I have not >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >>> I used to roughly check the geometry. As far as I can remember, when I >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> but I could well have done it wrongly. I'm actually waiting for a new >>> complete Catphan acquisition from Greg to correct for this but if you >>> already have a patch to suggest or a set of images to send, feel free >>> to do it. >>> Thanks, >>> Simon >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >>> > Hi Simon, >>> > >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >>> > attenuation is calculated from the projection image simply via a >>> > negative >>> > transformation (1-Intensity/HND_MaxIntensity). >>> > Is it usually the way this is done, and is there any reason for doing >>> > this? >>> > I would have thought attenuation should be calculated from intensity via >>> > logarithm (since I=I_0 exp(-mu x)). >>> > Thanks!! >>> > >>> > Cheers, >>> > Andy >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at openrtk.org >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > >> >> From hsieandy at gmail.com Fri Nov 23 06:35:22 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 23 Nov 2012 19:35:22 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Just to let you know that the code works well!! Thanks! By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know him?), and he mentioned that he's been putting quite some effort on making RTK compatible with Varian format (HNC mainly). He mentioned that for the Varian format, we usually read in the "Norm Chamber value" (It's usually around 300) from each HNC header, and calculate the CT number by log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is around 10000. I'm not too sure about the details, but I believe he will discuss it with you soon when he has time! Cheers, Andy > > > 2012/11/19 Simon Rit > >> Hi Andy, >> I have pushed a fix for the Varian raw to attenuation conversion. Let >> me know if it meets what you've done. I will let you know if there is >> any other improvement of the conversion in the future. >> Simon >> >> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >> wrote: >> > Hi Andy, >> > >> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> >> Hi Simon, >> >> >> >> Thank you. At the moment I'm just doing something similar to what you >> did >> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >> and >> >> minus the log of intensity plus one (I assume the plus one is to avoid >> >> taking the log of zero?). >> > Does it improve the results? You are welcome to share it if you feel >> > that this is of interest for other people. >> > >> >> >> >> Another few question: >> >> 1. Are you doing any normalization after reconstruction or forward >> >> projection? >> > No. Assuming you have line integral of the attenuation as input of the >> > reconstruction algorithm, you get the attenuation. >> > >> > Are the negative values in the reconstructed images simply a >> >> result of the ramp filtering? >> > Probably. You can use rtkprojections to look at what is the input of >> > the reconstruction algorithm. >> > >> >> 2. If I want to compare a reprojection from an image reconstructed >> using RTK >> >> with the original projection, how should I make sure the normalization >> is >> >> correct? i.e. should I plus/minus or multiply the reprojected >> attenuation >> >> before I use exponential and make it back to intensity values? >> > You basically have to do the inverse formula to what you have done. An >> > easy way of looking at what is going on with forward projections is to >> > look at this example: >> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >> > >> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> >> projecting using a geometry file containing several Projection >> (Angle). The >> >> output mha file seems to "repeat" after a couple of projections >> instead of >> >> showing all projections. I'm testing this on a Varian Half Fan >> geometry - it >> >> works fine if I break the geometry file down into one each for each >> >> projection angle and do the forward projection separately. I can send >> you a >> >> reprojection mha file if my description is unclear to you. >> > I works for me. Would you be able to fill in a bug report >> > (http://bug.openrtk.org/) with an example? You can generate volumes >> > and projections with rtkdrawgeometricphantom and >> > rtkprojectgeometricphantom. >> > Simon >> > >> >> >> >> Thanks Simon!! >> >> >> >> Cheers, >> >> Andy. >> >> >> >> >> >> >> >> 2012/10/24 Simon Rit >> >>> >> >>> Hi Andy, >> >>> Yes you're right, I have actually noticed recently that but I have not >> >>> worked a lot on Varian images because we don't have a Varian CBCT in >> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> >>> I used to roughly check the geometry. As far as I can remember, when I >> >>> wrote this piece of code, I tried to use the same code as Plastimatch >> >>> but I could well have done it wrongly. I'm actually waiting for a new >> >>> complete Catphan acquisition from Greg to correct for this but if you >> >>> already have a patch to suggest or a set of images to send, feel free >> >>> to do it. >> >>> Thanks, >> >>> Simon >> >>> >> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >> wrote: >> >>> > Hi Simon, >> >>> > >> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >> the >> >>> > attenuation is calculated from the projection image simply via a >> >>> > negative >> >>> > transformation (1-Intensity/HND_MaxIntensity). >> >>> > Is it usually the way this is done, and is there any reason for >> doing >> >>> > this? >> >>> > I would have thought attenuation should be calculated from >> intensity via >> >>> > logarithm (since I=I_0 exp(-mu x)). >> >>> > Thanks!! >> >>> > >> >>> > Cheers, >> >>> > Andy >> >>> > >> >>> > _______________________________________________ >> >>> > Rtk-users mailing list >> >>> > Rtk-users at openrtk.org >> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> > >> >> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Mon Nov 26 08:45:42 2012 From: gdhugo at vcu.edu (Geoff Hugo) Date: Mon, 26 Nov 2012 08:45:42 -0500 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: <50B37286.7020809@vcu.edu> An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 28 03:51:12 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Nov 2012 09:51:12 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: <50B37286.7020809@vcu.edu> References: <50B37286.7020809@vcu.edu> Message-ID: Hi, Thanks for the feeback. I don't know any users that actively use Varian projection images. I will put a Catphan dataset online soon that has been provided by Greg Sharp and I'll try to adjust reconstructed values to linear attenuation. A filter to convert from linear to attenuation to HU is rather easy to add if one feels it's required. Simon On Mon, Nov 26, 2012 at 2:45 PM, Geoff Hugo wrote: > Hi Simon and Andy, > > The ScaleFactor we use at VCU is a rough conversion from linear attenuation > coefficient (the output of RTK) to something roughly around CT number > (Hounsfield Units). This is not a proper conversion, just a placeholder for > now. I'm not sure how useful the HNC-compatible version we have at VCU will > be to the wider community, as HNC is not a generally available format and > HND is the more common one. Are there any other users of RTK that use > Varian HNC format projections? > > Geoff > > On 11/23/12 6:35 AM, Andy Shieh wrote: > > Hi Simon, > > Just to let you know that the code works well!! Thanks! > > By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know > him?), and he mentioned that he's been putting quite some effort on making > RTK compatible with Varian format (HNC mainly). He mentioned that for the > Varian format, we usually read in the "Norm Chamber value" (It's usually > around 300) from each HNC header, and calculate the CT number by > log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is > around 10000. I'm not too sure about the details, but I believe he will > discuss it with you soon when he has time! > > Cheers, > Andy > >> >> >> >> 2012/11/19 Simon Rit >>> >>> Hi Andy, >>> I have pushed a fix for the Varian raw to attenuation conversion. Let >>> me know if it meets what you've done. I will let you know if there is >>> any other improvement of the conversion in the future. >>> Simon >>> >>> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >>> wrote: >>> > Hi Andy, >>> > >>> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >>> >> Hi Simon, >>> >> >>> >> Thank you. At the moment I'm just doing something similar to what you >>> >> did >>> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >>> >> and >>> >> minus the log of intensity plus one (I assume the plus one is to avoid >>> >> taking the log of zero?). >>> > Does it improve the results? You are welcome to share it if you feel >>> > that this is of interest for other people. >>> > >>> >> >>> >> Another few question: >>> >> 1. Are you doing any normalization after reconstruction or forward >>> >> projection? >>> > No. Assuming you have line integral of the attenuation as input of the >>> > reconstruction algorithm, you get the attenuation. >>> > >>> > Are the negative values in the reconstructed images simply a >>> >> result of the ramp filtering? >>> > Probably. You can use rtkprojections to look at what is the input of >>> > the reconstruction algorithm. >>> > >>> >> 2. If I want to compare a reprojection from an image reconstructed >>> >> using RTK >>> >> with the original projection, how should I make sure the normalization >>> >> is >>> >> correct? i.e. should I plus/minus or multiply the reprojected >>> >> attenuation >>> >> before I use exponential and make it back to intensity values? >>> > You basically have to do the inverse formula to what you have done. An >>> > easy way of looking at what is going on with forward projections is to >>> > look at this example: >>> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >>> > >>> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >>> >> projecting using a geometry file containing several Projection >>> >> (Angle). The >>> >> output mha file seems to "repeat" after a couple of projections >>> >> instead of >>> >> showing all projections. I'm testing this on a Varian Half Fan >>> >> geometry - it >>> >> works fine if I break the geometry file down into one each for each >>> >> projection angle and do the forward projection separately. I can send >>> >> you a >>> >> reprojection mha file if my description is unclear to you. >>> > I works for me. Would you be able to fill in a bug report >>> > (http://bug.openrtk.org/) with an example? You can generate volumes >>> > and projections with rtkdrawgeometricphantom and >>> > rtkprojectgeometricphantom. >>> > Simon >>> > >>> >> >>> >> Thanks Simon!! >>> >> >>> >> Cheers, >>> >> Andy. >>> >> >>> >> >>> >> >>> >> 2012/10/24 Simon Rit >>> >>> >>> >>> Hi Andy, >>> >>> Yes you're right, I have actually noticed recently that but I have >>> >>> not >>> >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan >>> >>> that >>> >>> I used to roughly check the geometry. As far as I can remember, when >>> >>> I >>> >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> >>> but I could well have done it wrongly. I'm actually waiting for a new >>> >>> complete Catphan acquisition from Greg to correct for this but if you >>> >>> already have a patch to suggest or a set of images to send, feel free >>> >>> to do it. >>> >>> Thanks, >>> >>> Simon >>> >>> >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >>> >>> wrote: >>> >>> > Hi Simon, >>> >>> > >>> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >>> >>> > the >>> >>> > attenuation is calculated from the projection image simply via a >>> >>> > negative >>> >>> > transformation (1-Intensity/HND_MaxIntensity). >>> >>> > Is it usually the way this is done, and is there any reason for >>> >>> > doing >>> >>> > this? >>> >>> > I would have thought attenuation should be calculated from >>> >>> > intensity via >>> >>> > logarithm (since I=I_0 exp(-mu x)). >>> >>> > Thanks!! >>> >>> > >>> >>> > Cheers, >>> >>> > Andy >>> >>> > >>> >>> > _______________________________________________ >>> >>> > Rtk-users mailing list >>> >>> > Rtk-users at openrtk.org >>> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> >>> > >>> >> >>> >> >> >> > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -- > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Assistant Professor > Dept. of Radiation Oncology > Virginia Commonwealth University > gdhugo at vcu.edu From hsieandy at gmail.com Thu Nov 29 01:03:44 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 14:03:44 +0800 Subject: [Rtk-users] Compiling with CUDA Message-ID: Hi Simon, Lately I've been trying to build RTK with CUDA. I tried both the CUDA production release 5.0 and 4.2. I doubled checked that CUDA is actually working (the CUDA examples run properly). And I made sure that the CUDA and CUDA SDK directories are correctly specified in the configuration when generating the build files. However, I keep getting these linking errors when I tried to compile RTK using Visual Studio 2010. Do you have any idea what might be going on? Thanks. I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. ============================================= Error 1 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 2 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 3 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 4 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 5 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkinlinefdk Error 6 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk Error 7 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 8 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 9 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 10 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 11 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkfdk Error 12 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk ============================================= Cheers, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 02:11:32 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 15:11:32 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, The problem seems to disappear when I updated the whole directory to the newest version of RTK. Cheers, Andy 2012/11/29 Andy Shieh > Hi Simon, > > Lately I've been trying to build RTK with CUDA. I tried both the CUDA > production release 5.0 and 4.2. I doubled checked that CUDA is actually > working (the CUDA examples run properly). And I made sure that the CUDA and > CUDA SDK directories are correctly specified in the configuration when > generating the build files. However, I keep getting these linking errors > when I tried to compile RTK using Visual Studio 2010. Do you have any idea > what might be going on? Thanks. > > I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > > ============================================= > Error 1 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 2 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 3 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 4 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 5 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkinlinefdk > Error 6 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk > Error 7 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 8 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 9 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 10 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 11 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkfdk > Error 12 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > ============================================= > > Cheers, > Andy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 02:15:48 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 08:15:48 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Great! I had no clue what the problem was.... Let us know if when we can help you with anything else, Simon On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > Hi Simon, > > The problem seems to disappear when I updated the whole directory to the > newest version of RTK. > > Cheers, > Andy > > > 2012/11/29 Andy Shieh > >> Hi Simon, >> >> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> production release 5.0 and 4.2. I doubled checked that CUDA is actually >> working (the CUDA examples run properly). And I made sure that the CUDA and >> CUDA SDK directories are correctly specified in the configuration when >> generating the build files. However, I keep getting these linking errors >> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >> what might be going on? Thanks. >> >> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >> ============================================= >> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 2 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkinlinefdk >> Error 6 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 8 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkfdk >> Error 12 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> ============================================= >> >> Cheers, >> Andy >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 03:57:51 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 16:57:51 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, I do encounter another problem though. So everything compiled file and rtkfdk works fine with cpu. However, when I change the hardware argument to cuda, I get the following runtime error when rtkfdk is "Reconstructing and Writing": ======================== ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000B3EC88) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 85 Description: itk::ERROR: CUFFT ERROR #2 ========================== I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. Do you know what might be happening? Thanks! Cheers, Andy 2012/11/29 Simon Rit > Great! I had no clue what the problem was.... Let us know if when we can > help you with anything else, > Simon > On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >> Hi Simon, >> >> The problem seems to disappear when I updated the whole directory to the >> newest version of RTK. >> >> Cheers, >> Andy >> >> >> 2012/11/29 Andy Shieh >> >>> Hi Simon, >>> >>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>> working (the CUDA examples run properly). And I made sure that the CUDA and >>> CUDA SDK directories are correctly specified in the configuration when >>> generating the build files. However, I keep getting these linking errors >>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>> what might be going on? Thanks. >>> >>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>> >>> ============================================= >>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 2 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkinlinefdk >>> Error 6 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >>> rtkinlinefdk >>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 8 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkfdk >>> Error 12 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>> ============================================= >>> >>> Cheers, >>> Andy >>> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at openrtk.org >> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 05:08:15 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 11:08:15 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi, It's seems to be an allocation problem. How big are your projection images? You can always change the parameter m_ProjectionSubsetSize to 1 with http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 to lower the amount of projection images in the GPU memory. Simon On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > Hi Simon, > > I do encounter another problem though. > So everything compiled file and rtkfdk works fine with cpu. > However, when I change the hardware argument to cuda, I get the following > runtime error when rtkfdk is "Reconstructing and Writing": > > ======================== > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000B3EC88) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 85 > Description: itk::ERROR: CUFFT ERROR #2 > ========================== > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. > Do you know what might be happening? Thanks! > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Great! I had no clue what the problem was.... Let us know if when we can >> help you with anything else, >> Simon >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >>> >>> Hi Simon, >>> >>> The problem seems to disappear when I updated the whole directory to the >>> newest version of RTK. >>> >>> Cheers, >>> Andy >>> >>> >>> 2012/11/29 Andy Shieh >>>> >>>> Hi Simon, >>>> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>>> working (the CUDA examples run properly). And I made sure that the CUDA and >>>> CUDA SDK directories are correctly specified in the configuration when >>>> generating the build files. However, I keep getting these linking errors >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>>> what might be going on? Thanks. >>>> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>>> >>>> ============================================= >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 2 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkinlinefdk >>>> Error 6 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 8 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkfdk >>>> Error 12 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>>> ============================================= >>>> >>>> Cheers, >>>> Andy >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at openrtk.org >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > From hsieandy at gmail.com Thu Nov 29 07:53:57 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 20:53:57 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, Thanks for the suggestion. I tried, but it gave another error message. When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following runtime error: =============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A5E8D8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 102 Description: itk::ERROR: CUDA ERROR: invalid configuration argument ================ When I set it to the default value of 4, I get the CUFFT error in the previous maile. When I set it to 5, 6, and beyond, I get the following runtime error: ============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A2ECB8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 69 Description: itk::ERROR: CUDA ERROR: out of memory ============== Cheers, Andy 2012/11/29 Simon Rit > Hi, > It's seems to be an allocation problem. How big are your projection images? > You can always change the parameter m_ProjectionSubsetSize to 1 with > > http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 > to lower the amount of projection images in the GPU memory. > Simon > > On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > > Hi Simon, > > > > I do encounter another problem though. > > So everything compiled file and rtkfdk works fine with cpu. > > However, when I change the hardware argument to cuda, I get the following > > runtime error when rtkfdk is "Reconstructing and Writing": > > > > ======================== > > ExceptionObject caught with writer->Update() > > > > itk::ExceptionObject (0000000000B3EC88) > > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > > Line: 85 > > Description: itk::ERROR: CUFFT ERROR #2 > > ========================== > > > > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't > help. > > Do you know what might be happening? Thanks! > > > > Cheers, > > Andy > > > > > > 2012/11/29 Simon Rit > >> > >> Great! I had no clue what the problem was.... Let us know if when we can > >> help you with anything else, > >> Simon > >> > >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >>> > >>> Hi Simon, > >>> > >>> The problem seems to disappear when I updated the whole directory to > the > >>> newest version of RTK. > >>> > >>> Cheers, > >>> Andy > >>> > >>> > >>> 2012/11/29 Andy Shieh > >>>> > >>>> Hi Simon, > >>>> > >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA > >>>> production release 5.0 and 4.2. I doubled checked that CUDA is > actually > >>>> working (the CUDA examples run properly). And I made sure that the > CUDA and > >>>> CUDA SDK directories are correctly specified in the configuration when > >>>> generating the build files. However, I keep getting these linking > errors > >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any > idea > >>>> what might be going on? Thanks. > >>>> > >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > >>>> > >>>> ============================================= > >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 2 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 6 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe > rtkinlinefdk > >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 8 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkfdk > >>>> Error 12 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > >>>> ============================================= > >>>> > >>>> Cheers, > >>>> Andy > >>> > >>> > >>> > >>> _______________________________________________ > >>> Rtk-users mailing list > >>> Rtk-users at openrtk.org > >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > >>> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 13:33:56 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 19:33:56 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Andy, It seems that you have very little GPU memory. Do you know what graphics card you have? If I were you, I would start with a smaller volume with the --dimension option if you use my command line tools (modify as well the spacing at first, e.g., --spacing 8 --dimension 32). You can also use the --divisions option to split the volume in pieces but you then redo the filtering of all projection images. BTW, would you have two graphics card, there is nohing to select one over the other. Maybe this is what happens to you? You can then modify "GetListOfCudaDevices" and add some parameters to select the graphics card based on the memory. Let me know if I can help more, Simon On Thu, Nov 29, 2012 at 1:53 PM, Andy Shieh wrote: > Hi Simon, > > Thanks for the suggestion. I tried, but it gave another error message. > > When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following > runtime error: > =============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A5E8D8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 102 > Description: itk::ERROR: CUDA ERROR: invalid configuration argument > ================ > > > When I set it to the default value of 4, I get the CUFFT error in the > previous maile. > > > When I set it to 5, 6, and beyond, I get the following runtime error: > ============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A2ECB8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 69 > Description: itk::ERROR: CUDA ERROR: out of memory > ============== > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Hi, >> It's seems to be an allocation problem. How big are your projection >> images? >> You can always change the parameter m_ProjectionSubsetSize to 1 with >> >> http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 >> to lower the amount of projection images in the GPU memory. >> Simon >> >> On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I do encounter another problem though. >> > So everything compiled file and rtkfdk works fine with cpu. >> > However, when I change the hardware argument to cuda, I get the >> > following >> > runtime error when rtkfdk is "Reconstructing and Writing": >> > >> > ======================== >> > ExceptionObject caught with writer->Update() >> > >> > itk::ExceptionObject (0000000000B3EC88) >> > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" >> > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu >> > Line: 85 >> > Description: itk::ERROR: CUFFT ERROR #2 >> > ========================== >> > >> > >> > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't >> > help. >> > Do you know what might be happening? Thanks! >> > >> > Cheers, >> > Andy >> > >> > >> > 2012/11/29 Simon Rit >> >> >> >> Great! I had no clue what the problem was.... Let us know if when we >> >> can >> >> help you with anything else, >> >> Simon >> >> >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >> >>> >> >>> Hi Simon, >> >>> >> >>> The problem seems to disappear when I updated the whole directory to >> >>> the >> >>> newest version of RTK. >> >>> >> >>> Cheers, >> >>> Andy >> >>> >> >>> >> >>> 2012/11/29 Andy Shieh >> >>>> >> >>>> Hi Simon, >> >>>> >> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> >>>> production release 5.0 and 4.2. I doubled checked that CUDA is >> >>>> actually >> >>>> working (the CUDA examples run properly). And I made sure that the >> >>>> CUDA and >> >>>> CUDA SDK directories are correctly specified in the configuration >> >>>> when >> >>>> generating the build files. However, I keep getting these linking >> >>>> errors >> >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any >> >>>> idea >> >>>> what might be going on? Thanks. >> >>>> >> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >>>> >> >>>> ============================================= >> >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 2 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 6 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >> >>>> rtkinlinefdk >> >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 8 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 12 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> >>>> ============================================= >> >>>> >> >>>> Cheers, >> >>>> Andy >> >>> >> >>> >> >>> >> >>> _______________________________________________ >> >>> Rtk-users mailing list >> >>> Rtk-users at openrtk.org >> >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> >> > > > From hsieandy at gmail.com Thu Nov 8 11:58:35 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 9 Nov 2012 00:58:35 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Thank you. At the moment I'm just doing something similar to what you did for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and minus the log of intensity plus one (I assume the plus one is to avoid taking the log of zero?). Another few question: 1. Are you doing any normalization after reconstruction or forward projection? Are the negative values in the reconstructed images simply a result of the ramp filtering? 2. If I want to compare a reprojection from an image reconstructed using RTK with the original projection, how should I make sure the normalization is correct? i.e. should I plus/minus or multiply the reprojected attenuation before I use exponential and make it back to intensity values? 3. The rtkforward projections doesn't seem to work correctly when I'm projecting using a geometry file containing several Projection (Angle). The output mha file seems to "repeat" after a couple of projections instead of showing all projections. I'm testing this on a Varian Half Fan geometry - it works fine if I break the geometry file down into one each for each projection angle and do the forward projection separately. I can send you a reprojection mha file if my description is unclear to you. Thanks Simon!! Cheers, Andy. 2012/10/24 Simon Rit > Hi Andy, > Yes you're right, I have actually noticed recently that but I have not > worked a lot on Varian images because we don't have a Varian CBCT in > Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that > I used to roughly check the geometry. As far as I can remember, when I > wrote this piece of code, I tried to use the same code as Plastimatch > but I could well have done it wrongly. I'm actually waiting for a new > complete Catphan acquisition from Greg to correct for this but if you > already have a patch to suggest or a set of images to send, feel free > to do it. > Thanks, > Simon > > On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: > > Hi Simon, > > > > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the > > attenuation is calculated from the projection image simply via a negative > > transformation (1-Intensity/HND_MaxIntensity). > > Is it usually the way this is done, and is there any reason for doing > this? > > I would have thought attenuation should be calculated from intensity via > > logarithm (since I=I_0 exp(-mu x)). > > Thanks!! > > > > Cheers, > > Andy > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at openrtk.org > > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Nov 9 03:03:04 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 9 Nov 2012 09:03:04 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: > Hi Simon, > > Thank you. At the moment I'm just doing something similar to what you did > for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and > minus the log of intensity plus one (I assume the plus one is to avoid > taking the log of zero?). Does it improve the results? You are welcome to share it if you feel that this is of interest for other people. > > Another few question: > 1. Are you doing any normalization after reconstruction or forward > projection? No. Assuming you have line integral of the attenuation as input of the reconstruction algorithm, you get the attenuation. Are the negative values in the reconstructed images simply a > result of the ramp filtering? Probably. You can use rtkprojections to look at what is the input of the reconstruction algorithm. > 2. If I want to compare a reprojection from an image reconstructed using RTK > with the original projection, how should I make sure the normalization is > correct? i.e. should I plus/minus or multiply the reprojected attenuation > before I use exponential and make it back to intensity values? You basically have to do the inverse formula to what you have done. An easy way of looking at what is going on with forward projections is to look at this example: http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > 3. The rtkforward projections doesn't seem to work correctly when I'm > projecting using a geometry file containing several Projection (Angle). The > output mha file seems to "repeat" after a couple of projections instead of > showing all projections. I'm testing this on a Varian Half Fan geometry - it > works fine if I break the geometry file down into one each for each > projection angle and do the forward projection separately. I can send you a > reprojection mha file if my description is unclear to you. I works for me. Would you be able to fill in a bug report (http://bug.openrtk.org/) with an example? You can generate volumes and projections with rtkdrawgeometricphantom and rtkprojectgeometricphantom. Simon > > Thanks Simon!! > > Cheers, > Andy. > > > > 2012/10/24 Simon Rit >> >> Hi Andy, >> Yes you're right, I have actually noticed recently that but I have not >> worked a lot on Varian images because we don't have a Varian CBCT in >> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> I used to roughly check the geometry. As far as I can remember, when I >> wrote this piece of code, I tried to use the same code as Plastimatch >> but I could well have done it wrongly. I'm actually waiting for a new >> complete Catphan acquisition from Greg to correct for this but if you >> already have a patch to suggest or a set of images to send, feel free >> to do it. >> Thanks, >> Simon >> >> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >> > attenuation is calculated from the projection image simply via a >> > negative >> > transformation (1-Intensity/HND_MaxIntensity). >> > Is it usually the way this is done, and is there any reason for doing >> > this? >> > I would have thought attenuation should be calculated from intensity via >> > logarithm (since I=I_0 exp(-mu x)). >> > Thanks!! >> > >> > Cheers, >> > Andy >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at openrtk.org >> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> > > > From simon.rit at creatis.insa-lyon.fr Mon Nov 19 05:37:18 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 19 Nov 2012 11:37:18 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, I have pushed a fix for the Varian raw to attenuation conversion. Let me know if it meets what you've done. I will let you know if there is any other improvement of the conversion in the future. Simon On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit wrote: > Hi Andy, > > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> Hi Simon, >> >> Thank you. At the moment I'm just doing something similar to what you did >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and >> minus the log of intensity plus one (I assume the plus one is to avoid >> taking the log of zero?). > Does it improve the results? You are welcome to share it if you feel > that this is of interest for other people. > >> >> Another few question: >> 1. Are you doing any normalization after reconstruction or forward >> projection? > No. Assuming you have line integral of the attenuation as input of the > reconstruction algorithm, you get the attenuation. > > Are the negative values in the reconstructed images simply a >> result of the ramp filtering? > Probably. You can use rtkprojections to look at what is the input of > the reconstruction algorithm. > >> 2. If I want to compare a reprojection from an image reconstructed using RTK >> with the original projection, how should I make sure the normalization is >> correct? i.e. should I plus/minus or multiply the reprojected attenuation >> before I use exponential and make it back to intensity values? > You basically have to do the inverse formula to what you have done. An > easy way of looking at what is going on with forward projections is to > look at this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> projecting using a geometry file containing several Projection (Angle). The >> output mha file seems to "repeat" after a couple of projections instead of >> showing all projections. I'm testing this on a Varian Half Fan geometry - it >> works fine if I break the geometry file down into one each for each >> projection angle and do the forward projection separately. I can send you a >> reprojection mha file if my description is unclear to you. > I works for me. Would you be able to fill in a bug report > (http://bug.openrtk.org/) with an example? You can generate volumes > and projections with rtkdrawgeometricphantom and > rtkprojectgeometricphantom. > Simon > >> >> Thanks Simon!! >> >> Cheers, >> Andy. >> >> >> >> 2012/10/24 Simon Rit >>> >>> Hi Andy, >>> Yes you're right, I have actually noticed recently that but I have not >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >>> I used to roughly check the geometry. As far as I can remember, when I >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> but I could well have done it wrongly. I'm actually waiting for a new >>> complete Catphan acquisition from Greg to correct for this but if you >>> already have a patch to suggest or a set of images to send, feel free >>> to do it. >>> Thanks, >>> Simon >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >>> > Hi Simon, >>> > >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >>> > attenuation is calculated from the projection image simply via a >>> > negative >>> > transformation (1-Intensity/HND_MaxIntensity). >>> > Is it usually the way this is done, and is there any reason for doing >>> > this? >>> > I would have thought attenuation should be calculated from intensity via >>> > logarithm (since I=I_0 exp(-mu x)). >>> > Thanks!! >>> > >>> > Cheers, >>> > Andy >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at openrtk.org >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > >> >> From hsieandy at gmail.com Fri Nov 23 06:35:22 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 23 Nov 2012 19:35:22 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Just to let you know that the code works well!! Thanks! By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know him?), and he mentioned that he's been putting quite some effort on making RTK compatible with Varian format (HNC mainly). He mentioned that for the Varian format, we usually read in the "Norm Chamber value" (It's usually around 300) from each HNC header, and calculate the CT number by log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is around 10000. I'm not too sure about the details, but I believe he will discuss it with you soon when he has time! Cheers, Andy > > > 2012/11/19 Simon Rit > >> Hi Andy, >> I have pushed a fix for the Varian raw to attenuation conversion. Let >> me know if it meets what you've done. I will let you know if there is >> any other improvement of the conversion in the future. >> Simon >> >> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >> wrote: >> > Hi Andy, >> > >> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> >> Hi Simon, >> >> >> >> Thank you. At the moment I'm just doing something similar to what you >> did >> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >> and >> >> minus the log of intensity plus one (I assume the plus one is to avoid >> >> taking the log of zero?). >> > Does it improve the results? You are welcome to share it if you feel >> > that this is of interest for other people. >> > >> >> >> >> Another few question: >> >> 1. Are you doing any normalization after reconstruction or forward >> >> projection? >> > No. Assuming you have line integral of the attenuation as input of the >> > reconstruction algorithm, you get the attenuation. >> > >> > Are the negative values in the reconstructed images simply a >> >> result of the ramp filtering? >> > Probably. You can use rtkprojections to look at what is the input of >> > the reconstruction algorithm. >> > >> >> 2. If I want to compare a reprojection from an image reconstructed >> using RTK >> >> with the original projection, how should I make sure the normalization >> is >> >> correct? i.e. should I plus/minus or multiply the reprojected >> attenuation >> >> before I use exponential and make it back to intensity values? >> > You basically have to do the inverse formula to what you have done. An >> > easy way of looking at what is going on with forward projections is to >> > look at this example: >> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >> > >> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> >> projecting using a geometry file containing several Projection >> (Angle). The >> >> output mha file seems to "repeat" after a couple of projections >> instead of >> >> showing all projections. I'm testing this on a Varian Half Fan >> geometry - it >> >> works fine if I break the geometry file down into one each for each >> >> projection angle and do the forward projection separately. I can send >> you a >> >> reprojection mha file if my description is unclear to you. >> > I works for me. Would you be able to fill in a bug report >> > (http://bug.openrtk.org/) with an example? You can generate volumes >> > and projections with rtkdrawgeometricphantom and >> > rtkprojectgeometricphantom. >> > Simon >> > >> >> >> >> Thanks Simon!! >> >> >> >> Cheers, >> >> Andy. >> >> >> >> >> >> >> >> 2012/10/24 Simon Rit >> >>> >> >>> Hi Andy, >> >>> Yes you're right, I have actually noticed recently that but I have not >> >>> worked a lot on Varian images because we don't have a Varian CBCT in >> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> >>> I used to roughly check the geometry. As far as I can remember, when I >> >>> wrote this piece of code, I tried to use the same code as Plastimatch >> >>> but I could well have done it wrongly. I'm actually waiting for a new >> >>> complete Catphan acquisition from Greg to correct for this but if you >> >>> already have a patch to suggest or a set of images to send, feel free >> >>> to do it. >> >>> Thanks, >> >>> Simon >> >>> >> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >> wrote: >> >>> > Hi Simon, >> >>> > >> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >> the >> >>> > attenuation is calculated from the projection image simply via a >> >>> > negative >> >>> > transformation (1-Intensity/HND_MaxIntensity). >> >>> > Is it usually the way this is done, and is there any reason for >> doing >> >>> > this? >> >>> > I would have thought attenuation should be calculated from >> intensity via >> >>> > logarithm (since I=I_0 exp(-mu x)). >> >>> > Thanks!! >> >>> > >> >>> > Cheers, >> >>> > Andy >> >>> > >> >>> > _______________________________________________ >> >>> > Rtk-users mailing list >> >>> > Rtk-users at openrtk.org >> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> > >> >> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Mon Nov 26 08:45:42 2012 From: gdhugo at vcu.edu (Geoff Hugo) Date: Mon, 26 Nov 2012 08:45:42 -0500 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: <50B37286.7020809@vcu.edu> An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 28 03:51:12 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Nov 2012 09:51:12 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: <50B37286.7020809@vcu.edu> References: <50B37286.7020809@vcu.edu> Message-ID: Hi, Thanks for the feeback. I don't know any users that actively use Varian projection images. I will put a Catphan dataset online soon that has been provided by Greg Sharp and I'll try to adjust reconstructed values to linear attenuation. A filter to convert from linear to attenuation to HU is rather easy to add if one feels it's required. Simon On Mon, Nov 26, 2012 at 2:45 PM, Geoff Hugo wrote: > Hi Simon and Andy, > > The ScaleFactor we use at VCU is a rough conversion from linear attenuation > coefficient (the output of RTK) to something roughly around CT number > (Hounsfield Units). This is not a proper conversion, just a placeholder for > now. I'm not sure how useful the HNC-compatible version we have at VCU will > be to the wider community, as HNC is not a generally available format and > HND is the more common one. Are there any other users of RTK that use > Varian HNC format projections? > > Geoff > > On 11/23/12 6:35 AM, Andy Shieh wrote: > > Hi Simon, > > Just to let you know that the code works well!! Thanks! > > By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know > him?), and he mentioned that he's been putting quite some effort on making > RTK compatible with Varian format (HNC mainly). He mentioned that for the > Varian format, we usually read in the "Norm Chamber value" (It's usually > around 300) from each HNC header, and calculate the CT number by > log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is > around 10000. I'm not too sure about the details, but I believe he will > discuss it with you soon when he has time! > > Cheers, > Andy > >> >> >> >> 2012/11/19 Simon Rit >>> >>> Hi Andy, >>> I have pushed a fix for the Varian raw to attenuation conversion. Let >>> me know if it meets what you've done. I will let you know if there is >>> any other improvement of the conversion in the future. >>> Simon >>> >>> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >>> wrote: >>> > Hi Andy, >>> > >>> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >>> >> Hi Simon, >>> >> >>> >> Thank you. At the moment I'm just doing something similar to what you >>> >> did >>> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >>> >> and >>> >> minus the log of intensity plus one (I assume the plus one is to avoid >>> >> taking the log of zero?). >>> > Does it improve the results? You are welcome to share it if you feel >>> > that this is of interest for other people. >>> > >>> >> >>> >> Another few question: >>> >> 1. Are you doing any normalization after reconstruction or forward >>> >> projection? >>> > No. Assuming you have line integral of the attenuation as input of the >>> > reconstruction algorithm, you get the attenuation. >>> > >>> > Are the negative values in the reconstructed images simply a >>> >> result of the ramp filtering? >>> > Probably. You can use rtkprojections to look at what is the input of >>> > the reconstruction algorithm. >>> > >>> >> 2. If I want to compare a reprojection from an image reconstructed >>> >> using RTK >>> >> with the original projection, how should I make sure the normalization >>> >> is >>> >> correct? i.e. should I plus/minus or multiply the reprojected >>> >> attenuation >>> >> before I use exponential and make it back to intensity values? >>> > You basically have to do the inverse formula to what you have done. An >>> > easy way of looking at what is going on with forward projections is to >>> > look at this example: >>> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >>> > >>> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >>> >> projecting using a geometry file containing several Projection >>> >> (Angle). The >>> >> output mha file seems to "repeat" after a couple of projections >>> >> instead of >>> >> showing all projections. I'm testing this on a Varian Half Fan >>> >> geometry - it >>> >> works fine if I break the geometry file down into one each for each >>> >> projection angle and do the forward projection separately. I can send >>> >> you a >>> >> reprojection mha file if my description is unclear to you. >>> > I works for me. Would you be able to fill in a bug report >>> > (http://bug.openrtk.org/) with an example? You can generate volumes >>> > and projections with rtkdrawgeometricphantom and >>> > rtkprojectgeometricphantom. >>> > Simon >>> > >>> >> >>> >> Thanks Simon!! >>> >> >>> >> Cheers, >>> >> Andy. >>> >> >>> >> >>> >> >>> >> 2012/10/24 Simon Rit >>> >>> >>> >>> Hi Andy, >>> >>> Yes you're right, I have actually noticed recently that but I have >>> >>> not >>> >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan >>> >>> that >>> >>> I used to roughly check the geometry. As far as I can remember, when >>> >>> I >>> >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> >>> but I could well have done it wrongly. I'm actually waiting for a new >>> >>> complete Catphan acquisition from Greg to correct for this but if you >>> >>> already have a patch to suggest or a set of images to send, feel free >>> >>> to do it. >>> >>> Thanks, >>> >>> Simon >>> >>> >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >>> >>> wrote: >>> >>> > Hi Simon, >>> >>> > >>> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >>> >>> > the >>> >>> > attenuation is calculated from the projection image simply via a >>> >>> > negative >>> >>> > transformation (1-Intensity/HND_MaxIntensity). >>> >>> > Is it usually the way this is done, and is there any reason for >>> >>> > doing >>> >>> > this? >>> >>> > I would have thought attenuation should be calculated from >>> >>> > intensity via >>> >>> > logarithm (since I=I_0 exp(-mu x)). >>> >>> > Thanks!! >>> >>> > >>> >>> > Cheers, >>> >>> > Andy >>> >>> > >>> >>> > _______________________________________________ >>> >>> > Rtk-users mailing list >>> >>> > Rtk-users at openrtk.org >>> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> >>> > >>> >> >>> >> >> >> > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -- > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Assistant Professor > Dept. of Radiation Oncology > Virginia Commonwealth University > gdhugo at vcu.edu From hsieandy at gmail.com Thu Nov 29 01:03:44 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 14:03:44 +0800 Subject: [Rtk-users] Compiling with CUDA Message-ID: Hi Simon, Lately I've been trying to build RTK with CUDA. I tried both the CUDA production release 5.0 and 4.2. I doubled checked that CUDA is actually working (the CUDA examples run properly). And I made sure that the CUDA and CUDA SDK directories are correctly specified in the configuration when generating the build files. However, I keep getting these linking errors when I tried to compile RTK using Visual Studio 2010. Do you have any idea what might be going on? Thanks. I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. ============================================= Error 1 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 2 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 3 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 4 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 5 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkinlinefdk Error 6 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk Error 7 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 8 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 9 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 10 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 11 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkfdk Error 12 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk ============================================= Cheers, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 02:11:32 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 15:11:32 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, The problem seems to disappear when I updated the whole directory to the newest version of RTK. Cheers, Andy 2012/11/29 Andy Shieh > Hi Simon, > > Lately I've been trying to build RTK with CUDA. I tried both the CUDA > production release 5.0 and 4.2. I doubled checked that CUDA is actually > working (the CUDA examples run properly). And I made sure that the CUDA and > CUDA SDK directories are correctly specified in the configuration when > generating the build files. However, I keep getting these linking errors > when I tried to compile RTK using Visual Studio 2010. Do you have any idea > what might be going on? Thanks. > > I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > > ============================================= > Error 1 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 2 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 3 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 4 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 5 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkinlinefdk > Error 6 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk > Error 7 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 8 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 9 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 10 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 11 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkfdk > Error 12 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > ============================================= > > Cheers, > Andy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 02:15:48 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 08:15:48 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Great! I had no clue what the problem was.... Let us know if when we can help you with anything else, Simon On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > Hi Simon, > > The problem seems to disappear when I updated the whole directory to the > newest version of RTK. > > Cheers, > Andy > > > 2012/11/29 Andy Shieh > >> Hi Simon, >> >> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> production release 5.0 and 4.2. I doubled checked that CUDA is actually >> working (the CUDA examples run properly). And I made sure that the CUDA and >> CUDA SDK directories are correctly specified in the configuration when >> generating the build files. However, I keep getting these linking errors >> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >> what might be going on? Thanks. >> >> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >> ============================================= >> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 2 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkinlinefdk >> Error 6 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 8 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkfdk >> Error 12 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> ============================================= >> >> Cheers, >> Andy >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 03:57:51 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 16:57:51 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, I do encounter another problem though. So everything compiled file and rtkfdk works fine with cpu. However, when I change the hardware argument to cuda, I get the following runtime error when rtkfdk is "Reconstructing and Writing": ======================== ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000B3EC88) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 85 Description: itk::ERROR: CUFFT ERROR #2 ========================== I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. Do you know what might be happening? Thanks! Cheers, Andy 2012/11/29 Simon Rit > Great! I had no clue what the problem was.... Let us know if when we can > help you with anything else, > Simon > On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >> Hi Simon, >> >> The problem seems to disappear when I updated the whole directory to the >> newest version of RTK. >> >> Cheers, >> Andy >> >> >> 2012/11/29 Andy Shieh >> >>> Hi Simon, >>> >>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>> working (the CUDA examples run properly). And I made sure that the CUDA and >>> CUDA SDK directories are correctly specified in the configuration when >>> generating the build files. However, I keep getting these linking errors >>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>> what might be going on? Thanks. >>> >>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>> >>> ============================================= >>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 2 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkinlinefdk >>> Error 6 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >>> rtkinlinefdk >>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 8 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkfdk >>> Error 12 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>> ============================================= >>> >>> Cheers, >>> Andy >>> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at openrtk.org >> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 05:08:15 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 11:08:15 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi, It's seems to be an allocation problem. How big are your projection images? You can always change the parameter m_ProjectionSubsetSize to 1 with http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 to lower the amount of projection images in the GPU memory. Simon On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > Hi Simon, > > I do encounter another problem though. > So everything compiled file and rtkfdk works fine with cpu. > However, when I change the hardware argument to cuda, I get the following > runtime error when rtkfdk is "Reconstructing and Writing": > > ======================== > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000B3EC88) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 85 > Description: itk::ERROR: CUFFT ERROR #2 > ========================== > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. > Do you know what might be happening? Thanks! > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Great! I had no clue what the problem was.... Let us know if when we can >> help you with anything else, >> Simon >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >>> >>> Hi Simon, >>> >>> The problem seems to disappear when I updated the whole directory to the >>> newest version of RTK. >>> >>> Cheers, >>> Andy >>> >>> >>> 2012/11/29 Andy Shieh >>>> >>>> Hi Simon, >>>> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>>> working (the CUDA examples run properly). And I made sure that the CUDA and >>>> CUDA SDK directories are correctly specified in the configuration when >>>> generating the build files. However, I keep getting these linking errors >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>>> what might be going on? Thanks. >>>> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>>> >>>> ============================================= >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 2 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkinlinefdk >>>> Error 6 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 8 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkfdk >>>> Error 12 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>>> ============================================= >>>> >>>> Cheers, >>>> Andy >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at openrtk.org >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > From hsieandy at gmail.com Thu Nov 29 07:53:57 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 20:53:57 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, Thanks for the suggestion. I tried, but it gave another error message. When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following runtime error: =============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A5E8D8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 102 Description: itk::ERROR: CUDA ERROR: invalid configuration argument ================ When I set it to the default value of 4, I get the CUFFT error in the previous maile. When I set it to 5, 6, and beyond, I get the following runtime error: ============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A2ECB8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 69 Description: itk::ERROR: CUDA ERROR: out of memory ============== Cheers, Andy 2012/11/29 Simon Rit > Hi, > It's seems to be an allocation problem. How big are your projection images? > You can always change the parameter m_ProjectionSubsetSize to 1 with > > http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 > to lower the amount of projection images in the GPU memory. > Simon > > On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > > Hi Simon, > > > > I do encounter another problem though. > > So everything compiled file and rtkfdk works fine with cpu. > > However, when I change the hardware argument to cuda, I get the following > > runtime error when rtkfdk is "Reconstructing and Writing": > > > > ======================== > > ExceptionObject caught with writer->Update() > > > > itk::ExceptionObject (0000000000B3EC88) > > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > > Line: 85 > > Description: itk::ERROR: CUFFT ERROR #2 > > ========================== > > > > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't > help. > > Do you know what might be happening? Thanks! > > > > Cheers, > > Andy > > > > > > 2012/11/29 Simon Rit > >> > >> Great! I had no clue what the problem was.... Let us know if when we can > >> help you with anything else, > >> Simon > >> > >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >>> > >>> Hi Simon, > >>> > >>> The problem seems to disappear when I updated the whole directory to > the > >>> newest version of RTK. > >>> > >>> Cheers, > >>> Andy > >>> > >>> > >>> 2012/11/29 Andy Shieh > >>>> > >>>> Hi Simon, > >>>> > >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA > >>>> production release 5.0 and 4.2. I doubled checked that CUDA is > actually > >>>> working (the CUDA examples run properly). And I made sure that the > CUDA and > >>>> CUDA SDK directories are correctly specified in the configuration when > >>>> generating the build files. However, I keep getting these linking > errors > >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any > idea > >>>> what might be going on? Thanks. > >>>> > >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > >>>> > >>>> ============================================= > >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 2 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 6 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe > rtkinlinefdk > >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 8 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkfdk > >>>> Error 12 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > >>>> ============================================= > >>>> > >>>> Cheers, > >>>> Andy > >>> > >>> > >>> > >>> _______________________________________________ > >>> Rtk-users mailing list > >>> Rtk-users at openrtk.org > >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > >>> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 13:33:56 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 19:33:56 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Andy, It seems that you have very little GPU memory. Do you know what graphics card you have? If I were you, I would start with a smaller volume with the --dimension option if you use my command line tools (modify as well the spacing at first, e.g., --spacing 8 --dimension 32). You can also use the --divisions option to split the volume in pieces but you then redo the filtering of all projection images. BTW, would you have two graphics card, there is nohing to select one over the other. Maybe this is what happens to you? You can then modify "GetListOfCudaDevices" and add some parameters to select the graphics card based on the memory. Let me know if I can help more, Simon On Thu, Nov 29, 2012 at 1:53 PM, Andy Shieh wrote: > Hi Simon, > > Thanks for the suggestion. I tried, but it gave another error message. > > When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following > runtime error: > =============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A5E8D8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 102 > Description: itk::ERROR: CUDA ERROR: invalid configuration argument > ================ > > > When I set it to the default value of 4, I get the CUFFT error in the > previous maile. > > > When I set it to 5, 6, and beyond, I get the following runtime error: > ============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A2ECB8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 69 > Description: itk::ERROR: CUDA ERROR: out of memory > ============== > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Hi, >> It's seems to be an allocation problem. How big are your projection >> images? >> You can always change the parameter m_ProjectionSubsetSize to 1 with >> >> http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 >> to lower the amount of projection images in the GPU memory. >> Simon >> >> On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I do encounter another problem though. >> > So everything compiled file and rtkfdk works fine with cpu. >> > However, when I change the hardware argument to cuda, I get the >> > following >> > runtime error when rtkfdk is "Reconstructing and Writing": >> > >> > ======================== >> > ExceptionObject caught with writer->Update() >> > >> > itk::ExceptionObject (0000000000B3EC88) >> > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" >> > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu >> > Line: 85 >> > Description: itk::ERROR: CUFFT ERROR #2 >> > ========================== >> > >> > >> > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't >> > help. >> > Do you know what might be happening? Thanks! >> > >> > Cheers, >> > Andy >> > >> > >> > 2012/11/29 Simon Rit >> >> >> >> Great! I had no clue what the problem was.... Let us know if when we >> >> can >> >> help you with anything else, >> >> Simon >> >> >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >> >>> >> >>> Hi Simon, >> >>> >> >>> The problem seems to disappear when I updated the whole directory to >> >>> the >> >>> newest version of RTK. >> >>> >> >>> Cheers, >> >>> Andy >> >>> >> >>> >> >>> 2012/11/29 Andy Shieh >> >>>> >> >>>> Hi Simon, >> >>>> >> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> >>>> production release 5.0 and 4.2. I doubled checked that CUDA is >> >>>> actually >> >>>> working (the CUDA examples run properly). And I made sure that the >> >>>> CUDA and >> >>>> CUDA SDK directories are correctly specified in the configuration >> >>>> when >> >>>> generating the build files. However, I keep getting these linking >> >>>> errors >> >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any >> >>>> idea >> >>>> what might be going on? Thanks. >> >>>> >> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >>>> >> >>>> ============================================= >> >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 2 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 6 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >> >>>> rtkinlinefdk >> >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 8 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 12 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> >>>> ============================================= >> >>>> >> >>>> Cheers, >> >>>> Andy >> >>> >> >>> >> >>> >> >>> _______________________________________________ >> >>> Rtk-users mailing list >> >>> Rtk-users at openrtk.org >> >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> >> > > > From hsieandy at gmail.com Thu Nov 8 11:58:35 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 9 Nov 2012 00:58:35 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Thank you. At the moment I'm just doing something similar to what you did for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and minus the log of intensity plus one (I assume the plus one is to avoid taking the log of zero?). Another few question: 1. Are you doing any normalization after reconstruction or forward projection? Are the negative values in the reconstructed images simply a result of the ramp filtering? 2. If I want to compare a reprojection from an image reconstructed using RTK with the original projection, how should I make sure the normalization is correct? i.e. should I plus/minus or multiply the reprojected attenuation before I use exponential and make it back to intensity values? 3. The rtkforward projections doesn't seem to work correctly when I'm projecting using a geometry file containing several Projection (Angle). The output mha file seems to "repeat" after a couple of projections instead of showing all projections. I'm testing this on a Varian Half Fan geometry - it works fine if I break the geometry file down into one each for each projection angle and do the forward projection separately. I can send you a reprojection mha file if my description is unclear to you. Thanks Simon!! Cheers, Andy. 2012/10/24 Simon Rit > Hi Andy, > Yes you're right, I have actually noticed recently that but I have not > worked a lot on Varian images because we don't have a Varian CBCT in > Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that > I used to roughly check the geometry. As far as I can remember, when I > wrote this piece of code, I tried to use the same code as Plastimatch > but I could well have done it wrongly. I'm actually waiting for a new > complete Catphan acquisition from Greg to correct for this but if you > already have a patch to suggest or a set of images to send, feel free > to do it. > Thanks, > Simon > > On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: > > Hi Simon, > > > > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the > > attenuation is calculated from the projection image simply via a negative > > transformation (1-Intensity/HND_MaxIntensity). > > Is it usually the way this is done, and is there any reason for doing > this? > > I would have thought attenuation should be calculated from intensity via > > logarithm (since I=I_0 exp(-mu x)). > > Thanks!! > > > > Cheers, > > Andy > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at openrtk.org > > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Nov 9 03:03:04 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 9 Nov 2012 09:03:04 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: > Hi Simon, > > Thank you. At the moment I'm just doing something similar to what you did > for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and > minus the log of intensity plus one (I assume the plus one is to avoid > taking the log of zero?). Does it improve the results? You are welcome to share it if you feel that this is of interest for other people. > > Another few question: > 1. Are you doing any normalization after reconstruction or forward > projection? No. Assuming you have line integral of the attenuation as input of the reconstruction algorithm, you get the attenuation. Are the negative values in the reconstructed images simply a > result of the ramp filtering? Probably. You can use rtkprojections to look at what is the input of the reconstruction algorithm. > 2. If I want to compare a reprojection from an image reconstructed using RTK > with the original projection, how should I make sure the normalization is > correct? i.e. should I plus/minus or multiply the reprojected attenuation > before I use exponential and make it back to intensity values? You basically have to do the inverse formula to what you have done. An easy way of looking at what is going on with forward projections is to look at this example: http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > 3. The rtkforward projections doesn't seem to work correctly when I'm > projecting using a geometry file containing several Projection (Angle). The > output mha file seems to "repeat" after a couple of projections instead of > showing all projections. I'm testing this on a Varian Half Fan geometry - it > works fine if I break the geometry file down into one each for each > projection angle and do the forward projection separately. I can send you a > reprojection mha file if my description is unclear to you. I works for me. Would you be able to fill in a bug report (http://bug.openrtk.org/) with an example? You can generate volumes and projections with rtkdrawgeometricphantom and rtkprojectgeometricphantom. Simon > > Thanks Simon!! > > Cheers, > Andy. > > > > 2012/10/24 Simon Rit >> >> Hi Andy, >> Yes you're right, I have actually noticed recently that but I have not >> worked a lot on Varian images because we don't have a Varian CBCT in >> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> I used to roughly check the geometry. As far as I can remember, when I >> wrote this piece of code, I tried to use the same code as Plastimatch >> but I could well have done it wrongly. I'm actually waiting for a new >> complete Catphan acquisition from Greg to correct for this but if you >> already have a patch to suggest or a set of images to send, feel free >> to do it. >> Thanks, >> Simon >> >> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >> > attenuation is calculated from the projection image simply via a >> > negative >> > transformation (1-Intensity/HND_MaxIntensity). >> > Is it usually the way this is done, and is there any reason for doing >> > this? >> > I would have thought attenuation should be calculated from intensity via >> > logarithm (since I=I_0 exp(-mu x)). >> > Thanks!! >> > >> > Cheers, >> > Andy >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at openrtk.org >> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> > > > From simon.rit at creatis.insa-lyon.fr Mon Nov 19 05:37:18 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 19 Nov 2012 11:37:18 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, I have pushed a fix for the Varian raw to attenuation conversion. Let me know if it meets what you've done. I will let you know if there is any other improvement of the conversion in the future. Simon On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit wrote: > Hi Andy, > > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> Hi Simon, >> >> Thank you. At the moment I'm just doing something similar to what you did >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and >> minus the log of intensity plus one (I assume the plus one is to avoid >> taking the log of zero?). > Does it improve the results? You are welcome to share it if you feel > that this is of interest for other people. > >> >> Another few question: >> 1. Are you doing any normalization after reconstruction or forward >> projection? > No. Assuming you have line integral of the attenuation as input of the > reconstruction algorithm, you get the attenuation. > > Are the negative values in the reconstructed images simply a >> result of the ramp filtering? > Probably. You can use rtkprojections to look at what is the input of > the reconstruction algorithm. > >> 2. If I want to compare a reprojection from an image reconstructed using RTK >> with the original projection, how should I make sure the normalization is >> correct? i.e. should I plus/minus or multiply the reprojected attenuation >> before I use exponential and make it back to intensity values? > You basically have to do the inverse formula to what you have done. An > easy way of looking at what is going on with forward projections is to > look at this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> projecting using a geometry file containing several Projection (Angle). The >> output mha file seems to "repeat" after a couple of projections instead of >> showing all projections. I'm testing this on a Varian Half Fan geometry - it >> works fine if I break the geometry file down into one each for each >> projection angle and do the forward projection separately. I can send you a >> reprojection mha file if my description is unclear to you. > I works for me. Would you be able to fill in a bug report > (http://bug.openrtk.org/) with an example? You can generate volumes > and projections with rtkdrawgeometricphantom and > rtkprojectgeometricphantom. > Simon > >> >> Thanks Simon!! >> >> Cheers, >> Andy. >> >> >> >> 2012/10/24 Simon Rit >>> >>> Hi Andy, >>> Yes you're right, I have actually noticed recently that but I have not >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >>> I used to roughly check the geometry. As far as I can remember, when I >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> but I could well have done it wrongly. I'm actually waiting for a new >>> complete Catphan acquisition from Greg to correct for this but if you >>> already have a patch to suggest or a set of images to send, feel free >>> to do it. >>> Thanks, >>> Simon >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >>> > Hi Simon, >>> > >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >>> > attenuation is calculated from the projection image simply via a >>> > negative >>> > transformation (1-Intensity/HND_MaxIntensity). >>> > Is it usually the way this is done, and is there any reason for doing >>> > this? >>> > I would have thought attenuation should be calculated from intensity via >>> > logarithm (since I=I_0 exp(-mu x)). >>> > Thanks!! >>> > >>> > Cheers, >>> > Andy >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at openrtk.org >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > >> >> From hsieandy at gmail.com Fri Nov 23 06:35:22 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 23 Nov 2012 19:35:22 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Just to let you know that the code works well!! Thanks! By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know him?), and he mentioned that he's been putting quite some effort on making RTK compatible with Varian format (HNC mainly). He mentioned that for the Varian format, we usually read in the "Norm Chamber value" (It's usually around 300) from each HNC header, and calculate the CT number by log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is around 10000. I'm not too sure about the details, but I believe he will discuss it with you soon when he has time! Cheers, Andy > > > 2012/11/19 Simon Rit > >> Hi Andy, >> I have pushed a fix for the Varian raw to attenuation conversion. Let >> me know if it meets what you've done. I will let you know if there is >> any other improvement of the conversion in the future. >> Simon >> >> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >> wrote: >> > Hi Andy, >> > >> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> >> Hi Simon, >> >> >> >> Thank you. At the moment I'm just doing something similar to what you >> did >> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >> and >> >> minus the log of intensity plus one (I assume the plus one is to avoid >> >> taking the log of zero?). >> > Does it improve the results? You are welcome to share it if you feel >> > that this is of interest for other people. >> > >> >> >> >> Another few question: >> >> 1. Are you doing any normalization after reconstruction or forward >> >> projection? >> > No. Assuming you have line integral of the attenuation as input of the >> > reconstruction algorithm, you get the attenuation. >> > >> > Are the negative values in the reconstructed images simply a >> >> result of the ramp filtering? >> > Probably. You can use rtkprojections to look at what is the input of >> > the reconstruction algorithm. >> > >> >> 2. If I want to compare a reprojection from an image reconstructed >> using RTK >> >> with the original projection, how should I make sure the normalization >> is >> >> correct? i.e. should I plus/minus or multiply the reprojected >> attenuation >> >> before I use exponential and make it back to intensity values? >> > You basically have to do the inverse formula to what you have done. An >> > easy way of looking at what is going on with forward projections is to >> > look at this example: >> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >> > >> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> >> projecting using a geometry file containing several Projection >> (Angle). The >> >> output mha file seems to "repeat" after a couple of projections >> instead of >> >> showing all projections. I'm testing this on a Varian Half Fan >> geometry - it >> >> works fine if I break the geometry file down into one each for each >> >> projection angle and do the forward projection separately. I can send >> you a >> >> reprojection mha file if my description is unclear to you. >> > I works for me. Would you be able to fill in a bug report >> > (http://bug.openrtk.org/) with an example? You can generate volumes >> > and projections with rtkdrawgeometricphantom and >> > rtkprojectgeometricphantom. >> > Simon >> > >> >> >> >> Thanks Simon!! >> >> >> >> Cheers, >> >> Andy. >> >> >> >> >> >> >> >> 2012/10/24 Simon Rit >> >>> >> >>> Hi Andy, >> >>> Yes you're right, I have actually noticed recently that but I have not >> >>> worked a lot on Varian images because we don't have a Varian CBCT in >> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> >>> I used to roughly check the geometry. As far as I can remember, when I >> >>> wrote this piece of code, I tried to use the same code as Plastimatch >> >>> but I could well have done it wrongly. I'm actually waiting for a new >> >>> complete Catphan acquisition from Greg to correct for this but if you >> >>> already have a patch to suggest or a set of images to send, feel free >> >>> to do it. >> >>> Thanks, >> >>> Simon >> >>> >> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >> wrote: >> >>> > Hi Simon, >> >>> > >> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >> the >> >>> > attenuation is calculated from the projection image simply via a >> >>> > negative >> >>> > transformation (1-Intensity/HND_MaxIntensity). >> >>> > Is it usually the way this is done, and is there any reason for >> doing >> >>> > this? >> >>> > I would have thought attenuation should be calculated from >> intensity via >> >>> > logarithm (since I=I_0 exp(-mu x)). >> >>> > Thanks!! >> >>> > >> >>> > Cheers, >> >>> > Andy >> >>> > >> >>> > _______________________________________________ >> >>> > Rtk-users mailing list >> >>> > Rtk-users at openrtk.org >> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> > >> >> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Mon Nov 26 08:45:42 2012 From: gdhugo at vcu.edu (Geoff Hugo) Date: Mon, 26 Nov 2012 08:45:42 -0500 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: <50B37286.7020809@vcu.edu> An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 28 03:51:12 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Nov 2012 09:51:12 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: <50B37286.7020809@vcu.edu> References: <50B37286.7020809@vcu.edu> Message-ID: Hi, Thanks for the feeback. I don't know any users that actively use Varian projection images. I will put a Catphan dataset online soon that has been provided by Greg Sharp and I'll try to adjust reconstructed values to linear attenuation. A filter to convert from linear to attenuation to HU is rather easy to add if one feels it's required. Simon On Mon, Nov 26, 2012 at 2:45 PM, Geoff Hugo wrote: > Hi Simon and Andy, > > The ScaleFactor we use at VCU is a rough conversion from linear attenuation > coefficient (the output of RTK) to something roughly around CT number > (Hounsfield Units). This is not a proper conversion, just a placeholder for > now. I'm not sure how useful the HNC-compatible version we have at VCU will > be to the wider community, as HNC is not a generally available format and > HND is the more common one. Are there any other users of RTK that use > Varian HNC format projections? > > Geoff > > On 11/23/12 6:35 AM, Andy Shieh wrote: > > Hi Simon, > > Just to let you know that the code works well!! Thanks! > > By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know > him?), and he mentioned that he's been putting quite some effort on making > RTK compatible with Varian format (HNC mainly). He mentioned that for the > Varian format, we usually read in the "Norm Chamber value" (It's usually > around 300) from each HNC header, and calculate the CT number by > log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is > around 10000. I'm not too sure about the details, but I believe he will > discuss it with you soon when he has time! > > Cheers, > Andy > >> >> >> >> 2012/11/19 Simon Rit >>> >>> Hi Andy, >>> I have pushed a fix for the Varian raw to attenuation conversion. Let >>> me know if it meets what you've done. I will let you know if there is >>> any other improvement of the conversion in the future. >>> Simon >>> >>> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >>> wrote: >>> > Hi Andy, >>> > >>> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >>> >> Hi Simon, >>> >> >>> >> Thank you. At the moment I'm just doing something similar to what you >>> >> did >>> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >>> >> and >>> >> minus the log of intensity plus one (I assume the plus one is to avoid >>> >> taking the log of zero?). >>> > Does it improve the results? You are welcome to share it if you feel >>> > that this is of interest for other people. >>> > >>> >> >>> >> Another few question: >>> >> 1. Are you doing any normalization after reconstruction or forward >>> >> projection? >>> > No. Assuming you have line integral of the attenuation as input of the >>> > reconstruction algorithm, you get the attenuation. >>> > >>> > Are the negative values in the reconstructed images simply a >>> >> result of the ramp filtering? >>> > Probably. You can use rtkprojections to look at what is the input of >>> > the reconstruction algorithm. >>> > >>> >> 2. If I want to compare a reprojection from an image reconstructed >>> >> using RTK >>> >> with the original projection, how should I make sure the normalization >>> >> is >>> >> correct? i.e. should I plus/minus or multiply the reprojected >>> >> attenuation >>> >> before I use exponential and make it back to intensity values? >>> > You basically have to do the inverse formula to what you have done. An >>> > easy way of looking at what is going on with forward projections is to >>> > look at this example: >>> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >>> > >>> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >>> >> projecting using a geometry file containing several Projection >>> >> (Angle). The >>> >> output mha file seems to "repeat" after a couple of projections >>> >> instead of >>> >> showing all projections. I'm testing this on a Varian Half Fan >>> >> geometry - it >>> >> works fine if I break the geometry file down into one each for each >>> >> projection angle and do the forward projection separately. I can send >>> >> you a >>> >> reprojection mha file if my description is unclear to you. >>> > I works for me. Would you be able to fill in a bug report >>> > (http://bug.openrtk.org/) with an example? You can generate volumes >>> > and projections with rtkdrawgeometricphantom and >>> > rtkprojectgeometricphantom. >>> > Simon >>> > >>> >> >>> >> Thanks Simon!! >>> >> >>> >> Cheers, >>> >> Andy. >>> >> >>> >> >>> >> >>> >> 2012/10/24 Simon Rit >>> >>> >>> >>> Hi Andy, >>> >>> Yes you're right, I have actually noticed recently that but I have >>> >>> not >>> >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan >>> >>> that >>> >>> I used to roughly check the geometry. As far as I can remember, when >>> >>> I >>> >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> >>> but I could well have done it wrongly. I'm actually waiting for a new >>> >>> complete Catphan acquisition from Greg to correct for this but if you >>> >>> already have a patch to suggest or a set of images to send, feel free >>> >>> to do it. >>> >>> Thanks, >>> >>> Simon >>> >>> >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >>> >>> wrote: >>> >>> > Hi Simon, >>> >>> > >>> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >>> >>> > the >>> >>> > attenuation is calculated from the projection image simply via a >>> >>> > negative >>> >>> > transformation (1-Intensity/HND_MaxIntensity). >>> >>> > Is it usually the way this is done, and is there any reason for >>> >>> > doing >>> >>> > this? >>> >>> > I would have thought attenuation should be calculated from >>> >>> > intensity via >>> >>> > logarithm (since I=I_0 exp(-mu x)). >>> >>> > Thanks!! >>> >>> > >>> >>> > Cheers, >>> >>> > Andy >>> >>> > >>> >>> > _______________________________________________ >>> >>> > Rtk-users mailing list >>> >>> > Rtk-users at openrtk.org >>> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> >>> > >>> >> >>> >> >> >> > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -- > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Assistant Professor > Dept. of Radiation Oncology > Virginia Commonwealth University > gdhugo at vcu.edu From hsieandy at gmail.com Thu Nov 29 01:03:44 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 14:03:44 +0800 Subject: [Rtk-users] Compiling with CUDA Message-ID: Hi Simon, Lately I've been trying to build RTK with CUDA. I tried both the CUDA production release 5.0 and 4.2. I doubled checked that CUDA is actually working (the CUDA examples run properly). And I made sure that the CUDA and CUDA SDK directories are correctly specified in the configuration when generating the build files. However, I keep getting these linking errors when I tried to compile RTK using Visual Studio 2010. Do you have any idea what might be going on? Thanks. I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. ============================================= Error 1 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 2 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 3 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 4 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 5 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkinlinefdk Error 6 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk Error 7 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 8 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 9 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 10 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 11 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkfdk Error 12 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk ============================================= Cheers, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 02:11:32 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 15:11:32 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, The problem seems to disappear when I updated the whole directory to the newest version of RTK. Cheers, Andy 2012/11/29 Andy Shieh > Hi Simon, > > Lately I've been trying to build RTK with CUDA. I tried both the CUDA > production release 5.0 and 4.2. I doubled checked that CUDA is actually > working (the CUDA examples run properly). And I made sure that the CUDA and > CUDA SDK directories are correctly specified in the configuration when > generating the build files. However, I keep getting these linking errors > when I tried to compile RTK using Visual Studio 2010. Do you have any idea > what might be going on? Thanks. > > I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > > ============================================= > Error 1 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 2 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 3 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 4 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 5 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkinlinefdk > Error 6 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk > Error 7 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 8 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 9 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 10 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 11 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkfdk > Error 12 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > ============================================= > > Cheers, > Andy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 02:15:48 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 08:15:48 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Great! I had no clue what the problem was.... Let us know if when we can help you with anything else, Simon On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > Hi Simon, > > The problem seems to disappear when I updated the whole directory to the > newest version of RTK. > > Cheers, > Andy > > > 2012/11/29 Andy Shieh > >> Hi Simon, >> >> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> production release 5.0 and 4.2. I doubled checked that CUDA is actually >> working (the CUDA examples run properly). And I made sure that the CUDA and >> CUDA SDK directories are correctly specified in the configuration when >> generating the build files. However, I keep getting these linking errors >> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >> what might be going on? Thanks. >> >> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >> ============================================= >> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 2 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkinlinefdk >> Error 6 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 8 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkfdk >> Error 12 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> ============================================= >> >> Cheers, >> Andy >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 03:57:51 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 16:57:51 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, I do encounter another problem though. So everything compiled file and rtkfdk works fine with cpu. However, when I change the hardware argument to cuda, I get the following runtime error when rtkfdk is "Reconstructing and Writing": ======================== ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000B3EC88) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 85 Description: itk::ERROR: CUFFT ERROR #2 ========================== I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. Do you know what might be happening? Thanks! Cheers, Andy 2012/11/29 Simon Rit > Great! I had no clue what the problem was.... Let us know if when we can > help you with anything else, > Simon > On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >> Hi Simon, >> >> The problem seems to disappear when I updated the whole directory to the >> newest version of RTK. >> >> Cheers, >> Andy >> >> >> 2012/11/29 Andy Shieh >> >>> Hi Simon, >>> >>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>> working (the CUDA examples run properly). And I made sure that the CUDA and >>> CUDA SDK directories are correctly specified in the configuration when >>> generating the build files. However, I keep getting these linking errors >>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>> what might be going on? Thanks. >>> >>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>> >>> ============================================= >>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 2 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkinlinefdk >>> Error 6 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >>> rtkinlinefdk >>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 8 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkfdk >>> Error 12 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>> ============================================= >>> >>> Cheers, >>> Andy >>> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at openrtk.org >> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 05:08:15 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 11:08:15 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi, It's seems to be an allocation problem. How big are your projection images? You can always change the parameter m_ProjectionSubsetSize to 1 with http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 to lower the amount of projection images in the GPU memory. Simon On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > Hi Simon, > > I do encounter another problem though. > So everything compiled file and rtkfdk works fine with cpu. > However, when I change the hardware argument to cuda, I get the following > runtime error when rtkfdk is "Reconstructing and Writing": > > ======================== > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000B3EC88) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 85 > Description: itk::ERROR: CUFFT ERROR #2 > ========================== > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. > Do you know what might be happening? Thanks! > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Great! I had no clue what the problem was.... Let us know if when we can >> help you with anything else, >> Simon >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >>> >>> Hi Simon, >>> >>> The problem seems to disappear when I updated the whole directory to the >>> newest version of RTK. >>> >>> Cheers, >>> Andy >>> >>> >>> 2012/11/29 Andy Shieh >>>> >>>> Hi Simon, >>>> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>>> working (the CUDA examples run properly). And I made sure that the CUDA and >>>> CUDA SDK directories are correctly specified in the configuration when >>>> generating the build files. However, I keep getting these linking errors >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>>> what might be going on? Thanks. >>>> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>>> >>>> ============================================= >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 2 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkinlinefdk >>>> Error 6 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 8 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkfdk >>>> Error 12 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>>> ============================================= >>>> >>>> Cheers, >>>> Andy >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at openrtk.org >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > From hsieandy at gmail.com Thu Nov 29 07:53:57 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 20:53:57 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, Thanks for the suggestion. I tried, but it gave another error message. When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following runtime error: =============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A5E8D8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 102 Description: itk::ERROR: CUDA ERROR: invalid configuration argument ================ When I set it to the default value of 4, I get the CUFFT error in the previous maile. When I set it to 5, 6, and beyond, I get the following runtime error: ============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A2ECB8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 69 Description: itk::ERROR: CUDA ERROR: out of memory ============== Cheers, Andy 2012/11/29 Simon Rit > Hi, > It's seems to be an allocation problem. How big are your projection images? > You can always change the parameter m_ProjectionSubsetSize to 1 with > > http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 > to lower the amount of projection images in the GPU memory. > Simon > > On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > > Hi Simon, > > > > I do encounter another problem though. > > So everything compiled file and rtkfdk works fine with cpu. > > However, when I change the hardware argument to cuda, I get the following > > runtime error when rtkfdk is "Reconstructing and Writing": > > > > ======================== > > ExceptionObject caught with writer->Update() > > > > itk::ExceptionObject (0000000000B3EC88) > > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > > Line: 85 > > Description: itk::ERROR: CUFFT ERROR #2 > > ========================== > > > > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't > help. > > Do you know what might be happening? Thanks! > > > > Cheers, > > Andy > > > > > > 2012/11/29 Simon Rit > >> > >> Great! I had no clue what the problem was.... Let us know if when we can > >> help you with anything else, > >> Simon > >> > >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >>> > >>> Hi Simon, > >>> > >>> The problem seems to disappear when I updated the whole directory to > the > >>> newest version of RTK. > >>> > >>> Cheers, > >>> Andy > >>> > >>> > >>> 2012/11/29 Andy Shieh > >>>> > >>>> Hi Simon, > >>>> > >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA > >>>> production release 5.0 and 4.2. I doubled checked that CUDA is > actually > >>>> working (the CUDA examples run properly). And I made sure that the > CUDA and > >>>> CUDA SDK directories are correctly specified in the configuration when > >>>> generating the build files. However, I keep getting these linking > errors > >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any > idea > >>>> what might be going on? Thanks. > >>>> > >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > >>>> > >>>> ============================================= > >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 2 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 6 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe > rtkinlinefdk > >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 8 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkfdk > >>>> Error 12 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > >>>> ============================================= > >>>> > >>>> Cheers, > >>>> Andy > >>> > >>> > >>> > >>> _______________________________________________ > >>> Rtk-users mailing list > >>> Rtk-users at openrtk.org > >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > >>> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 13:33:56 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 19:33:56 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Andy, It seems that you have very little GPU memory. Do you know what graphics card you have? If I were you, I would start with a smaller volume with the --dimension option if you use my command line tools (modify as well the spacing at first, e.g., --spacing 8 --dimension 32). You can also use the --divisions option to split the volume in pieces but you then redo the filtering of all projection images. BTW, would you have two graphics card, there is nohing to select one over the other. Maybe this is what happens to you? You can then modify "GetListOfCudaDevices" and add some parameters to select the graphics card based on the memory. Let me know if I can help more, Simon On Thu, Nov 29, 2012 at 1:53 PM, Andy Shieh wrote: > Hi Simon, > > Thanks for the suggestion. I tried, but it gave another error message. > > When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following > runtime error: > =============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A5E8D8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 102 > Description: itk::ERROR: CUDA ERROR: invalid configuration argument > ================ > > > When I set it to the default value of 4, I get the CUFFT error in the > previous maile. > > > When I set it to 5, 6, and beyond, I get the following runtime error: > ============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A2ECB8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 69 > Description: itk::ERROR: CUDA ERROR: out of memory > ============== > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Hi, >> It's seems to be an allocation problem. How big are your projection >> images? >> You can always change the parameter m_ProjectionSubsetSize to 1 with >> >> http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 >> to lower the amount of projection images in the GPU memory. >> Simon >> >> On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I do encounter another problem though. >> > So everything compiled file and rtkfdk works fine with cpu. >> > However, when I change the hardware argument to cuda, I get the >> > following >> > runtime error when rtkfdk is "Reconstructing and Writing": >> > >> > ======================== >> > ExceptionObject caught with writer->Update() >> > >> > itk::ExceptionObject (0000000000B3EC88) >> > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" >> > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu >> > Line: 85 >> > Description: itk::ERROR: CUFFT ERROR #2 >> > ========================== >> > >> > >> > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't >> > help. >> > Do you know what might be happening? Thanks! >> > >> > Cheers, >> > Andy >> > >> > >> > 2012/11/29 Simon Rit >> >> >> >> Great! I had no clue what the problem was.... Let us know if when we >> >> can >> >> help you with anything else, >> >> Simon >> >> >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >> >>> >> >>> Hi Simon, >> >>> >> >>> The problem seems to disappear when I updated the whole directory to >> >>> the >> >>> newest version of RTK. >> >>> >> >>> Cheers, >> >>> Andy >> >>> >> >>> >> >>> 2012/11/29 Andy Shieh >> >>>> >> >>>> Hi Simon, >> >>>> >> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> >>>> production release 5.0 and 4.2. I doubled checked that CUDA is >> >>>> actually >> >>>> working (the CUDA examples run properly). And I made sure that the >> >>>> CUDA and >> >>>> CUDA SDK directories are correctly specified in the configuration >> >>>> when >> >>>> generating the build files. However, I keep getting these linking >> >>>> errors >> >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any >> >>>> idea >> >>>> what might be going on? Thanks. >> >>>> >> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >>>> >> >>>> ============================================= >> >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 2 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 6 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >> >>>> rtkinlinefdk >> >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 8 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 12 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> >>>> ============================================= >> >>>> >> >>>> Cheers, >> >>>> Andy >> >>> >> >>> >> >>> >> >>> _______________________________________________ >> >>> Rtk-users mailing list >> >>> Rtk-users at openrtk.org >> >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> >> > > > From hsieandy at gmail.com Thu Nov 8 11:58:35 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 9 Nov 2012 00:58:35 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Thank you. At the moment I'm just doing something similar to what you did for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and minus the log of intensity plus one (I assume the plus one is to avoid taking the log of zero?). Another few question: 1. Are you doing any normalization after reconstruction or forward projection? Are the negative values in the reconstructed images simply a result of the ramp filtering? 2. If I want to compare a reprojection from an image reconstructed using RTK with the original projection, how should I make sure the normalization is correct? i.e. should I plus/minus or multiply the reprojected attenuation before I use exponential and make it back to intensity values? 3. The rtkforward projections doesn't seem to work correctly when I'm projecting using a geometry file containing several Projection (Angle). The output mha file seems to "repeat" after a couple of projections instead of showing all projections. I'm testing this on a Varian Half Fan geometry - it works fine if I break the geometry file down into one each for each projection angle and do the forward projection separately. I can send you a reprojection mha file if my description is unclear to you. Thanks Simon!! Cheers, Andy. 2012/10/24 Simon Rit > Hi Andy, > Yes you're right, I have actually noticed recently that but I have not > worked a lot on Varian images because we don't have a Varian CBCT in > Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that > I used to roughly check the geometry. As far as I can remember, when I > wrote this piece of code, I tried to use the same code as Plastimatch > but I could well have done it wrongly. I'm actually waiting for a new > complete Catphan acquisition from Greg to correct for this but if you > already have a patch to suggest or a set of images to send, feel free > to do it. > Thanks, > Simon > > On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: > > Hi Simon, > > > > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the > > attenuation is calculated from the projection image simply via a negative > > transformation (1-Intensity/HND_MaxIntensity). > > Is it usually the way this is done, and is there any reason for doing > this? > > I would have thought attenuation should be calculated from intensity via > > logarithm (since I=I_0 exp(-mu x)). > > Thanks!! > > > > Cheers, > > Andy > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at openrtk.org > > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Nov 9 03:03:04 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 9 Nov 2012 09:03:04 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: > Hi Simon, > > Thank you. At the moment I'm just doing something similar to what you did > for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and > minus the log of intensity plus one (I assume the plus one is to avoid > taking the log of zero?). Does it improve the results? You are welcome to share it if you feel that this is of interest for other people. > > Another few question: > 1. Are you doing any normalization after reconstruction or forward > projection? No. Assuming you have line integral of the attenuation as input of the reconstruction algorithm, you get the attenuation. Are the negative values in the reconstructed images simply a > result of the ramp filtering? Probably. You can use rtkprojections to look at what is the input of the reconstruction algorithm. > 2. If I want to compare a reprojection from an image reconstructed using RTK > with the original projection, how should I make sure the normalization is > correct? i.e. should I plus/minus or multiply the reprojected attenuation > before I use exponential and make it back to intensity values? You basically have to do the inverse formula to what you have done. An easy way of looking at what is going on with forward projections is to look at this example: http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > 3. The rtkforward projections doesn't seem to work correctly when I'm > projecting using a geometry file containing several Projection (Angle). The > output mha file seems to "repeat" after a couple of projections instead of > showing all projections. I'm testing this on a Varian Half Fan geometry - it > works fine if I break the geometry file down into one each for each > projection angle and do the forward projection separately. I can send you a > reprojection mha file if my description is unclear to you. I works for me. Would you be able to fill in a bug report (http://bug.openrtk.org/) with an example? You can generate volumes and projections with rtkdrawgeometricphantom and rtkprojectgeometricphantom. Simon > > Thanks Simon!! > > Cheers, > Andy. > > > > 2012/10/24 Simon Rit >> >> Hi Andy, >> Yes you're right, I have actually noticed recently that but I have not >> worked a lot on Varian images because we don't have a Varian CBCT in >> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> I used to roughly check the geometry. As far as I can remember, when I >> wrote this piece of code, I tried to use the same code as Plastimatch >> but I could well have done it wrongly. I'm actually waiting for a new >> complete Catphan acquisition from Greg to correct for this but if you >> already have a patch to suggest or a set of images to send, feel free >> to do it. >> Thanks, >> Simon >> >> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >> > attenuation is calculated from the projection image simply via a >> > negative >> > transformation (1-Intensity/HND_MaxIntensity). >> > Is it usually the way this is done, and is there any reason for doing >> > this? >> > I would have thought attenuation should be calculated from intensity via >> > logarithm (since I=I_0 exp(-mu x)). >> > Thanks!! >> > >> > Cheers, >> > Andy >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at openrtk.org >> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> > > > From simon.rit at creatis.insa-lyon.fr Mon Nov 19 05:37:18 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 19 Nov 2012 11:37:18 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, I have pushed a fix for the Varian raw to attenuation conversion. Let me know if it meets what you've done. I will let you know if there is any other improvement of the conversion in the future. Simon On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit wrote: > Hi Andy, > > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> Hi Simon, >> >> Thank you. At the moment I'm just doing something similar to what you did >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and >> minus the log of intensity plus one (I assume the plus one is to avoid >> taking the log of zero?). > Does it improve the results? You are welcome to share it if you feel > that this is of interest for other people. > >> >> Another few question: >> 1. Are you doing any normalization after reconstruction or forward >> projection? > No. Assuming you have line integral of the attenuation as input of the > reconstruction algorithm, you get the attenuation. > > Are the negative values in the reconstructed images simply a >> result of the ramp filtering? > Probably. You can use rtkprojections to look at what is the input of > the reconstruction algorithm. > >> 2. If I want to compare a reprojection from an image reconstructed using RTK >> with the original projection, how should I make sure the normalization is >> correct? i.e. should I plus/minus or multiply the reprojected attenuation >> before I use exponential and make it back to intensity values? > You basically have to do the inverse formula to what you have done. An > easy way of looking at what is going on with forward projections is to > look at this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> projecting using a geometry file containing several Projection (Angle). The >> output mha file seems to "repeat" after a couple of projections instead of >> showing all projections. I'm testing this on a Varian Half Fan geometry - it >> works fine if I break the geometry file down into one each for each >> projection angle and do the forward projection separately. I can send you a >> reprojection mha file if my description is unclear to you. > I works for me. Would you be able to fill in a bug report > (http://bug.openrtk.org/) with an example? You can generate volumes > and projections with rtkdrawgeometricphantom and > rtkprojectgeometricphantom. > Simon > >> >> Thanks Simon!! >> >> Cheers, >> Andy. >> >> >> >> 2012/10/24 Simon Rit >>> >>> Hi Andy, >>> Yes you're right, I have actually noticed recently that but I have not >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >>> I used to roughly check the geometry. As far as I can remember, when I >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> but I could well have done it wrongly. I'm actually waiting for a new >>> complete Catphan acquisition from Greg to correct for this but if you >>> already have a patch to suggest or a set of images to send, feel free >>> to do it. >>> Thanks, >>> Simon >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >>> > Hi Simon, >>> > >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >>> > attenuation is calculated from the projection image simply via a >>> > negative >>> > transformation (1-Intensity/HND_MaxIntensity). >>> > Is it usually the way this is done, and is there any reason for doing >>> > this? >>> > I would have thought attenuation should be calculated from intensity via >>> > logarithm (since I=I_0 exp(-mu x)). >>> > Thanks!! >>> > >>> > Cheers, >>> > Andy >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at openrtk.org >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > >> >> From hsieandy at gmail.com Fri Nov 23 06:35:22 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 23 Nov 2012 19:35:22 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Just to let you know that the code works well!! Thanks! By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know him?), and he mentioned that he's been putting quite some effort on making RTK compatible with Varian format (HNC mainly). He mentioned that for the Varian format, we usually read in the "Norm Chamber value" (It's usually around 300) from each HNC header, and calculate the CT number by log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is around 10000. I'm not too sure about the details, but I believe he will discuss it with you soon when he has time! Cheers, Andy > > > 2012/11/19 Simon Rit > >> Hi Andy, >> I have pushed a fix for the Varian raw to attenuation conversion. Let >> me know if it meets what you've done. I will let you know if there is >> any other improvement of the conversion in the future. >> Simon >> >> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >> wrote: >> > Hi Andy, >> > >> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> >> Hi Simon, >> >> >> >> Thank you. At the moment I'm just doing something similar to what you >> did >> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >> and >> >> minus the log of intensity plus one (I assume the plus one is to avoid >> >> taking the log of zero?). >> > Does it improve the results? You are welcome to share it if you feel >> > that this is of interest for other people. >> > >> >> >> >> Another few question: >> >> 1. Are you doing any normalization after reconstruction or forward >> >> projection? >> > No. Assuming you have line integral of the attenuation as input of the >> > reconstruction algorithm, you get the attenuation. >> > >> > Are the negative values in the reconstructed images simply a >> >> result of the ramp filtering? >> > Probably. You can use rtkprojections to look at what is the input of >> > the reconstruction algorithm. >> > >> >> 2. If I want to compare a reprojection from an image reconstructed >> using RTK >> >> with the original projection, how should I make sure the normalization >> is >> >> correct? i.e. should I plus/minus or multiply the reprojected >> attenuation >> >> before I use exponential and make it back to intensity values? >> > You basically have to do the inverse formula to what you have done. An >> > easy way of looking at what is going on with forward projections is to >> > look at this example: >> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >> > >> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> >> projecting using a geometry file containing several Projection >> (Angle). The >> >> output mha file seems to "repeat" after a couple of projections >> instead of >> >> showing all projections. I'm testing this on a Varian Half Fan >> geometry - it >> >> works fine if I break the geometry file down into one each for each >> >> projection angle and do the forward projection separately. I can send >> you a >> >> reprojection mha file if my description is unclear to you. >> > I works for me. Would you be able to fill in a bug report >> > (http://bug.openrtk.org/) with an example? You can generate volumes >> > and projections with rtkdrawgeometricphantom and >> > rtkprojectgeometricphantom. >> > Simon >> > >> >> >> >> Thanks Simon!! >> >> >> >> Cheers, >> >> Andy. >> >> >> >> >> >> >> >> 2012/10/24 Simon Rit >> >>> >> >>> Hi Andy, >> >>> Yes you're right, I have actually noticed recently that but I have not >> >>> worked a lot on Varian images because we don't have a Varian CBCT in >> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> >>> I used to roughly check the geometry. As far as I can remember, when I >> >>> wrote this piece of code, I tried to use the same code as Plastimatch >> >>> but I could well have done it wrongly. I'm actually waiting for a new >> >>> complete Catphan acquisition from Greg to correct for this but if you >> >>> already have a patch to suggest or a set of images to send, feel free >> >>> to do it. >> >>> Thanks, >> >>> Simon >> >>> >> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >> wrote: >> >>> > Hi Simon, >> >>> > >> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >> the >> >>> > attenuation is calculated from the projection image simply via a >> >>> > negative >> >>> > transformation (1-Intensity/HND_MaxIntensity). >> >>> > Is it usually the way this is done, and is there any reason for >> doing >> >>> > this? >> >>> > I would have thought attenuation should be calculated from >> intensity via >> >>> > logarithm (since I=I_0 exp(-mu x)). >> >>> > Thanks!! >> >>> > >> >>> > Cheers, >> >>> > Andy >> >>> > >> >>> > _______________________________________________ >> >>> > Rtk-users mailing list >> >>> > Rtk-users at openrtk.org >> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> > >> >> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Mon Nov 26 08:45:42 2012 From: gdhugo at vcu.edu (Geoff Hugo) Date: Mon, 26 Nov 2012 08:45:42 -0500 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: <50B37286.7020809@vcu.edu> An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 28 03:51:12 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Nov 2012 09:51:12 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: <50B37286.7020809@vcu.edu> References: <50B37286.7020809@vcu.edu> Message-ID: Hi, Thanks for the feeback. I don't know any users that actively use Varian projection images. I will put a Catphan dataset online soon that has been provided by Greg Sharp and I'll try to adjust reconstructed values to linear attenuation. A filter to convert from linear to attenuation to HU is rather easy to add if one feels it's required. Simon On Mon, Nov 26, 2012 at 2:45 PM, Geoff Hugo wrote: > Hi Simon and Andy, > > The ScaleFactor we use at VCU is a rough conversion from linear attenuation > coefficient (the output of RTK) to something roughly around CT number > (Hounsfield Units). This is not a proper conversion, just a placeholder for > now. I'm not sure how useful the HNC-compatible version we have at VCU will > be to the wider community, as HNC is not a generally available format and > HND is the more common one. Are there any other users of RTK that use > Varian HNC format projections? > > Geoff > > On 11/23/12 6:35 AM, Andy Shieh wrote: > > Hi Simon, > > Just to let you know that the code works well!! Thanks! > > By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know > him?), and he mentioned that he's been putting quite some effort on making > RTK compatible with Varian format (HNC mainly). He mentioned that for the > Varian format, we usually read in the "Norm Chamber value" (It's usually > around 300) from each HNC header, and calculate the CT number by > log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is > around 10000. I'm not too sure about the details, but I believe he will > discuss it with you soon when he has time! > > Cheers, > Andy > >> >> >> >> 2012/11/19 Simon Rit >>> >>> Hi Andy, >>> I have pushed a fix for the Varian raw to attenuation conversion. Let >>> me know if it meets what you've done. I will let you know if there is >>> any other improvement of the conversion in the future. >>> Simon >>> >>> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >>> wrote: >>> > Hi Andy, >>> > >>> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >>> >> Hi Simon, >>> >> >>> >> Thank you. At the moment I'm just doing something similar to what you >>> >> did >>> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >>> >> and >>> >> minus the log of intensity plus one (I assume the plus one is to avoid >>> >> taking the log of zero?). >>> > Does it improve the results? You are welcome to share it if you feel >>> > that this is of interest for other people. >>> > >>> >> >>> >> Another few question: >>> >> 1. Are you doing any normalization after reconstruction or forward >>> >> projection? >>> > No. Assuming you have line integral of the attenuation as input of the >>> > reconstruction algorithm, you get the attenuation. >>> > >>> > Are the negative values in the reconstructed images simply a >>> >> result of the ramp filtering? >>> > Probably. You can use rtkprojections to look at what is the input of >>> > the reconstruction algorithm. >>> > >>> >> 2. If I want to compare a reprojection from an image reconstructed >>> >> using RTK >>> >> with the original projection, how should I make sure the normalization >>> >> is >>> >> correct? i.e. should I plus/minus or multiply the reprojected >>> >> attenuation >>> >> before I use exponential and make it back to intensity values? >>> > You basically have to do the inverse formula to what you have done. An >>> > easy way of looking at what is going on with forward projections is to >>> > look at this example: >>> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >>> > >>> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >>> >> projecting using a geometry file containing several Projection >>> >> (Angle). The >>> >> output mha file seems to "repeat" after a couple of projections >>> >> instead of >>> >> showing all projections. I'm testing this on a Varian Half Fan >>> >> geometry - it >>> >> works fine if I break the geometry file down into one each for each >>> >> projection angle and do the forward projection separately. I can send >>> >> you a >>> >> reprojection mha file if my description is unclear to you. >>> > I works for me. Would you be able to fill in a bug report >>> > (http://bug.openrtk.org/) with an example? You can generate volumes >>> > and projections with rtkdrawgeometricphantom and >>> > rtkprojectgeometricphantom. >>> > Simon >>> > >>> >> >>> >> Thanks Simon!! >>> >> >>> >> Cheers, >>> >> Andy. >>> >> >>> >> >>> >> >>> >> 2012/10/24 Simon Rit >>> >>> >>> >>> Hi Andy, >>> >>> Yes you're right, I have actually noticed recently that but I have >>> >>> not >>> >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan >>> >>> that >>> >>> I used to roughly check the geometry. As far as I can remember, when >>> >>> I >>> >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> >>> but I could well have done it wrongly. I'm actually waiting for a new >>> >>> complete Catphan acquisition from Greg to correct for this but if you >>> >>> already have a patch to suggest or a set of images to send, feel free >>> >>> to do it. >>> >>> Thanks, >>> >>> Simon >>> >>> >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >>> >>> wrote: >>> >>> > Hi Simon, >>> >>> > >>> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >>> >>> > the >>> >>> > attenuation is calculated from the projection image simply via a >>> >>> > negative >>> >>> > transformation (1-Intensity/HND_MaxIntensity). >>> >>> > Is it usually the way this is done, and is there any reason for >>> >>> > doing >>> >>> > this? >>> >>> > I would have thought attenuation should be calculated from >>> >>> > intensity via >>> >>> > logarithm (since I=I_0 exp(-mu x)). >>> >>> > Thanks!! >>> >>> > >>> >>> > Cheers, >>> >>> > Andy >>> >>> > >>> >>> > _______________________________________________ >>> >>> > Rtk-users mailing list >>> >>> > Rtk-users at openrtk.org >>> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> >>> > >>> >> >>> >> >> >> > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -- > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Assistant Professor > Dept. of Radiation Oncology > Virginia Commonwealth University > gdhugo at vcu.edu From hsieandy at gmail.com Thu Nov 29 01:03:44 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 14:03:44 +0800 Subject: [Rtk-users] Compiling with CUDA Message-ID: Hi Simon, Lately I've been trying to build RTK with CUDA. I tried both the CUDA production release 5.0 and 4.2. I doubled checked that CUDA is actually working (the CUDA examples run properly). And I made sure that the CUDA and CUDA SDK directories are correctly specified in the configuration when generating the build files. However, I keep getting these linking errors when I tried to compile RTK using Visual Studio 2010. Do you have any idea what might be going on? Thanks. I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. ============================================= Error 1 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 2 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 3 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 4 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 5 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkinlinefdk Error 6 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk Error 7 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 8 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 9 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 10 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 11 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkfdk Error 12 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk ============================================= Cheers, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 02:11:32 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 15:11:32 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, The problem seems to disappear when I updated the whole directory to the newest version of RTK. Cheers, Andy 2012/11/29 Andy Shieh > Hi Simon, > > Lately I've been trying to build RTK with CUDA. I tried both the CUDA > production release 5.0 and 4.2. I doubled checked that CUDA is actually > working (the CUDA examples run properly). And I made sure that the CUDA and > CUDA SDK directories are correctly specified in the configuration when > generating the build files. However, I keep getting these linking errors > when I tried to compile RTK using Visual Studio 2010. Do you have any idea > what might be going on? Thanks. > > I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > > ============================================= > Error 1 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 2 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 3 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 4 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 5 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkinlinefdk > Error 6 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk > Error 7 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 8 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 9 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 10 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 11 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkfdk > Error 12 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > ============================================= > > Cheers, > Andy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 02:15:48 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 08:15:48 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Great! I had no clue what the problem was.... Let us know if when we can help you with anything else, Simon On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > Hi Simon, > > The problem seems to disappear when I updated the whole directory to the > newest version of RTK. > > Cheers, > Andy > > > 2012/11/29 Andy Shieh > >> Hi Simon, >> >> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> production release 5.0 and 4.2. I doubled checked that CUDA is actually >> working (the CUDA examples run properly). And I made sure that the CUDA and >> CUDA SDK directories are correctly specified in the configuration when >> generating the build files. However, I keep getting these linking errors >> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >> what might be going on? Thanks. >> >> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >> ============================================= >> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 2 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkinlinefdk >> Error 6 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 8 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkfdk >> Error 12 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> ============================================= >> >> Cheers, >> Andy >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 03:57:51 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 16:57:51 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, I do encounter another problem though. So everything compiled file and rtkfdk works fine with cpu. However, when I change the hardware argument to cuda, I get the following runtime error when rtkfdk is "Reconstructing and Writing": ======================== ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000B3EC88) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 85 Description: itk::ERROR: CUFFT ERROR #2 ========================== I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. Do you know what might be happening? Thanks! Cheers, Andy 2012/11/29 Simon Rit > Great! I had no clue what the problem was.... Let us know if when we can > help you with anything else, > Simon > On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >> Hi Simon, >> >> The problem seems to disappear when I updated the whole directory to the >> newest version of RTK. >> >> Cheers, >> Andy >> >> >> 2012/11/29 Andy Shieh >> >>> Hi Simon, >>> >>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>> working (the CUDA examples run properly). And I made sure that the CUDA and >>> CUDA SDK directories are correctly specified in the configuration when >>> generating the build files. However, I keep getting these linking errors >>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>> what might be going on? Thanks. >>> >>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>> >>> ============================================= >>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 2 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkinlinefdk >>> Error 6 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >>> rtkinlinefdk >>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 8 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkfdk >>> Error 12 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>> ============================================= >>> >>> Cheers, >>> Andy >>> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at openrtk.org >> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 05:08:15 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 11:08:15 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi, It's seems to be an allocation problem. How big are your projection images? You can always change the parameter m_ProjectionSubsetSize to 1 with http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 to lower the amount of projection images in the GPU memory. Simon On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > Hi Simon, > > I do encounter another problem though. > So everything compiled file and rtkfdk works fine with cpu. > However, when I change the hardware argument to cuda, I get the following > runtime error when rtkfdk is "Reconstructing and Writing": > > ======================== > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000B3EC88) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 85 > Description: itk::ERROR: CUFFT ERROR #2 > ========================== > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. > Do you know what might be happening? Thanks! > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Great! I had no clue what the problem was.... Let us know if when we can >> help you with anything else, >> Simon >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >>> >>> Hi Simon, >>> >>> The problem seems to disappear when I updated the whole directory to the >>> newest version of RTK. >>> >>> Cheers, >>> Andy >>> >>> >>> 2012/11/29 Andy Shieh >>>> >>>> Hi Simon, >>>> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>>> working (the CUDA examples run properly). And I made sure that the CUDA and >>>> CUDA SDK directories are correctly specified in the configuration when >>>> generating the build files. However, I keep getting these linking errors >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>>> what might be going on? Thanks. >>>> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>>> >>>> ============================================= >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 2 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkinlinefdk >>>> Error 6 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 8 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkfdk >>>> Error 12 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>>> ============================================= >>>> >>>> Cheers, >>>> Andy >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at openrtk.org >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > From hsieandy at gmail.com Thu Nov 29 07:53:57 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 20:53:57 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, Thanks for the suggestion. I tried, but it gave another error message. When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following runtime error: =============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A5E8D8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 102 Description: itk::ERROR: CUDA ERROR: invalid configuration argument ================ When I set it to the default value of 4, I get the CUFFT error in the previous maile. When I set it to 5, 6, and beyond, I get the following runtime error: ============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A2ECB8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 69 Description: itk::ERROR: CUDA ERROR: out of memory ============== Cheers, Andy 2012/11/29 Simon Rit > Hi, > It's seems to be an allocation problem. How big are your projection images? > You can always change the parameter m_ProjectionSubsetSize to 1 with > > http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 > to lower the amount of projection images in the GPU memory. > Simon > > On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > > Hi Simon, > > > > I do encounter another problem though. > > So everything compiled file and rtkfdk works fine with cpu. > > However, when I change the hardware argument to cuda, I get the following > > runtime error when rtkfdk is "Reconstructing and Writing": > > > > ======================== > > ExceptionObject caught with writer->Update() > > > > itk::ExceptionObject (0000000000B3EC88) > > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > > Line: 85 > > Description: itk::ERROR: CUFFT ERROR #2 > > ========================== > > > > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't > help. > > Do you know what might be happening? Thanks! > > > > Cheers, > > Andy > > > > > > 2012/11/29 Simon Rit > >> > >> Great! I had no clue what the problem was.... Let us know if when we can > >> help you with anything else, > >> Simon > >> > >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >>> > >>> Hi Simon, > >>> > >>> The problem seems to disappear when I updated the whole directory to > the > >>> newest version of RTK. > >>> > >>> Cheers, > >>> Andy > >>> > >>> > >>> 2012/11/29 Andy Shieh > >>>> > >>>> Hi Simon, > >>>> > >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA > >>>> production release 5.0 and 4.2. I doubled checked that CUDA is > actually > >>>> working (the CUDA examples run properly). And I made sure that the > CUDA and > >>>> CUDA SDK directories are correctly specified in the configuration when > >>>> generating the build files. However, I keep getting these linking > errors > >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any > idea > >>>> what might be going on? Thanks. > >>>> > >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > >>>> > >>>> ============================================= > >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 2 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 6 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe > rtkinlinefdk > >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 8 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkfdk > >>>> Error 12 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > >>>> ============================================= > >>>> > >>>> Cheers, > >>>> Andy > >>> > >>> > >>> > >>> _______________________________________________ > >>> Rtk-users mailing list > >>> Rtk-users at openrtk.org > >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > >>> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 13:33:56 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 19:33:56 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Andy, It seems that you have very little GPU memory. Do you know what graphics card you have? If I were you, I would start with a smaller volume with the --dimension option if you use my command line tools (modify as well the spacing at first, e.g., --spacing 8 --dimension 32). You can also use the --divisions option to split the volume in pieces but you then redo the filtering of all projection images. BTW, would you have two graphics card, there is nohing to select one over the other. Maybe this is what happens to you? You can then modify "GetListOfCudaDevices" and add some parameters to select the graphics card based on the memory. Let me know if I can help more, Simon On Thu, Nov 29, 2012 at 1:53 PM, Andy Shieh wrote: > Hi Simon, > > Thanks for the suggestion. I tried, but it gave another error message. > > When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following > runtime error: > =============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A5E8D8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 102 > Description: itk::ERROR: CUDA ERROR: invalid configuration argument > ================ > > > When I set it to the default value of 4, I get the CUFFT error in the > previous maile. > > > When I set it to 5, 6, and beyond, I get the following runtime error: > ============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A2ECB8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 69 > Description: itk::ERROR: CUDA ERROR: out of memory > ============== > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Hi, >> It's seems to be an allocation problem. How big are your projection >> images? >> You can always change the parameter m_ProjectionSubsetSize to 1 with >> >> http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 >> to lower the amount of projection images in the GPU memory. >> Simon >> >> On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I do encounter another problem though. >> > So everything compiled file and rtkfdk works fine with cpu. >> > However, when I change the hardware argument to cuda, I get the >> > following >> > runtime error when rtkfdk is "Reconstructing and Writing": >> > >> > ======================== >> > ExceptionObject caught with writer->Update() >> > >> > itk::ExceptionObject (0000000000B3EC88) >> > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" >> > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu >> > Line: 85 >> > Description: itk::ERROR: CUFFT ERROR #2 >> > ========================== >> > >> > >> > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't >> > help. >> > Do you know what might be happening? Thanks! >> > >> > Cheers, >> > Andy >> > >> > >> > 2012/11/29 Simon Rit >> >> >> >> Great! I had no clue what the problem was.... Let us know if when we >> >> can >> >> help you with anything else, >> >> Simon >> >> >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >> >>> >> >>> Hi Simon, >> >>> >> >>> The problem seems to disappear when I updated the whole directory to >> >>> the >> >>> newest version of RTK. >> >>> >> >>> Cheers, >> >>> Andy >> >>> >> >>> >> >>> 2012/11/29 Andy Shieh >> >>>> >> >>>> Hi Simon, >> >>>> >> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> >>>> production release 5.0 and 4.2. I doubled checked that CUDA is >> >>>> actually >> >>>> working (the CUDA examples run properly). And I made sure that the >> >>>> CUDA and >> >>>> CUDA SDK directories are correctly specified in the configuration >> >>>> when >> >>>> generating the build files. However, I keep getting these linking >> >>>> errors >> >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any >> >>>> idea >> >>>> what might be going on? Thanks. >> >>>> >> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >>>> >> >>>> ============================================= >> >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 2 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 6 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >> >>>> rtkinlinefdk >> >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 8 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 12 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> >>>> ============================================= >> >>>> >> >>>> Cheers, >> >>>> Andy >> >>> >> >>> >> >>> >> >>> _______________________________________________ >> >>> Rtk-users mailing list >> >>> Rtk-users at openrtk.org >> >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> >> > > > From hsieandy at gmail.com Thu Nov 8 11:58:35 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 9 Nov 2012 00:58:35 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Thank you. At the moment I'm just doing something similar to what you did for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and minus the log of intensity plus one (I assume the plus one is to avoid taking the log of zero?). Another few question: 1. Are you doing any normalization after reconstruction or forward projection? Are the negative values in the reconstructed images simply a result of the ramp filtering? 2. If I want to compare a reprojection from an image reconstructed using RTK with the original projection, how should I make sure the normalization is correct? i.e. should I plus/minus or multiply the reprojected attenuation before I use exponential and make it back to intensity values? 3. The rtkforward projections doesn't seem to work correctly when I'm projecting using a geometry file containing several Projection (Angle). The output mha file seems to "repeat" after a couple of projections instead of showing all projections. I'm testing this on a Varian Half Fan geometry - it works fine if I break the geometry file down into one each for each projection angle and do the forward projection separately. I can send you a reprojection mha file if my description is unclear to you. Thanks Simon!! Cheers, Andy. 2012/10/24 Simon Rit > Hi Andy, > Yes you're right, I have actually noticed recently that but I have not > worked a lot on Varian images because we don't have a Varian CBCT in > Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that > I used to roughly check the geometry. As far as I can remember, when I > wrote this piece of code, I tried to use the same code as Plastimatch > but I could well have done it wrongly. I'm actually waiting for a new > complete Catphan acquisition from Greg to correct for this but if you > already have a patch to suggest or a set of images to send, feel free > to do it. > Thanks, > Simon > > On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: > > Hi Simon, > > > > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the > > attenuation is calculated from the projection image simply via a negative > > transformation (1-Intensity/HND_MaxIntensity). > > Is it usually the way this is done, and is there any reason for doing > this? > > I would have thought attenuation should be calculated from intensity via > > logarithm (since I=I_0 exp(-mu x)). > > Thanks!! > > > > Cheers, > > Andy > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at openrtk.org > > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Nov 9 03:03:04 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 9 Nov 2012 09:03:04 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: > Hi Simon, > > Thank you. At the moment I'm just doing something similar to what you did > for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and > minus the log of intensity plus one (I assume the plus one is to avoid > taking the log of zero?). Does it improve the results? You are welcome to share it if you feel that this is of interest for other people. > > Another few question: > 1. Are you doing any normalization after reconstruction or forward > projection? No. Assuming you have line integral of the attenuation as input of the reconstruction algorithm, you get the attenuation. Are the negative values in the reconstructed images simply a > result of the ramp filtering? Probably. You can use rtkprojections to look at what is the input of the reconstruction algorithm. > 2. If I want to compare a reprojection from an image reconstructed using RTK > with the original projection, how should I make sure the normalization is > correct? i.e. should I plus/minus or multiply the reprojected attenuation > before I use exponential and make it back to intensity values? You basically have to do the inverse formula to what you have done. An easy way of looking at what is going on with forward projections is to look at this example: http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > 3. The rtkforward projections doesn't seem to work correctly when I'm > projecting using a geometry file containing several Projection (Angle). The > output mha file seems to "repeat" after a couple of projections instead of > showing all projections. I'm testing this on a Varian Half Fan geometry - it > works fine if I break the geometry file down into one each for each > projection angle and do the forward projection separately. I can send you a > reprojection mha file if my description is unclear to you. I works for me. Would you be able to fill in a bug report (http://bug.openrtk.org/) with an example? You can generate volumes and projections with rtkdrawgeometricphantom and rtkprojectgeometricphantom. Simon > > Thanks Simon!! > > Cheers, > Andy. > > > > 2012/10/24 Simon Rit >> >> Hi Andy, >> Yes you're right, I have actually noticed recently that but I have not >> worked a lot on Varian images because we don't have a Varian CBCT in >> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> I used to roughly check the geometry. As far as I can remember, when I >> wrote this piece of code, I tried to use the same code as Plastimatch >> but I could well have done it wrongly. I'm actually waiting for a new >> complete Catphan acquisition from Greg to correct for this but if you >> already have a patch to suggest or a set of images to send, feel free >> to do it. >> Thanks, >> Simon >> >> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >> > attenuation is calculated from the projection image simply via a >> > negative >> > transformation (1-Intensity/HND_MaxIntensity). >> > Is it usually the way this is done, and is there any reason for doing >> > this? >> > I would have thought attenuation should be calculated from intensity via >> > logarithm (since I=I_0 exp(-mu x)). >> > Thanks!! >> > >> > Cheers, >> > Andy >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at openrtk.org >> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> > > > From simon.rit at creatis.insa-lyon.fr Mon Nov 19 05:37:18 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 19 Nov 2012 11:37:18 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, I have pushed a fix for the Varian raw to attenuation conversion. Let me know if it meets what you've done. I will let you know if there is any other improvement of the conversion in the future. Simon On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit wrote: > Hi Andy, > > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> Hi Simon, >> >> Thank you. At the moment I'm just doing something similar to what you did >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and >> minus the log of intensity plus one (I assume the plus one is to avoid >> taking the log of zero?). > Does it improve the results? You are welcome to share it if you feel > that this is of interest for other people. > >> >> Another few question: >> 1. Are you doing any normalization after reconstruction or forward >> projection? > No. Assuming you have line integral of the attenuation as input of the > reconstruction algorithm, you get the attenuation. > > Are the negative values in the reconstructed images simply a >> result of the ramp filtering? > Probably. You can use rtkprojections to look at what is the input of > the reconstruction algorithm. > >> 2. If I want to compare a reprojection from an image reconstructed using RTK >> with the original projection, how should I make sure the normalization is >> correct? i.e. should I plus/minus or multiply the reprojected attenuation >> before I use exponential and make it back to intensity values? > You basically have to do the inverse formula to what you have done. An > easy way of looking at what is going on with forward projections is to > look at this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> projecting using a geometry file containing several Projection (Angle). The >> output mha file seems to "repeat" after a couple of projections instead of >> showing all projections. I'm testing this on a Varian Half Fan geometry - it >> works fine if I break the geometry file down into one each for each >> projection angle and do the forward projection separately. I can send you a >> reprojection mha file if my description is unclear to you. > I works for me. Would you be able to fill in a bug report > (http://bug.openrtk.org/) with an example? You can generate volumes > and projections with rtkdrawgeometricphantom and > rtkprojectgeometricphantom. > Simon > >> >> Thanks Simon!! >> >> Cheers, >> Andy. >> >> >> >> 2012/10/24 Simon Rit >>> >>> Hi Andy, >>> Yes you're right, I have actually noticed recently that but I have not >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >>> I used to roughly check the geometry. As far as I can remember, when I >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> but I could well have done it wrongly. I'm actually waiting for a new >>> complete Catphan acquisition from Greg to correct for this but if you >>> already have a patch to suggest or a set of images to send, feel free >>> to do it. >>> Thanks, >>> Simon >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >>> > Hi Simon, >>> > >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >>> > attenuation is calculated from the projection image simply via a >>> > negative >>> > transformation (1-Intensity/HND_MaxIntensity). >>> > Is it usually the way this is done, and is there any reason for doing >>> > this? >>> > I would have thought attenuation should be calculated from intensity via >>> > logarithm (since I=I_0 exp(-mu x)). >>> > Thanks!! >>> > >>> > Cheers, >>> > Andy >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at openrtk.org >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > >> >> From hsieandy at gmail.com Fri Nov 23 06:35:22 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 23 Nov 2012 19:35:22 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Just to let you know that the code works well!! Thanks! By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know him?), and he mentioned that he's been putting quite some effort on making RTK compatible with Varian format (HNC mainly). He mentioned that for the Varian format, we usually read in the "Norm Chamber value" (It's usually around 300) from each HNC header, and calculate the CT number by log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is around 10000. I'm not too sure about the details, but I believe he will discuss it with you soon when he has time! Cheers, Andy > > > 2012/11/19 Simon Rit > >> Hi Andy, >> I have pushed a fix for the Varian raw to attenuation conversion. Let >> me know if it meets what you've done. I will let you know if there is >> any other improvement of the conversion in the future. >> Simon >> >> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >> wrote: >> > Hi Andy, >> > >> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> >> Hi Simon, >> >> >> >> Thank you. At the moment I'm just doing something similar to what you >> did >> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >> and >> >> minus the log of intensity plus one (I assume the plus one is to avoid >> >> taking the log of zero?). >> > Does it improve the results? You are welcome to share it if you feel >> > that this is of interest for other people. >> > >> >> >> >> Another few question: >> >> 1. Are you doing any normalization after reconstruction or forward >> >> projection? >> > No. Assuming you have line integral of the attenuation as input of the >> > reconstruction algorithm, you get the attenuation. >> > >> > Are the negative values in the reconstructed images simply a >> >> result of the ramp filtering? >> > Probably. You can use rtkprojections to look at what is the input of >> > the reconstruction algorithm. >> > >> >> 2. If I want to compare a reprojection from an image reconstructed >> using RTK >> >> with the original projection, how should I make sure the normalization >> is >> >> correct? i.e. should I plus/minus or multiply the reprojected >> attenuation >> >> before I use exponential and make it back to intensity values? >> > You basically have to do the inverse formula to what you have done. An >> > easy way of looking at what is going on with forward projections is to >> > look at this example: >> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >> > >> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> >> projecting using a geometry file containing several Projection >> (Angle). The >> >> output mha file seems to "repeat" after a couple of projections >> instead of >> >> showing all projections. I'm testing this on a Varian Half Fan >> geometry - it >> >> works fine if I break the geometry file down into one each for each >> >> projection angle and do the forward projection separately. I can send >> you a >> >> reprojection mha file if my description is unclear to you. >> > I works for me. Would you be able to fill in a bug report >> > (http://bug.openrtk.org/) with an example? You can generate volumes >> > and projections with rtkdrawgeometricphantom and >> > rtkprojectgeometricphantom. >> > Simon >> > >> >> >> >> Thanks Simon!! >> >> >> >> Cheers, >> >> Andy. >> >> >> >> >> >> >> >> 2012/10/24 Simon Rit >> >>> >> >>> Hi Andy, >> >>> Yes you're right, I have actually noticed recently that but I have not >> >>> worked a lot on Varian images because we don't have a Varian CBCT in >> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> >>> I used to roughly check the geometry. As far as I can remember, when I >> >>> wrote this piece of code, I tried to use the same code as Plastimatch >> >>> but I could well have done it wrongly. I'm actually waiting for a new >> >>> complete Catphan acquisition from Greg to correct for this but if you >> >>> already have a patch to suggest or a set of images to send, feel free >> >>> to do it. >> >>> Thanks, >> >>> Simon >> >>> >> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >> wrote: >> >>> > Hi Simon, >> >>> > >> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >> the >> >>> > attenuation is calculated from the projection image simply via a >> >>> > negative >> >>> > transformation (1-Intensity/HND_MaxIntensity). >> >>> > Is it usually the way this is done, and is there any reason for >> doing >> >>> > this? >> >>> > I would have thought attenuation should be calculated from >> intensity via >> >>> > logarithm (since I=I_0 exp(-mu x)). >> >>> > Thanks!! >> >>> > >> >>> > Cheers, >> >>> > Andy >> >>> > >> >>> > _______________________________________________ >> >>> > Rtk-users mailing list >> >>> > Rtk-users at openrtk.org >> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> > >> >> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Mon Nov 26 08:45:42 2012 From: gdhugo at vcu.edu (Geoff Hugo) Date: Mon, 26 Nov 2012 08:45:42 -0500 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: <50B37286.7020809@vcu.edu> An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 28 03:51:12 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Nov 2012 09:51:12 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: <50B37286.7020809@vcu.edu> References: <50B37286.7020809@vcu.edu> Message-ID: Hi, Thanks for the feeback. I don't know any users that actively use Varian projection images. I will put a Catphan dataset online soon that has been provided by Greg Sharp and I'll try to adjust reconstructed values to linear attenuation. A filter to convert from linear to attenuation to HU is rather easy to add if one feels it's required. Simon On Mon, Nov 26, 2012 at 2:45 PM, Geoff Hugo wrote: > Hi Simon and Andy, > > The ScaleFactor we use at VCU is a rough conversion from linear attenuation > coefficient (the output of RTK) to something roughly around CT number > (Hounsfield Units). This is not a proper conversion, just a placeholder for > now. I'm not sure how useful the HNC-compatible version we have at VCU will > be to the wider community, as HNC is not a generally available format and > HND is the more common one. Are there any other users of RTK that use > Varian HNC format projections? > > Geoff > > On 11/23/12 6:35 AM, Andy Shieh wrote: > > Hi Simon, > > Just to let you know that the code works well!! Thanks! > > By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know > him?), and he mentioned that he's been putting quite some effort on making > RTK compatible with Varian format (HNC mainly). He mentioned that for the > Varian format, we usually read in the "Norm Chamber value" (It's usually > around 300) from each HNC header, and calculate the CT number by > log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is > around 10000. I'm not too sure about the details, but I believe he will > discuss it with you soon when he has time! > > Cheers, > Andy > >> >> >> >> 2012/11/19 Simon Rit >>> >>> Hi Andy, >>> I have pushed a fix for the Varian raw to attenuation conversion. Let >>> me know if it meets what you've done. I will let you know if there is >>> any other improvement of the conversion in the future. >>> Simon >>> >>> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >>> wrote: >>> > Hi Andy, >>> > >>> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >>> >> Hi Simon, >>> >> >>> >> Thank you. At the moment I'm just doing something similar to what you >>> >> did >>> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >>> >> and >>> >> minus the log of intensity plus one (I assume the plus one is to avoid >>> >> taking the log of zero?). >>> > Does it improve the results? You are welcome to share it if you feel >>> > that this is of interest for other people. >>> > >>> >> >>> >> Another few question: >>> >> 1. Are you doing any normalization after reconstruction or forward >>> >> projection? >>> > No. Assuming you have line integral of the attenuation as input of the >>> > reconstruction algorithm, you get the attenuation. >>> > >>> > Are the negative values in the reconstructed images simply a >>> >> result of the ramp filtering? >>> > Probably. You can use rtkprojections to look at what is the input of >>> > the reconstruction algorithm. >>> > >>> >> 2. If I want to compare a reprojection from an image reconstructed >>> >> using RTK >>> >> with the original projection, how should I make sure the normalization >>> >> is >>> >> correct? i.e. should I plus/minus or multiply the reprojected >>> >> attenuation >>> >> before I use exponential and make it back to intensity values? >>> > You basically have to do the inverse formula to what you have done. An >>> > easy way of looking at what is going on with forward projections is to >>> > look at this example: >>> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >>> > >>> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >>> >> projecting using a geometry file containing several Projection >>> >> (Angle). The >>> >> output mha file seems to "repeat" after a couple of projections >>> >> instead of >>> >> showing all projections. I'm testing this on a Varian Half Fan >>> >> geometry - it >>> >> works fine if I break the geometry file down into one each for each >>> >> projection angle and do the forward projection separately. I can send >>> >> you a >>> >> reprojection mha file if my description is unclear to you. >>> > I works for me. Would you be able to fill in a bug report >>> > (http://bug.openrtk.org/) with an example? You can generate volumes >>> > and projections with rtkdrawgeometricphantom and >>> > rtkprojectgeometricphantom. >>> > Simon >>> > >>> >> >>> >> Thanks Simon!! >>> >> >>> >> Cheers, >>> >> Andy. >>> >> >>> >> >>> >> >>> >> 2012/10/24 Simon Rit >>> >>> >>> >>> Hi Andy, >>> >>> Yes you're right, I have actually noticed recently that but I have >>> >>> not >>> >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan >>> >>> that >>> >>> I used to roughly check the geometry. As far as I can remember, when >>> >>> I >>> >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> >>> but I could well have done it wrongly. I'm actually waiting for a new >>> >>> complete Catphan acquisition from Greg to correct for this but if you >>> >>> already have a patch to suggest or a set of images to send, feel free >>> >>> to do it. >>> >>> Thanks, >>> >>> Simon >>> >>> >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >>> >>> wrote: >>> >>> > Hi Simon, >>> >>> > >>> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >>> >>> > the >>> >>> > attenuation is calculated from the projection image simply via a >>> >>> > negative >>> >>> > transformation (1-Intensity/HND_MaxIntensity). >>> >>> > Is it usually the way this is done, and is there any reason for >>> >>> > doing >>> >>> > this? >>> >>> > I would have thought attenuation should be calculated from >>> >>> > intensity via >>> >>> > logarithm (since I=I_0 exp(-mu x)). >>> >>> > Thanks!! >>> >>> > >>> >>> > Cheers, >>> >>> > Andy >>> >>> > >>> >>> > _______________________________________________ >>> >>> > Rtk-users mailing list >>> >>> > Rtk-users at openrtk.org >>> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> >>> > >>> >> >>> >> >> >> > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -- > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Assistant Professor > Dept. of Radiation Oncology > Virginia Commonwealth University > gdhugo at vcu.edu From hsieandy at gmail.com Thu Nov 29 01:03:44 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 14:03:44 +0800 Subject: [Rtk-users] Compiling with CUDA Message-ID: Hi Simon, Lately I've been trying to build RTK with CUDA. I tried both the CUDA production release 5.0 and 4.2. I doubled checked that CUDA is actually working (the CUDA examples run properly). And I made sure that the CUDA and CUDA SDK directories are correctly specified in the configuration when generating the build files. However, I keep getting these linking errors when I tried to compile RTK using Visual Studio 2010. Do you have any idea what might be going on? Thanks. I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. ============================================= Error 1 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 2 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 3 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 4 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 5 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkinlinefdk Error 6 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk Error 7 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 8 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 9 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 10 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 11 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkfdk Error 12 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk ============================================= Cheers, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 02:11:32 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 15:11:32 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, The problem seems to disappear when I updated the whole directory to the newest version of RTK. Cheers, Andy 2012/11/29 Andy Shieh > Hi Simon, > > Lately I've been trying to build RTK with CUDA. I tried both the CUDA > production release 5.0 and 4.2. I doubled checked that CUDA is actually > working (the CUDA examples run properly). And I made sure that the CUDA and > CUDA SDK directories are correctly specified in the configuration when > generating the build files. However, I keep getting these linking errors > when I tried to compile RTK using Visual Studio 2010. Do you have any idea > what might be going on? Thanks. > > I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > > ============================================= > Error 1 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 2 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 3 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 4 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 5 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkinlinefdk > Error 6 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk > Error 7 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 8 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 9 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 10 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 11 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkfdk > Error 12 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > ============================================= > > Cheers, > Andy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 02:15:48 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 08:15:48 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Great! I had no clue what the problem was.... Let us know if when we can help you with anything else, Simon On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > Hi Simon, > > The problem seems to disappear when I updated the whole directory to the > newest version of RTK. > > Cheers, > Andy > > > 2012/11/29 Andy Shieh > >> Hi Simon, >> >> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> production release 5.0 and 4.2. I doubled checked that CUDA is actually >> working (the CUDA examples run properly). And I made sure that the CUDA and >> CUDA SDK directories are correctly specified in the configuration when >> generating the build files. However, I keep getting these linking errors >> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >> what might be going on? Thanks. >> >> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >> ============================================= >> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 2 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkinlinefdk >> Error 6 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 8 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkfdk >> Error 12 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> ============================================= >> >> Cheers, >> Andy >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 03:57:51 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 16:57:51 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, I do encounter another problem though. So everything compiled file and rtkfdk works fine with cpu. However, when I change the hardware argument to cuda, I get the following runtime error when rtkfdk is "Reconstructing and Writing": ======================== ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000B3EC88) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 85 Description: itk::ERROR: CUFFT ERROR #2 ========================== I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. Do you know what might be happening? Thanks! Cheers, Andy 2012/11/29 Simon Rit > Great! I had no clue what the problem was.... Let us know if when we can > help you with anything else, > Simon > On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >> Hi Simon, >> >> The problem seems to disappear when I updated the whole directory to the >> newest version of RTK. >> >> Cheers, >> Andy >> >> >> 2012/11/29 Andy Shieh >> >>> Hi Simon, >>> >>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>> working (the CUDA examples run properly). And I made sure that the CUDA and >>> CUDA SDK directories are correctly specified in the configuration when >>> generating the build files. However, I keep getting these linking errors >>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>> what might be going on? Thanks. >>> >>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>> >>> ============================================= >>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 2 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkinlinefdk >>> Error 6 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >>> rtkinlinefdk >>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 8 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkfdk >>> Error 12 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>> ============================================= >>> >>> Cheers, >>> Andy >>> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at openrtk.org >> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 05:08:15 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 11:08:15 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi, It's seems to be an allocation problem. How big are your projection images? You can always change the parameter m_ProjectionSubsetSize to 1 with http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 to lower the amount of projection images in the GPU memory. Simon On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > Hi Simon, > > I do encounter another problem though. > So everything compiled file and rtkfdk works fine with cpu. > However, when I change the hardware argument to cuda, I get the following > runtime error when rtkfdk is "Reconstructing and Writing": > > ======================== > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000B3EC88) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 85 > Description: itk::ERROR: CUFFT ERROR #2 > ========================== > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. > Do you know what might be happening? Thanks! > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Great! I had no clue what the problem was.... Let us know if when we can >> help you with anything else, >> Simon >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >>> >>> Hi Simon, >>> >>> The problem seems to disappear when I updated the whole directory to the >>> newest version of RTK. >>> >>> Cheers, >>> Andy >>> >>> >>> 2012/11/29 Andy Shieh >>>> >>>> Hi Simon, >>>> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>>> working (the CUDA examples run properly). And I made sure that the CUDA and >>>> CUDA SDK directories are correctly specified in the configuration when >>>> generating the build files. However, I keep getting these linking errors >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>>> what might be going on? Thanks. >>>> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>>> >>>> ============================================= >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 2 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkinlinefdk >>>> Error 6 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 8 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkfdk >>>> Error 12 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>>> ============================================= >>>> >>>> Cheers, >>>> Andy >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at openrtk.org >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > From hsieandy at gmail.com Thu Nov 29 07:53:57 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 20:53:57 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, Thanks for the suggestion. I tried, but it gave another error message. When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following runtime error: =============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A5E8D8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 102 Description: itk::ERROR: CUDA ERROR: invalid configuration argument ================ When I set it to the default value of 4, I get the CUFFT error in the previous maile. When I set it to 5, 6, and beyond, I get the following runtime error: ============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A2ECB8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 69 Description: itk::ERROR: CUDA ERROR: out of memory ============== Cheers, Andy 2012/11/29 Simon Rit > Hi, > It's seems to be an allocation problem. How big are your projection images? > You can always change the parameter m_ProjectionSubsetSize to 1 with > > http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 > to lower the amount of projection images in the GPU memory. > Simon > > On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > > Hi Simon, > > > > I do encounter another problem though. > > So everything compiled file and rtkfdk works fine with cpu. > > However, when I change the hardware argument to cuda, I get the following > > runtime error when rtkfdk is "Reconstructing and Writing": > > > > ======================== > > ExceptionObject caught with writer->Update() > > > > itk::ExceptionObject (0000000000B3EC88) > > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > > Line: 85 > > Description: itk::ERROR: CUFFT ERROR #2 > > ========================== > > > > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't > help. > > Do you know what might be happening? Thanks! > > > > Cheers, > > Andy > > > > > > 2012/11/29 Simon Rit > >> > >> Great! I had no clue what the problem was.... Let us know if when we can > >> help you with anything else, > >> Simon > >> > >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >>> > >>> Hi Simon, > >>> > >>> The problem seems to disappear when I updated the whole directory to > the > >>> newest version of RTK. > >>> > >>> Cheers, > >>> Andy > >>> > >>> > >>> 2012/11/29 Andy Shieh > >>>> > >>>> Hi Simon, > >>>> > >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA > >>>> production release 5.0 and 4.2. I doubled checked that CUDA is > actually > >>>> working (the CUDA examples run properly). And I made sure that the > CUDA and > >>>> CUDA SDK directories are correctly specified in the configuration when > >>>> generating the build files. However, I keep getting these linking > errors > >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any > idea > >>>> what might be going on? Thanks. > >>>> > >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > >>>> > >>>> ============================================= > >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 2 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 6 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe > rtkinlinefdk > >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 8 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkfdk > >>>> Error 12 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > >>>> ============================================= > >>>> > >>>> Cheers, > >>>> Andy > >>> > >>> > >>> > >>> _______________________________________________ > >>> Rtk-users mailing list > >>> Rtk-users at openrtk.org > >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > >>> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 13:33:56 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 19:33:56 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Andy, It seems that you have very little GPU memory. Do you know what graphics card you have? If I were you, I would start with a smaller volume with the --dimension option if you use my command line tools (modify as well the spacing at first, e.g., --spacing 8 --dimension 32). You can also use the --divisions option to split the volume in pieces but you then redo the filtering of all projection images. BTW, would you have two graphics card, there is nohing to select one over the other. Maybe this is what happens to you? You can then modify "GetListOfCudaDevices" and add some parameters to select the graphics card based on the memory. Let me know if I can help more, Simon On Thu, Nov 29, 2012 at 1:53 PM, Andy Shieh wrote: > Hi Simon, > > Thanks for the suggestion. I tried, but it gave another error message. > > When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following > runtime error: > =============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A5E8D8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 102 > Description: itk::ERROR: CUDA ERROR: invalid configuration argument > ================ > > > When I set it to the default value of 4, I get the CUFFT error in the > previous maile. > > > When I set it to 5, 6, and beyond, I get the following runtime error: > ============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A2ECB8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 69 > Description: itk::ERROR: CUDA ERROR: out of memory > ============== > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Hi, >> It's seems to be an allocation problem. How big are your projection >> images? >> You can always change the parameter m_ProjectionSubsetSize to 1 with >> >> http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 >> to lower the amount of projection images in the GPU memory. >> Simon >> >> On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I do encounter another problem though. >> > So everything compiled file and rtkfdk works fine with cpu. >> > However, when I change the hardware argument to cuda, I get the >> > following >> > runtime error when rtkfdk is "Reconstructing and Writing": >> > >> > ======================== >> > ExceptionObject caught with writer->Update() >> > >> > itk::ExceptionObject (0000000000B3EC88) >> > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" >> > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu >> > Line: 85 >> > Description: itk::ERROR: CUFFT ERROR #2 >> > ========================== >> > >> > >> > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't >> > help. >> > Do you know what might be happening? Thanks! >> > >> > Cheers, >> > Andy >> > >> > >> > 2012/11/29 Simon Rit >> >> >> >> Great! I had no clue what the problem was.... Let us know if when we >> >> can >> >> help you with anything else, >> >> Simon >> >> >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >> >>> >> >>> Hi Simon, >> >>> >> >>> The problem seems to disappear when I updated the whole directory to >> >>> the >> >>> newest version of RTK. >> >>> >> >>> Cheers, >> >>> Andy >> >>> >> >>> >> >>> 2012/11/29 Andy Shieh >> >>>> >> >>>> Hi Simon, >> >>>> >> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> >>>> production release 5.0 and 4.2. I doubled checked that CUDA is >> >>>> actually >> >>>> working (the CUDA examples run properly). And I made sure that the >> >>>> CUDA and >> >>>> CUDA SDK directories are correctly specified in the configuration >> >>>> when >> >>>> generating the build files. However, I keep getting these linking >> >>>> errors >> >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any >> >>>> idea >> >>>> what might be going on? Thanks. >> >>>> >> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >>>> >> >>>> ============================================= >> >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 2 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 6 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >> >>>> rtkinlinefdk >> >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 8 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 12 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> >>>> ============================================= >> >>>> >> >>>> Cheers, >> >>>> Andy >> >>> >> >>> >> >>> >> >>> _______________________________________________ >> >>> Rtk-users mailing list >> >>> Rtk-users at openrtk.org >> >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> >> > > > From hsieandy at gmail.com Thu Nov 8 11:58:35 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 9 Nov 2012 00:58:35 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Thank you. At the moment I'm just doing something similar to what you did for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and minus the log of intensity plus one (I assume the plus one is to avoid taking the log of zero?). Another few question: 1. Are you doing any normalization after reconstruction or forward projection? Are the negative values in the reconstructed images simply a result of the ramp filtering? 2. If I want to compare a reprojection from an image reconstructed using RTK with the original projection, how should I make sure the normalization is correct? i.e. should I plus/minus or multiply the reprojected attenuation before I use exponential and make it back to intensity values? 3. The rtkforward projections doesn't seem to work correctly when I'm projecting using a geometry file containing several Projection (Angle). The output mha file seems to "repeat" after a couple of projections instead of showing all projections. I'm testing this on a Varian Half Fan geometry - it works fine if I break the geometry file down into one each for each projection angle and do the forward projection separately. I can send you a reprojection mha file if my description is unclear to you. Thanks Simon!! Cheers, Andy. 2012/10/24 Simon Rit > Hi Andy, > Yes you're right, I have actually noticed recently that but I have not > worked a lot on Varian images because we don't have a Varian CBCT in > Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that > I used to roughly check the geometry. As far as I can remember, when I > wrote this piece of code, I tried to use the same code as Plastimatch > but I could well have done it wrongly. I'm actually waiting for a new > complete Catphan acquisition from Greg to correct for this but if you > already have a patch to suggest or a set of images to send, feel free > to do it. > Thanks, > Simon > > On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: > > Hi Simon, > > > > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the > > attenuation is calculated from the projection image simply via a negative > > transformation (1-Intensity/HND_MaxIntensity). > > Is it usually the way this is done, and is there any reason for doing > this? > > I would have thought attenuation should be calculated from intensity via > > logarithm (since I=I_0 exp(-mu x)). > > Thanks!! > > > > Cheers, > > Andy > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at openrtk.org > > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Nov 9 03:03:04 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 9 Nov 2012 09:03:04 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: > Hi Simon, > > Thank you. At the moment I'm just doing something similar to what you did > for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and > minus the log of intensity plus one (I assume the plus one is to avoid > taking the log of zero?). Does it improve the results? You are welcome to share it if you feel that this is of interest for other people. > > Another few question: > 1. Are you doing any normalization after reconstruction or forward > projection? No. Assuming you have line integral of the attenuation as input of the reconstruction algorithm, you get the attenuation. Are the negative values in the reconstructed images simply a > result of the ramp filtering? Probably. You can use rtkprojections to look at what is the input of the reconstruction algorithm. > 2. If I want to compare a reprojection from an image reconstructed using RTK > with the original projection, how should I make sure the normalization is > correct? i.e. should I plus/minus or multiply the reprojected attenuation > before I use exponential and make it back to intensity values? You basically have to do the inverse formula to what you have done. An easy way of looking at what is going on with forward projections is to look at this example: http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > 3. The rtkforward projections doesn't seem to work correctly when I'm > projecting using a geometry file containing several Projection (Angle). The > output mha file seems to "repeat" after a couple of projections instead of > showing all projections. I'm testing this on a Varian Half Fan geometry - it > works fine if I break the geometry file down into one each for each > projection angle and do the forward projection separately. I can send you a > reprojection mha file if my description is unclear to you. I works for me. Would you be able to fill in a bug report (http://bug.openrtk.org/) with an example? You can generate volumes and projections with rtkdrawgeometricphantom and rtkprojectgeometricphantom. Simon > > Thanks Simon!! > > Cheers, > Andy. > > > > 2012/10/24 Simon Rit >> >> Hi Andy, >> Yes you're right, I have actually noticed recently that but I have not >> worked a lot on Varian images because we don't have a Varian CBCT in >> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> I used to roughly check the geometry. As far as I can remember, when I >> wrote this piece of code, I tried to use the same code as Plastimatch >> but I could well have done it wrongly. I'm actually waiting for a new >> complete Catphan acquisition from Greg to correct for this but if you >> already have a patch to suggest or a set of images to send, feel free >> to do it. >> Thanks, >> Simon >> >> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >> > attenuation is calculated from the projection image simply via a >> > negative >> > transformation (1-Intensity/HND_MaxIntensity). >> > Is it usually the way this is done, and is there any reason for doing >> > this? >> > I would have thought attenuation should be calculated from intensity via >> > logarithm (since I=I_0 exp(-mu x)). >> > Thanks!! >> > >> > Cheers, >> > Andy >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at openrtk.org >> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> > > > From simon.rit at creatis.insa-lyon.fr Mon Nov 19 05:37:18 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 19 Nov 2012 11:37:18 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, I have pushed a fix for the Varian raw to attenuation conversion. Let me know if it meets what you've done. I will let you know if there is any other improvement of the conversion in the future. Simon On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit wrote: > Hi Andy, > > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> Hi Simon, >> >> Thank you. At the moment I'm just doing something similar to what you did >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and >> minus the log of intensity plus one (I assume the plus one is to avoid >> taking the log of zero?). > Does it improve the results? You are welcome to share it if you feel > that this is of interest for other people. > >> >> Another few question: >> 1. Are you doing any normalization after reconstruction or forward >> projection? > No. Assuming you have line integral of the attenuation as input of the > reconstruction algorithm, you get the attenuation. > > Are the negative values in the reconstructed images simply a >> result of the ramp filtering? > Probably. You can use rtkprojections to look at what is the input of > the reconstruction algorithm. > >> 2. If I want to compare a reprojection from an image reconstructed using RTK >> with the original projection, how should I make sure the normalization is >> correct? i.e. should I plus/minus or multiply the reprojected attenuation >> before I use exponential and make it back to intensity values? > You basically have to do the inverse formula to what you have done. An > easy way of looking at what is going on with forward projections is to > look at this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> projecting using a geometry file containing several Projection (Angle). The >> output mha file seems to "repeat" after a couple of projections instead of >> showing all projections. I'm testing this on a Varian Half Fan geometry - it >> works fine if I break the geometry file down into one each for each >> projection angle and do the forward projection separately. I can send you a >> reprojection mha file if my description is unclear to you. > I works for me. Would you be able to fill in a bug report > (http://bug.openrtk.org/) with an example? You can generate volumes > and projections with rtkdrawgeometricphantom and > rtkprojectgeometricphantom. > Simon > >> >> Thanks Simon!! >> >> Cheers, >> Andy. >> >> >> >> 2012/10/24 Simon Rit >>> >>> Hi Andy, >>> Yes you're right, I have actually noticed recently that but I have not >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >>> I used to roughly check the geometry. As far as I can remember, when I >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> but I could well have done it wrongly. I'm actually waiting for a new >>> complete Catphan acquisition from Greg to correct for this but if you >>> already have a patch to suggest or a set of images to send, feel free >>> to do it. >>> Thanks, >>> Simon >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >>> > Hi Simon, >>> > >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >>> > attenuation is calculated from the projection image simply via a >>> > negative >>> > transformation (1-Intensity/HND_MaxIntensity). >>> > Is it usually the way this is done, and is there any reason for doing >>> > this? >>> > I would have thought attenuation should be calculated from intensity via >>> > logarithm (since I=I_0 exp(-mu x)). >>> > Thanks!! >>> > >>> > Cheers, >>> > Andy >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at openrtk.org >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > >> >> From hsieandy at gmail.com Fri Nov 23 06:35:22 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 23 Nov 2012 19:35:22 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Just to let you know that the code works well!! Thanks! By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know him?), and he mentioned that he's been putting quite some effort on making RTK compatible with Varian format (HNC mainly). He mentioned that for the Varian format, we usually read in the "Norm Chamber value" (It's usually around 300) from each HNC header, and calculate the CT number by log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is around 10000. I'm not too sure about the details, but I believe he will discuss it with you soon when he has time! Cheers, Andy > > > 2012/11/19 Simon Rit > >> Hi Andy, >> I have pushed a fix for the Varian raw to attenuation conversion. Let >> me know if it meets what you've done. I will let you know if there is >> any other improvement of the conversion in the future. >> Simon >> >> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >> wrote: >> > Hi Andy, >> > >> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> >> Hi Simon, >> >> >> >> Thank you. At the moment I'm just doing something similar to what you >> did >> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >> and >> >> minus the log of intensity plus one (I assume the plus one is to avoid >> >> taking the log of zero?). >> > Does it improve the results? You are welcome to share it if you feel >> > that this is of interest for other people. >> > >> >> >> >> Another few question: >> >> 1. Are you doing any normalization after reconstruction or forward >> >> projection? >> > No. Assuming you have line integral of the attenuation as input of the >> > reconstruction algorithm, you get the attenuation. >> > >> > Are the negative values in the reconstructed images simply a >> >> result of the ramp filtering? >> > Probably. You can use rtkprojections to look at what is the input of >> > the reconstruction algorithm. >> > >> >> 2. If I want to compare a reprojection from an image reconstructed >> using RTK >> >> with the original projection, how should I make sure the normalization >> is >> >> correct? i.e. should I plus/minus or multiply the reprojected >> attenuation >> >> before I use exponential and make it back to intensity values? >> > You basically have to do the inverse formula to what you have done. An >> > easy way of looking at what is going on with forward projections is to >> > look at this example: >> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >> > >> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> >> projecting using a geometry file containing several Projection >> (Angle). The >> >> output mha file seems to "repeat" after a couple of projections >> instead of >> >> showing all projections. I'm testing this on a Varian Half Fan >> geometry - it >> >> works fine if I break the geometry file down into one each for each >> >> projection angle and do the forward projection separately. I can send >> you a >> >> reprojection mha file if my description is unclear to you. >> > I works for me. Would you be able to fill in a bug report >> > (http://bug.openrtk.org/) with an example? You can generate volumes >> > and projections with rtkdrawgeometricphantom and >> > rtkprojectgeometricphantom. >> > Simon >> > >> >> >> >> Thanks Simon!! >> >> >> >> Cheers, >> >> Andy. >> >> >> >> >> >> >> >> 2012/10/24 Simon Rit >> >>> >> >>> Hi Andy, >> >>> Yes you're right, I have actually noticed recently that but I have not >> >>> worked a lot on Varian images because we don't have a Varian CBCT in >> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> >>> I used to roughly check the geometry. As far as I can remember, when I >> >>> wrote this piece of code, I tried to use the same code as Plastimatch >> >>> but I could well have done it wrongly. I'm actually waiting for a new >> >>> complete Catphan acquisition from Greg to correct for this but if you >> >>> already have a patch to suggest or a set of images to send, feel free >> >>> to do it. >> >>> Thanks, >> >>> Simon >> >>> >> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >> wrote: >> >>> > Hi Simon, >> >>> > >> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >> the >> >>> > attenuation is calculated from the projection image simply via a >> >>> > negative >> >>> > transformation (1-Intensity/HND_MaxIntensity). >> >>> > Is it usually the way this is done, and is there any reason for >> doing >> >>> > this? >> >>> > I would have thought attenuation should be calculated from >> intensity via >> >>> > logarithm (since I=I_0 exp(-mu x)). >> >>> > Thanks!! >> >>> > >> >>> > Cheers, >> >>> > Andy >> >>> > >> >>> > _______________________________________________ >> >>> > Rtk-users mailing list >> >>> > Rtk-users at openrtk.org >> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> > >> >> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Mon Nov 26 08:45:42 2012 From: gdhugo at vcu.edu (Geoff Hugo) Date: Mon, 26 Nov 2012 08:45:42 -0500 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: <50B37286.7020809@vcu.edu> An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 28 03:51:12 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Nov 2012 09:51:12 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: <50B37286.7020809@vcu.edu> References: <50B37286.7020809@vcu.edu> Message-ID: Hi, Thanks for the feeback. I don't know any users that actively use Varian projection images. I will put a Catphan dataset online soon that has been provided by Greg Sharp and I'll try to adjust reconstructed values to linear attenuation. A filter to convert from linear to attenuation to HU is rather easy to add if one feels it's required. Simon On Mon, Nov 26, 2012 at 2:45 PM, Geoff Hugo wrote: > Hi Simon and Andy, > > The ScaleFactor we use at VCU is a rough conversion from linear attenuation > coefficient (the output of RTK) to something roughly around CT number > (Hounsfield Units). This is not a proper conversion, just a placeholder for > now. I'm not sure how useful the HNC-compatible version we have at VCU will > be to the wider community, as HNC is not a generally available format and > HND is the more common one. Are there any other users of RTK that use > Varian HNC format projections? > > Geoff > > On 11/23/12 6:35 AM, Andy Shieh wrote: > > Hi Simon, > > Just to let you know that the code works well!! Thanks! > > By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know > him?), and he mentioned that he's been putting quite some effort on making > RTK compatible with Varian format (HNC mainly). He mentioned that for the > Varian format, we usually read in the "Norm Chamber value" (It's usually > around 300) from each HNC header, and calculate the CT number by > log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is > around 10000. I'm not too sure about the details, but I believe he will > discuss it with you soon when he has time! > > Cheers, > Andy > >> >> >> >> 2012/11/19 Simon Rit >>> >>> Hi Andy, >>> I have pushed a fix for the Varian raw to attenuation conversion. Let >>> me know if it meets what you've done. I will let you know if there is >>> any other improvement of the conversion in the future. >>> Simon >>> >>> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >>> wrote: >>> > Hi Andy, >>> > >>> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >>> >> Hi Simon, >>> >> >>> >> Thank you. At the moment I'm just doing something similar to what you >>> >> did >>> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >>> >> and >>> >> minus the log of intensity plus one (I assume the plus one is to avoid >>> >> taking the log of zero?). >>> > Does it improve the results? You are welcome to share it if you feel >>> > that this is of interest for other people. >>> > >>> >> >>> >> Another few question: >>> >> 1. Are you doing any normalization after reconstruction or forward >>> >> projection? >>> > No. Assuming you have line integral of the attenuation as input of the >>> > reconstruction algorithm, you get the attenuation. >>> > >>> > Are the negative values in the reconstructed images simply a >>> >> result of the ramp filtering? >>> > Probably. You can use rtkprojections to look at what is the input of >>> > the reconstruction algorithm. >>> > >>> >> 2. If I want to compare a reprojection from an image reconstructed >>> >> using RTK >>> >> with the original projection, how should I make sure the normalization >>> >> is >>> >> correct? i.e. should I plus/minus or multiply the reprojected >>> >> attenuation >>> >> before I use exponential and make it back to intensity values? >>> > You basically have to do the inverse formula to what you have done. An >>> > easy way of looking at what is going on with forward projections is to >>> > look at this example: >>> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >>> > >>> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >>> >> projecting using a geometry file containing several Projection >>> >> (Angle). The >>> >> output mha file seems to "repeat" after a couple of projections >>> >> instead of >>> >> showing all projections. I'm testing this on a Varian Half Fan >>> >> geometry - it >>> >> works fine if I break the geometry file down into one each for each >>> >> projection angle and do the forward projection separately. I can send >>> >> you a >>> >> reprojection mha file if my description is unclear to you. >>> > I works for me. Would you be able to fill in a bug report >>> > (http://bug.openrtk.org/) with an example? You can generate volumes >>> > and projections with rtkdrawgeometricphantom and >>> > rtkprojectgeometricphantom. >>> > Simon >>> > >>> >> >>> >> Thanks Simon!! >>> >> >>> >> Cheers, >>> >> Andy. >>> >> >>> >> >>> >> >>> >> 2012/10/24 Simon Rit >>> >>> >>> >>> Hi Andy, >>> >>> Yes you're right, I have actually noticed recently that but I have >>> >>> not >>> >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan >>> >>> that >>> >>> I used to roughly check the geometry. As far as I can remember, when >>> >>> I >>> >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> >>> but I could well have done it wrongly. I'm actually waiting for a new >>> >>> complete Catphan acquisition from Greg to correct for this but if you >>> >>> already have a patch to suggest or a set of images to send, feel free >>> >>> to do it. >>> >>> Thanks, >>> >>> Simon >>> >>> >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >>> >>> wrote: >>> >>> > Hi Simon, >>> >>> > >>> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >>> >>> > the >>> >>> > attenuation is calculated from the projection image simply via a >>> >>> > negative >>> >>> > transformation (1-Intensity/HND_MaxIntensity). >>> >>> > Is it usually the way this is done, and is there any reason for >>> >>> > doing >>> >>> > this? >>> >>> > I would have thought attenuation should be calculated from >>> >>> > intensity via >>> >>> > logarithm (since I=I_0 exp(-mu x)). >>> >>> > Thanks!! >>> >>> > >>> >>> > Cheers, >>> >>> > Andy >>> >>> > >>> >>> > _______________________________________________ >>> >>> > Rtk-users mailing list >>> >>> > Rtk-users at openrtk.org >>> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> >>> > >>> >> >>> >> >> >> > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -- > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Assistant Professor > Dept. of Radiation Oncology > Virginia Commonwealth University > gdhugo at vcu.edu From hsieandy at gmail.com Thu Nov 29 01:03:44 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 14:03:44 +0800 Subject: [Rtk-users] Compiling with CUDA Message-ID: Hi Simon, Lately I've been trying to build RTK with CUDA. I tried both the CUDA production release 5.0 and 4.2. I doubled checked that CUDA is actually working (the CUDA examples run properly). And I made sure that the CUDA and CUDA SDK directories are correctly specified in the configuration when generating the build files. However, I keep getting these linking errors when I tried to compile RTK using Visual Studio 2010. Do you have any idea what might be going on? Thanks. I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. ============================================= Error 1 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 2 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 3 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 4 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 5 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkinlinefdk Error 6 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk Error 7 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 8 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 9 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 10 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 11 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkfdk Error 12 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk ============================================= Cheers, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 02:11:32 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 15:11:32 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, The problem seems to disappear when I updated the whole directory to the newest version of RTK. Cheers, Andy 2012/11/29 Andy Shieh > Hi Simon, > > Lately I've been trying to build RTK with CUDA. I tried both the CUDA > production release 5.0 and 4.2. I doubled checked that CUDA is actually > working (the CUDA examples run properly). And I made sure that the CUDA and > CUDA SDK directories are correctly specified in the configuration when > generating the build files. However, I keep getting these linking errors > when I tried to compile RTK using Visual Studio 2010. Do you have any idea > what might be going on? Thanks. > > I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > > ============================================= > Error 1 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 2 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 3 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 4 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 5 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkinlinefdk > Error 6 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk > Error 7 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 8 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 9 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 10 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 11 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkfdk > Error 12 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > ============================================= > > Cheers, > Andy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 02:15:48 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 08:15:48 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Great! I had no clue what the problem was.... Let us know if when we can help you with anything else, Simon On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > Hi Simon, > > The problem seems to disappear when I updated the whole directory to the > newest version of RTK. > > Cheers, > Andy > > > 2012/11/29 Andy Shieh > >> Hi Simon, >> >> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> production release 5.0 and 4.2. I doubled checked that CUDA is actually >> working (the CUDA examples run properly). And I made sure that the CUDA and >> CUDA SDK directories are correctly specified in the configuration when >> generating the build files. However, I keep getting these linking errors >> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >> what might be going on? Thanks. >> >> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >> ============================================= >> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 2 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkinlinefdk >> Error 6 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 8 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkfdk >> Error 12 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> ============================================= >> >> Cheers, >> Andy >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 03:57:51 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 16:57:51 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, I do encounter another problem though. So everything compiled file and rtkfdk works fine with cpu. However, when I change the hardware argument to cuda, I get the following runtime error when rtkfdk is "Reconstructing and Writing": ======================== ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000B3EC88) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 85 Description: itk::ERROR: CUFFT ERROR #2 ========================== I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. Do you know what might be happening? Thanks! Cheers, Andy 2012/11/29 Simon Rit > Great! I had no clue what the problem was.... Let us know if when we can > help you with anything else, > Simon > On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >> Hi Simon, >> >> The problem seems to disappear when I updated the whole directory to the >> newest version of RTK. >> >> Cheers, >> Andy >> >> >> 2012/11/29 Andy Shieh >> >>> Hi Simon, >>> >>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>> working (the CUDA examples run properly). And I made sure that the CUDA and >>> CUDA SDK directories are correctly specified in the configuration when >>> generating the build files. However, I keep getting these linking errors >>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>> what might be going on? Thanks. >>> >>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>> >>> ============================================= >>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 2 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkinlinefdk >>> Error 6 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >>> rtkinlinefdk >>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 8 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkfdk >>> Error 12 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>> ============================================= >>> >>> Cheers, >>> Andy >>> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at openrtk.org >> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 05:08:15 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 11:08:15 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi, It's seems to be an allocation problem. How big are your projection images? You can always change the parameter m_ProjectionSubsetSize to 1 with http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 to lower the amount of projection images in the GPU memory. Simon On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > Hi Simon, > > I do encounter another problem though. > So everything compiled file and rtkfdk works fine with cpu. > However, when I change the hardware argument to cuda, I get the following > runtime error when rtkfdk is "Reconstructing and Writing": > > ======================== > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000B3EC88) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 85 > Description: itk::ERROR: CUFFT ERROR #2 > ========================== > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. > Do you know what might be happening? Thanks! > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Great! I had no clue what the problem was.... Let us know if when we can >> help you with anything else, >> Simon >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >>> >>> Hi Simon, >>> >>> The problem seems to disappear when I updated the whole directory to the >>> newest version of RTK. >>> >>> Cheers, >>> Andy >>> >>> >>> 2012/11/29 Andy Shieh >>>> >>>> Hi Simon, >>>> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>>> working (the CUDA examples run properly). And I made sure that the CUDA and >>>> CUDA SDK directories are correctly specified in the configuration when >>>> generating the build files. However, I keep getting these linking errors >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>>> what might be going on? Thanks. >>>> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>>> >>>> ============================================= >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 2 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkinlinefdk >>>> Error 6 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 8 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkfdk >>>> Error 12 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>>> ============================================= >>>> >>>> Cheers, >>>> Andy >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at openrtk.org >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > From hsieandy at gmail.com Thu Nov 29 07:53:57 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 20:53:57 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, Thanks for the suggestion. I tried, but it gave another error message. When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following runtime error: =============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A5E8D8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 102 Description: itk::ERROR: CUDA ERROR: invalid configuration argument ================ When I set it to the default value of 4, I get the CUFFT error in the previous maile. When I set it to 5, 6, and beyond, I get the following runtime error: ============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A2ECB8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 69 Description: itk::ERROR: CUDA ERROR: out of memory ============== Cheers, Andy 2012/11/29 Simon Rit > Hi, > It's seems to be an allocation problem. How big are your projection images? > You can always change the parameter m_ProjectionSubsetSize to 1 with > > http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 > to lower the amount of projection images in the GPU memory. > Simon > > On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > > Hi Simon, > > > > I do encounter another problem though. > > So everything compiled file and rtkfdk works fine with cpu. > > However, when I change the hardware argument to cuda, I get the following > > runtime error when rtkfdk is "Reconstructing and Writing": > > > > ======================== > > ExceptionObject caught with writer->Update() > > > > itk::ExceptionObject (0000000000B3EC88) > > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > > Line: 85 > > Description: itk::ERROR: CUFFT ERROR #2 > > ========================== > > > > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't > help. > > Do you know what might be happening? Thanks! > > > > Cheers, > > Andy > > > > > > 2012/11/29 Simon Rit > >> > >> Great! I had no clue what the problem was.... Let us know if when we can > >> help you with anything else, > >> Simon > >> > >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >>> > >>> Hi Simon, > >>> > >>> The problem seems to disappear when I updated the whole directory to > the > >>> newest version of RTK. > >>> > >>> Cheers, > >>> Andy > >>> > >>> > >>> 2012/11/29 Andy Shieh > >>>> > >>>> Hi Simon, > >>>> > >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA > >>>> production release 5.0 and 4.2. I doubled checked that CUDA is > actually > >>>> working (the CUDA examples run properly). And I made sure that the > CUDA and > >>>> CUDA SDK directories are correctly specified in the configuration when > >>>> generating the build files. However, I keep getting these linking > errors > >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any > idea > >>>> what might be going on? Thanks. > >>>> > >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > >>>> > >>>> ============================================= > >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 2 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 6 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe > rtkinlinefdk > >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 8 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkfdk > >>>> Error 12 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > >>>> ============================================= > >>>> > >>>> Cheers, > >>>> Andy > >>> > >>> > >>> > >>> _______________________________________________ > >>> Rtk-users mailing list > >>> Rtk-users at openrtk.org > >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > >>> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 13:33:56 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 19:33:56 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Andy, It seems that you have very little GPU memory. Do you know what graphics card you have? If I were you, I would start with a smaller volume with the --dimension option if you use my command line tools (modify as well the spacing at first, e.g., --spacing 8 --dimension 32). You can also use the --divisions option to split the volume in pieces but you then redo the filtering of all projection images. BTW, would you have two graphics card, there is nohing to select one over the other. Maybe this is what happens to you? You can then modify "GetListOfCudaDevices" and add some parameters to select the graphics card based on the memory. Let me know if I can help more, Simon On Thu, Nov 29, 2012 at 1:53 PM, Andy Shieh wrote: > Hi Simon, > > Thanks for the suggestion. I tried, but it gave another error message. > > When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following > runtime error: > =============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A5E8D8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 102 > Description: itk::ERROR: CUDA ERROR: invalid configuration argument > ================ > > > When I set it to the default value of 4, I get the CUFFT error in the > previous maile. > > > When I set it to 5, 6, and beyond, I get the following runtime error: > ============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A2ECB8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 69 > Description: itk::ERROR: CUDA ERROR: out of memory > ============== > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Hi, >> It's seems to be an allocation problem. How big are your projection >> images? >> You can always change the parameter m_ProjectionSubsetSize to 1 with >> >> http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 >> to lower the amount of projection images in the GPU memory. >> Simon >> >> On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I do encounter another problem though. >> > So everything compiled file and rtkfdk works fine with cpu. >> > However, when I change the hardware argument to cuda, I get the >> > following >> > runtime error when rtkfdk is "Reconstructing and Writing": >> > >> > ======================== >> > ExceptionObject caught with writer->Update() >> > >> > itk::ExceptionObject (0000000000B3EC88) >> > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" >> > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu >> > Line: 85 >> > Description: itk::ERROR: CUFFT ERROR #2 >> > ========================== >> > >> > >> > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't >> > help. >> > Do you know what might be happening? Thanks! >> > >> > Cheers, >> > Andy >> > >> > >> > 2012/11/29 Simon Rit >> >> >> >> Great! I had no clue what the problem was.... Let us know if when we >> >> can >> >> help you with anything else, >> >> Simon >> >> >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >> >>> >> >>> Hi Simon, >> >>> >> >>> The problem seems to disappear when I updated the whole directory to >> >>> the >> >>> newest version of RTK. >> >>> >> >>> Cheers, >> >>> Andy >> >>> >> >>> >> >>> 2012/11/29 Andy Shieh >> >>>> >> >>>> Hi Simon, >> >>>> >> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> >>>> production release 5.0 and 4.2. I doubled checked that CUDA is >> >>>> actually >> >>>> working (the CUDA examples run properly). And I made sure that the >> >>>> CUDA and >> >>>> CUDA SDK directories are correctly specified in the configuration >> >>>> when >> >>>> generating the build files. However, I keep getting these linking >> >>>> errors >> >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any >> >>>> idea >> >>>> what might be going on? Thanks. >> >>>> >> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >>>> >> >>>> ============================================= >> >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 2 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 6 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >> >>>> rtkinlinefdk >> >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 8 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 12 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> >>>> ============================================= >> >>>> >> >>>> Cheers, >> >>>> Andy >> >>> >> >>> >> >>> >> >>> _______________________________________________ >> >>> Rtk-users mailing list >> >>> Rtk-users at openrtk.org >> >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> >> > > > From hsieandy at gmail.com Thu Nov 8 11:58:35 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 9 Nov 2012 00:58:35 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Thank you. At the moment I'm just doing something similar to what you did for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and minus the log of intensity plus one (I assume the plus one is to avoid taking the log of zero?). Another few question: 1. Are you doing any normalization after reconstruction or forward projection? Are the negative values in the reconstructed images simply a result of the ramp filtering? 2. If I want to compare a reprojection from an image reconstructed using RTK with the original projection, how should I make sure the normalization is correct? i.e. should I plus/minus or multiply the reprojected attenuation before I use exponential and make it back to intensity values? 3. The rtkforward projections doesn't seem to work correctly when I'm projecting using a geometry file containing several Projection (Angle). The output mha file seems to "repeat" after a couple of projections instead of showing all projections. I'm testing this on a Varian Half Fan geometry - it works fine if I break the geometry file down into one each for each projection angle and do the forward projection separately. I can send you a reprojection mha file if my description is unclear to you. Thanks Simon!! Cheers, Andy. 2012/10/24 Simon Rit > Hi Andy, > Yes you're right, I have actually noticed recently that but I have not > worked a lot on Varian images because we don't have a Varian CBCT in > Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that > I used to roughly check the geometry. As far as I can remember, when I > wrote this piece of code, I tried to use the same code as Plastimatch > but I could well have done it wrongly. I'm actually waiting for a new > complete Catphan acquisition from Greg to correct for this but if you > already have a patch to suggest or a set of images to send, feel free > to do it. > Thanks, > Simon > > On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: > > Hi Simon, > > > > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the > > attenuation is calculated from the projection image simply via a negative > > transformation (1-Intensity/HND_MaxIntensity). > > Is it usually the way this is done, and is there any reason for doing > this? > > I would have thought attenuation should be calculated from intensity via > > logarithm (since I=I_0 exp(-mu x)). > > Thanks!! > > > > Cheers, > > Andy > > > > _______________________________________________ > > Rtk-users mailing list > > Rtk-users at openrtk.org > > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Fri Nov 9 03:03:04 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Fri, 9 Nov 2012 09:03:04 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: > Hi Simon, > > Thank you. At the moment I'm just doing something similar to what you did > for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and > minus the log of intensity plus one (I assume the plus one is to avoid > taking the log of zero?). Does it improve the results? You are welcome to share it if you feel that this is of interest for other people. > > Another few question: > 1. Are you doing any normalization after reconstruction or forward > projection? No. Assuming you have line integral of the attenuation as input of the reconstruction algorithm, you get the attenuation. Are the negative values in the reconstructed images simply a > result of the ramp filtering? Probably. You can use rtkprojections to look at what is the input of the reconstruction algorithm. > 2. If I want to compare a reprojection from an image reconstructed using RTK > with the original projection, how should I make sure the normalization is > correct? i.e. should I plus/minus or multiply the reprojected attenuation > before I use exponential and make it back to intensity values? You basically have to do the inverse formula to what you have done. An easy way of looking at what is going on with forward projections is to look at this example: http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > 3. The rtkforward projections doesn't seem to work correctly when I'm > projecting using a geometry file containing several Projection (Angle). The > output mha file seems to "repeat" after a couple of projections instead of > showing all projections. I'm testing this on a Varian Half Fan geometry - it > works fine if I break the geometry file down into one each for each > projection angle and do the forward projection separately. I can send you a > reprojection mha file if my description is unclear to you. I works for me. Would you be able to fill in a bug report (http://bug.openrtk.org/) with an example? You can generate volumes and projections with rtkdrawgeometricphantom and rtkprojectgeometricphantom. Simon > > Thanks Simon!! > > Cheers, > Andy. > > > > 2012/10/24 Simon Rit >> >> Hi Andy, >> Yes you're right, I have actually noticed recently that but I have not >> worked a lot on Varian images because we don't have a Varian CBCT in >> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> I used to roughly check the geometry. As far as I can remember, when I >> wrote this piece of code, I tried to use the same code as Plastimatch >> but I could well have done it wrongly. I'm actually waiting for a new >> complete Catphan acquisition from Greg to correct for this but if you >> already have a patch to suggest or a set of images to send, feel free >> to do it. >> Thanks, >> Simon >> >> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >> > attenuation is calculated from the projection image simply via a >> > negative >> > transformation (1-Intensity/HND_MaxIntensity). >> > Is it usually the way this is done, and is there any reason for doing >> > this? >> > I would have thought attenuation should be calculated from intensity via >> > logarithm (since I=I_0 exp(-mu x)). >> > Thanks!! >> > >> > Cheers, >> > Andy >> > >> > _______________________________________________ >> > Rtk-users mailing list >> > Rtk-users at openrtk.org >> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> > > > From simon.rit at creatis.insa-lyon.fr Mon Nov 19 05:37:18 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Mon, 19 Nov 2012 11:37:18 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Andy, I have pushed a fix for the Varian raw to attenuation conversion. Let me know if it meets what you've done. I will let you know if there is any other improvement of the conversion in the future. Simon On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit wrote: > Hi Andy, > > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> Hi Simon, >> >> Thank you. At the moment I'm just doing something similar to what you did >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) and >> minus the log of intensity plus one (I assume the plus one is to avoid >> taking the log of zero?). > Does it improve the results? You are welcome to share it if you feel > that this is of interest for other people. > >> >> Another few question: >> 1. Are you doing any normalization after reconstruction or forward >> projection? > No. Assuming you have line integral of the attenuation as input of the > reconstruction algorithm, you get the attenuation. > > Are the negative values in the reconstructed images simply a >> result of the ramp filtering? > Probably. You can use rtkprojections to look at what is the input of > the reconstruction algorithm. > >> 2. If I want to compare a reprojection from an image reconstructed using RTK >> with the original projection, how should I make sure the normalization is >> correct? i.e. should I plus/minus or multiply the reprojected attenuation >> before I use exponential and make it back to intensity values? > You basically have to do the inverse formula to what you have done. An > easy way of looking at what is going on with forward projections is to > look at this example: > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection > >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> projecting using a geometry file containing several Projection (Angle). The >> output mha file seems to "repeat" after a couple of projections instead of >> showing all projections. I'm testing this on a Varian Half Fan geometry - it >> works fine if I break the geometry file down into one each for each >> projection angle and do the forward projection separately. I can send you a >> reprojection mha file if my description is unclear to you. > I works for me. Would you be able to fill in a bug report > (http://bug.openrtk.org/) with an example? You can generate volumes > and projections with rtkdrawgeometricphantom and > rtkprojectgeometricphantom. > Simon > >> >> Thanks Simon!! >> >> Cheers, >> Andy. >> >> >> >> 2012/10/24 Simon Rit >>> >>> Hi Andy, >>> Yes you're right, I have actually noticed recently that but I have not >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >>> I used to roughly check the geometry. As far as I can remember, when I >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> but I could well have done it wrongly. I'm actually waiting for a new >>> complete Catphan acquisition from Greg to correct for this but if you >>> already have a patch to suggest or a set of images to send, feel free >>> to do it. >>> Thanks, >>> Simon >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh wrote: >>> > Hi Simon, >>> > >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that the >>> > attenuation is calculated from the projection image simply via a >>> > negative >>> > transformation (1-Intensity/HND_MaxIntensity). >>> > Is it usually the way this is done, and is there any reason for doing >>> > this? >>> > I would have thought attenuation should be calculated from intensity via >>> > logarithm (since I=I_0 exp(-mu x)). >>> > Thanks!! >>> > >>> > Cheers, >>> > Andy >>> > >>> > _______________________________________________ >>> > Rtk-users mailing list >>> > Rtk-users at openrtk.org >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > >> >> From hsieandy at gmail.com Fri Nov 23 06:35:22 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Fri, 23 Nov 2012 19:35:22 +0800 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: Hi Simon, Just to let you know that the code works well!! Thanks! By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know him?), and he mentioned that he's been putting quite some effort on making RTK compatible with Varian format (HNC mainly). He mentioned that for the Varian format, we usually read in the "Norm Chamber value" (It's usually around 300) from each HNC header, and calculate the CT number by log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is around 10000. I'm not too sure about the details, but I believe he will discuss it with you soon when he has time! Cheers, Andy > > > 2012/11/19 Simon Rit > >> Hi Andy, >> I have pushed a fix for the Varian raw to attenuation conversion. Let >> me know if it meets what you've done. I will let you know if there is >> any other improvement of the conversion in the future. >> Simon >> >> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >> wrote: >> > Hi Andy, >> > >> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >> >> Hi Simon, >> >> >> >> Thank you. At the moment I'm just doing something similar to what you >> did >> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >> and >> >> minus the log of intensity plus one (I assume the plus one is to avoid >> >> taking the log of zero?). >> > Does it improve the results? You are welcome to share it if you feel >> > that this is of interest for other people. >> > >> >> >> >> Another few question: >> >> 1. Are you doing any normalization after reconstruction or forward >> >> projection? >> > No. Assuming you have line integral of the attenuation as input of the >> > reconstruction algorithm, you get the attenuation. >> > >> > Are the negative values in the reconstructed images simply a >> >> result of the ramp filtering? >> > Probably. You can use rtkprojections to look at what is the input of >> > the reconstruction algorithm. >> > >> >> 2. If I want to compare a reprojection from an image reconstructed >> using RTK >> >> with the original projection, how should I make sure the normalization >> is >> >> correct? i.e. should I plus/minus or multiply the reprojected >> attenuation >> >> before I use exponential and make it back to intensity values? >> > You basically have to do the inverse formula to what you have done. An >> > easy way of looking at what is going on with forward projections is to >> > look at this example: >> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >> > >> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >> >> projecting using a geometry file containing several Projection >> (Angle). The >> >> output mha file seems to "repeat" after a couple of projections >> instead of >> >> showing all projections. I'm testing this on a Varian Half Fan >> geometry - it >> >> works fine if I break the geometry file down into one each for each >> >> projection angle and do the forward projection separately. I can send >> you a >> >> reprojection mha file if my description is unclear to you. >> > I works for me. Would you be able to fill in a bug report >> > (http://bug.openrtk.org/) with an example? You can generate volumes >> > and projections with rtkdrawgeometricphantom and >> > rtkprojectgeometricphantom. >> > Simon >> > >> >> >> >> Thanks Simon!! >> >> >> >> Cheers, >> >> Andy. >> >> >> >> >> >> >> >> 2012/10/24 Simon Rit >> >>> >> >>> Hi Andy, >> >>> Yes you're right, I have actually noticed recently that but I have not >> >>> worked a lot on Varian images because we don't have a Varian CBCT in >> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan that >> >>> I used to roughly check the geometry. As far as I can remember, when I >> >>> wrote this piece of code, I tried to use the same code as Plastimatch >> >>> but I could well have done it wrongly. I'm actually waiting for a new >> >>> complete Catphan acquisition from Greg to correct for this but if you >> >>> already have a patch to suggest or a set of images to send, feel free >> >>> to do it. >> >>> Thanks, >> >>> Simon >> >>> >> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >> wrote: >> >>> > Hi Simon, >> >>> > >> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >> the >> >>> > attenuation is calculated from the projection image simply via a >> >>> > negative >> >>> > transformation (1-Intensity/HND_MaxIntensity). >> >>> > Is it usually the way this is done, and is there any reason for >> doing >> >>> > this? >> >>> > I would have thought attenuation should be calculated from >> intensity via >> >>> > logarithm (since I=I_0 exp(-mu x)). >> >>> > Thanks!! >> >>> > >> >>> > Cheers, >> >>> > Andy >> >>> > >> >>> > _______________________________________________ >> >>> > Rtk-users mailing list >> >>> > Rtk-users at openrtk.org >> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> > >> >> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gdhugo at vcu.edu Mon Nov 26 08:45:42 2012 From: gdhugo at vcu.edu (Geoff Hugo) Date: Mon, 26 Nov 2012 08:45:42 -0500 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: References: Message-ID: <50B37286.7020809@vcu.edu> An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 28 03:51:12 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 28 Nov 2012 09:51:12 +0100 Subject: [Rtk-users] RTK calculating attenuation from Varian projection In-Reply-To: <50B37286.7020809@vcu.edu> References: <50B37286.7020809@vcu.edu> Message-ID: Hi, Thanks for the feeback. I don't know any users that actively use Varian projection images. I will put a Catphan dataset online soon that has been provided by Greg Sharp and I'll try to adjust reconstructed values to linear attenuation. A filter to convert from linear to attenuation to HU is rather easy to add if one feels it's required. Simon On Mon, Nov 26, 2012 at 2:45 PM, Geoff Hugo wrote: > Hi Simon and Andy, > > The ScaleFactor we use at VCU is a rough conversion from linear attenuation > coefficient (the output of RTK) to something roughly around CT number > (Hounsfield Units). This is not a proper conversion, just a placeholder for > now. I'm not sure how useful the HNC-compatible version we have at VCU will > be to the wider community, as HNC is not a generally available format and > HND is the more common one. Are there any other users of RTK that use > Varian HNC format projections? > > Geoff > > On 11/23/12 6:35 AM, Andy Shieh wrote: > > Hi Simon, > > Just to let you know that the code works well!! Thanks! > > By the way, I've been contacting with A/Prof Geoff Hugo (I believe you know > him?), and he mentioned that he's been putting quite some effort on making > RTK compatible with Varian format (HNC mainly). He mentioned that for the > Varian format, we usually read in the "Norm Chamber value" (It's usually > around 300) from each HNC header, and calculate the CT number by > log(NormChamberValue/Intensity) * ScaleFactor, where the ScaleFactor is > around 10000. I'm not too sure about the details, but I believe he will > discuss it with you soon when he has time! > > Cheers, > Andy > >> >> >> >> 2012/11/19 Simon Rit >>> >>> Hi Andy, >>> I have pushed a fix for the Varian raw to attenuation conversion. Let >>> me know if it meets what you've done. I will let you know if there is >>> any other improvement of the conversion in the future. >>> Simon >>> >>> On Fri, Nov 9, 2012 at 9:03 AM, Simon Rit >>> wrote: >>> > Hi Andy, >>> > >>> > On Thu, Nov 8, 2012 at 5:58 PM, Andy Shieh wrote: >>> >> Hi Simon, >>> >> >>> >> Thank you. At the moment I'm just doing something similar to what you >>> >> did >>> >> for the Elekta system - using a log_ref (I'm using HND_INTENSITY_MAX) >>> >> and >>> >> minus the log of intensity plus one (I assume the plus one is to avoid >>> >> taking the log of zero?). >>> > Does it improve the results? You are welcome to share it if you feel >>> > that this is of interest for other people. >>> > >>> >> >>> >> Another few question: >>> >> 1. Are you doing any normalization after reconstruction or forward >>> >> projection? >>> > No. Assuming you have line integral of the attenuation as input of the >>> > reconstruction algorithm, you get the attenuation. >>> > >>> > Are the negative values in the reconstructed images simply a >>> >> result of the ramp filtering? >>> > Probably. You can use rtkprojections to look at what is the input of >>> > the reconstruction algorithm. >>> > >>> >> 2. If I want to compare a reprojection from an image reconstructed >>> >> using RTK >>> >> with the original projection, how should I make sure the normalization >>> >> is >>> >> correct? i.e. should I plus/minus or multiply the reprojected >>> >> attenuation >>> >> before I use exponential and make it back to intensity values? >>> > You basically have to do the inverse formula to what you have done. An >>> > easy way of looking at what is going on with forward projections is to >>> > look at this example: >>> > http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection >>> > >>> >> 3. The rtkforward projections doesn't seem to work correctly when I'm >>> >> projecting using a geometry file containing several Projection >>> >> (Angle). The >>> >> output mha file seems to "repeat" after a couple of projections >>> >> instead of >>> >> showing all projections. I'm testing this on a Varian Half Fan >>> >> geometry - it >>> >> works fine if I break the geometry file down into one each for each >>> >> projection angle and do the forward projection separately. I can send >>> >> you a >>> >> reprojection mha file if my description is unclear to you. >>> > I works for me. Would you be able to fill in a bug report >>> > (http://bug.openrtk.org/) with an example? You can generate volumes >>> > and projections with rtkdrawgeometricphantom and >>> > rtkprojectgeometricphantom. >>> > Simon >>> > >>> >> >>> >> Thanks Simon!! >>> >> >>> >> Cheers, >>> >> Andy. >>> >> >>> >> >>> >> >>> >> 2012/10/24 Simon Rit >>> >>> >>> >>> Hi Andy, >>> >>> Yes you're right, I have actually noticed recently that but I have >>> >>> not >>> >>> worked a lot on Varian images because we don't have a Varian CBCT in >>> >>> Lyon. I only had a sub-sampled acquisition from Greg of a Catphan >>> >>> that >>> >>> I used to roughly check the geometry. As far as I can remember, when >>> >>> I >>> >>> wrote this piece of code, I tried to use the same code as Plastimatch >>> >>> but I could well have done it wrongly. I'm actually waiting for a new >>> >>> complete Catphan acquisition from Greg to correct for this but if you >>> >>> already have a patch to suggest or a set of images to send, feel free >>> >>> to do it. >>> >>> Thanks, >>> >>> Simon >>> >>> >>> >>> On Tue, Oct 23, 2012 at 2:48 PM, Andy Shieh >>> >>> wrote: >>> >>> > Hi Simon, >>> >>> > >>> >>> > I was looking at "rtkVarianObiRawImageFilter.h", and realized that >>> >>> > the >>> >>> > attenuation is calculated from the projection image simply via a >>> >>> > negative >>> >>> > transformation (1-Intensity/HND_MaxIntensity). >>> >>> > Is it usually the way this is done, and is there any reason for >>> >>> > doing >>> >>> > this? >>> >>> > I would have thought attenuation should be calculated from >>> >>> > intensity via >>> >>> > logarithm (since I=I_0 exp(-mu x)). >>> >>> > Thanks!! >>> >>> > >>> >>> > Cheers, >>> >>> > Andy >>> >>> > >>> >>> > _______________________________________________ >>> >>> > Rtk-users mailing list >>> >>> > Rtk-users at openrtk.org >>> >>> > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> >>> > >>> >> >>> >> >> >> > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > > -- > ------------------------------------ > Geoffrey D. Hugo, Ph.D. > Assistant Professor > Dept. of Radiation Oncology > Virginia Commonwealth University > gdhugo at vcu.edu From hsieandy at gmail.com Thu Nov 29 01:03:44 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 14:03:44 +0800 Subject: [Rtk-users] Compiling with CUDA Message-ID: Hi Simon, Lately I've been trying to build RTK with CUDA. I tried both the CUDA production release 5.0 and 4.2. I doubled checked that CUDA is actually working (the CUDA examples run properly). And I made sure that the CUDA and CUDA SDK directories are correctly specified in the configuration when generating the build files. However, I keep getting these linking errors when I tried to compile RTK using Visual Studio 2010. Do you have any idea what might be going on? Thanks. I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. ============================================= Error 1 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 2 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 3 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 4 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkinlinefdk Error 5 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkinlinefdk Error 6 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk Error 7 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 8 error LNK2019: Unresolved external symbols "class std::vector > __cdecl GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 9 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in function "public: void __cdecl rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 10 error LNK2019: Unresolved external symbols "void __cdecl CUDA_reconstruct_conebeam(int * const,int * const,float *,float * const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) rtkfdk Error 11 error LNK2019: Unresolved external symbols "void __cdecl CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in function "protected: virtual void __cdecl rtk::CudaFFTRampImageFilter::GenerateData(void)" (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) rtkfdk Error 12 error LNK1120: Five unresolved external symbols C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk ============================================= Cheers, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 02:11:32 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 15:11:32 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, The problem seems to disappear when I updated the whole directory to the newest version of RTK. Cheers, Andy 2012/11/29 Andy Shieh > Hi Simon, > > Lately I've been trying to build RTK with CUDA. I tried both the CUDA > production release 5.0 and 4.2. I doubled checked that CUDA is actually > working (the CUDA examples run properly). And I made sure that the CUDA and > CUDA SDK directories are correctly specified in the configuration when > generating the build files. However, I keep getting these linking errors > when I tried to compile RTK using Visual Studio 2010. Do you have any idea > what might be going on? Thanks. > > I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > > ============================================= > Error 1 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 2 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 3 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 4 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkinlinefdk > Error 5 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkinlinefdk > Error 6 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk > Error 7 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * > &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 8 error LNK2019: Unresolved external symbols "class > std::vector > __cdecl > GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV > ?$allocator at H@std@@@std@@XZ) referenced in function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 9 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float > *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in > function "public: void __cdecl > rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 10 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ > @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void > __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > rtkfdk > Error 11 error LNK2019: Unresolved external symbols "void __cdecl > CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in > function "protected: virtual void __cdecl > rtk::CudaFFTRampImageFilter::GenerateData(void)" > (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > rtkfdk > Error 12 error LNK1120: Five unresolved external symbols > C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > ============================================= > > Cheers, > Andy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 02:15:48 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 08:15:48 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Great! I had no clue what the problem was.... Let us know if when we can help you with anything else, Simon On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > Hi Simon, > > The problem seems to disappear when I updated the whole directory to the > newest version of RTK. > > Cheers, > Andy > > > 2012/11/29 Andy Shieh > >> Hi Simon, >> >> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> production release 5.0 and 4.2. I doubled checked that CUDA is actually >> working (the CUDA examples run properly). And I made sure that the CUDA and >> CUDA SDK directories are correctly specified in the configuration when >> generating the build files. However, I keep getting these linking errors >> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >> what might be going on? Thanks. >> >> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >> ============================================= >> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 2 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkinlinefdk >> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkinlinefdk >> Error 6 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> referenced in function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 8 error LNK2019: Unresolved external symbols "class >> std::vector > __cdecl >> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >> function "public: void __cdecl >> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> rtkfdk >> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >> function "protected: virtual void __cdecl >> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> rtkfdk >> Error 12 error LNK1120: Five unresolved external symbols >> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> ============================================= >> >> Cheers, >> Andy >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at openrtk.org > http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsieandy at gmail.com Thu Nov 29 03:57:51 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 16:57:51 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, I do encounter another problem though. So everything compiled file and rtkfdk works fine with cpu. However, when I change the hardware argument to cuda, I get the following runtime error when rtkfdk is "Reconstructing and Writing": ======================== ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000B3EC88) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 85 Description: itk::ERROR: CUFFT ERROR #2 ========================== I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. Do you know what might be happening? Thanks! Cheers, Andy 2012/11/29 Simon Rit > Great! I had no clue what the problem was.... Let us know if when we can > help you with anything else, > Simon > On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >> Hi Simon, >> >> The problem seems to disappear when I updated the whole directory to the >> newest version of RTK. >> >> Cheers, >> Andy >> >> >> 2012/11/29 Andy Shieh >> >>> Hi Simon, >>> >>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>> working (the CUDA examples run properly). And I made sure that the CUDA and >>> CUDA SDK directories are correctly specified in the configuration when >>> generating the build files. However, I keep getting these linking errors >>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>> what might be going on? Thanks. >>> >>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>> >>> ============================================= >>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 2 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkinlinefdk >>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkinlinefdk >>> Error 6 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >>> rtkinlinefdk >>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>> referenced in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 8 error LNK2019: Unresolved external symbols "class >>> std::vector > __cdecl >>> GetListOfCudaDevices(void)" (?GetListOfCudaDevices@@YA?AV?$vector at HV >>> ?$allocator at H@std@@@std@@XZ) referenced in function "public: void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >>> in function "public: void __cdecl >>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>> const,float *,float *,float *)" (?CUDA_reconstruct_conebeam@ >>> @YAXQEAH0PEAMQEAM111 at Z) referenced in function "protected: virtual void >>> __cdecl rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>> rtkfdk >>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>> function "protected: virtual void __cdecl >>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>> rtkfdk >>> Error 12 error LNK1120: Five unresolved external symbols >>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>> ============================================= >>> >>> Cheers, >>> Andy >>> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at openrtk.org >> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 05:08:15 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 11:08:15 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi, It's seems to be an allocation problem. How big are your projection images? You can always change the parameter m_ProjectionSubsetSize to 1 with http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 to lower the amount of projection images in the GPU memory. Simon On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > Hi Simon, > > I do encounter another problem though. > So everything compiled file and rtkfdk works fine with cpu. > However, when I change the hardware argument to cuda, I get the following > runtime error when rtkfdk is "Reconstructing and Writing": > > ======================== > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000B3EC88) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 85 > Description: itk::ERROR: CUFFT ERROR #2 > ========================== > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't help. > Do you know what might be happening? Thanks! > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Great! I had no clue what the problem was.... Let us know if when we can >> help you with anything else, >> Simon >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >>> >>> Hi Simon, >>> >>> The problem seems to disappear when I updated the whole directory to the >>> newest version of RTK. >>> >>> Cheers, >>> Andy >>> >>> >>> 2012/11/29 Andy Shieh >>>> >>>> Hi Simon, >>>> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >>>> production release 5.0 and 4.2. I doubled checked that CUDA is actually >>>> working (the CUDA examples run properly). And I made sure that the CUDA and >>>> CUDA SDK directories are correctly specified in the configuration when >>>> generating the build files. However, I keep getting these linking errors >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any idea >>>> what might be going on? Thanks. >>>> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >>>> >>>> ============================================= >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 2 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkinlinefdk >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkinlinefdk >>>> Error 6 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe rtkinlinefdk >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * &,float * >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 8 error LNK2019: Unresolved external symbols "class >>>> std::vector > __cdecl >>>> GetListOfCudaDevices(void)" >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >>>> referenced in function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float *,float >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced in >>>> function "public: void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >>>> const,float *,float *,float *)" >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in function >>>> "protected: virtual void __cdecl >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >>>> rtkfdk >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced in >>>> function "protected: virtual void __cdecl >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >>>> rtkfdk >>>> Error 12 error LNK1120: Five unresolved external symbols >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >>>> ============================================= >>>> >>>> Cheers, >>>> Andy >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at openrtk.org >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >>> > From hsieandy at gmail.com Thu Nov 29 07:53:57 2012 From: hsieandy at gmail.com (Andy Shieh) Date: Thu, 29 Nov 2012 20:53:57 +0800 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Simon, Thanks for the suggestion. I tried, but it gave another error message. When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following runtime error: =============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A5E8D8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 102 Description: itk::ERROR: CUDA ERROR: invalid configuration argument ================ When I set it to the default value of 4, I get the CUFFT error in the previous maile. When I set it to 5, 6, and beyond, I get the following runtime error: ============== Reconstructing and writing... ExceptionObject caught with writer->Update() itk::ExceptionObject (0000000000A2ECB8) Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu Line: 69 Description: itk::ERROR: CUDA ERROR: out of memory ============== Cheers, Andy 2012/11/29 Simon Rit > Hi, > It's seems to be an allocation problem. How big are your projection images? > You can always change the parameter m_ProjectionSubsetSize to 1 with > > http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 > to lower the amount of projection images in the GPU memory. > Simon > > On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: > > Hi Simon, > > > > I do encounter another problem though. > > So everything compiled file and rtkfdk works fine with cpu. > > However, when I change the hardware argument to cuda, I get the following > > runtime error when rtkfdk is "Reconstructing and Writing": > > > > ======================== > > ExceptionObject caught with writer->Update() > > > > itk::ExceptionObject (0000000000B3EC88) > > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > > Line: 85 > > Description: itk::ERROR: CUFFT ERROR #2 > > ========================== > > > > > > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't > help. > > Do you know what might be happening? Thanks! > > > > Cheers, > > Andy > > > > > > 2012/11/29 Simon Rit > >> > >> Great! I had no clue what the problem was.... Let us know if when we can > >> help you with anything else, > >> Simon > >> > >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: > >>> > >>> Hi Simon, > >>> > >>> The problem seems to disappear when I updated the whole directory to > the > >>> newest version of RTK. > >>> > >>> Cheers, > >>> Andy > >>> > >>> > >>> 2012/11/29 Andy Shieh > >>>> > >>>> Hi Simon, > >>>> > >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA > >>>> production release 5.0 and 4.2. I doubled checked that CUDA is > actually > >>>> working (the CUDA examples run properly). And I made sure that the > CUDA and > >>>> CUDA SDK directories are correctly specified in the configuration when > >>>> generating the build files. However, I keep getting these linking > errors > >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any > idea > >>>> what might be going on? Thanks. > >>>> > >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. > >>>> > >>>> ============================================= > >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 2 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkinlinefdk > >>>> Error 6 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe > rtkinlinefdk > >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * > &,float * > >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 8 error LNK2019: Unresolved external symbols "class > >>>> std::vector > __cdecl > >>>> GetListOfCudaDevices(void)" > >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) > >>>> referenced in function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" > >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float > *,float > >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) > referenced in > >>>> function "public: void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" > >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * > >>>> const,float *,float *,float *)" > >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in > function > >>>> "protected: virtual void __cdecl > >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) > >>>> rtkfdk > >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl > >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" > >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced > in > >>>> function "protected: virtual void __cdecl > >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" > >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) > >>>> > C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) > >>>> rtkfdk > >>>> Error 12 error LNK1120: Five unresolved external symbols > >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk > >>>> ============================================= > >>>> > >>>> Cheers, > >>>> Andy > >>> > >>> > >>> > >>> _______________________________________________ > >>> Rtk-users mailing list > >>> Rtk-users at openrtk.org > >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users > >>> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 29 13:33:56 2012 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 29 Nov 2012 19:33:56 +0100 Subject: [Rtk-users] Compiling with CUDA In-Reply-To: References: Message-ID: Hi Andy, It seems that you have very little GPU memory. Do you know what graphics card you have? If I were you, I would start with a smaller volume with the --dimension option if you use my command line tools (modify as well the spacing at first, e.g., --spacing 8 --dimension 32). You can also use the --divisions option to split the volume in pieces but you then redo the filtering of all projection images. BTW, would you have two graphics card, there is nohing to select one over the other. Maybe this is what happens to you? You can then modify "GetListOfCudaDevices" and add some parameters to select the graphics card based on the memory. Let me know if I can help more, Simon On Thu, Nov 29, 2012 at 1:53 PM, Andy Shieh wrote: > Hi Simon, > > Thanks for the suggestion. I tried, but it gave another error message. > > When I set the m_ProjectionSubsetSize to 1, 2, or 3, I get the following > runtime error: > =============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A5E8D8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 102 > Description: itk::ERROR: CUDA ERROR: invalid configuration argument > ================ > > > When I set it to the default value of 4, I get the CUFFT error in the > previous maile. > > > When I set it to 5, 6, and beyond, I get the following runtime error: > ============== > Reconstructing and writing... > ExceptionObject caught with writer->Update() > > itk::ExceptionObject (0000000000A2ECB8) > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu > Line: 69 > Description: itk::ERROR: CUDA ERROR: out of memory > ============== > > Cheers, > Andy > > > 2012/11/29 Simon Rit >> >> Hi, >> It's seems to be an allocation problem. How big are your projection >> images? >> You can always change the parameter m_ProjectionSubsetSize to 1 with >> >> http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html#a5a87bf9cfddd8781a018f3b5cdd374e2 >> to lower the amount of projection images in the GPU memory. >> Simon >> >> On Thu, Nov 29, 2012 at 9:57 AM, Andy Shieh wrote: >> > Hi Simon, >> > >> > I do encounter another problem though. >> > So everything compiled file and rtkfdk works fine with cpu. >> > However, when I change the hardware argument to cuda, I get the >> > following >> > runtime error when rtkfdk is "Reconstructing and Writing": >> > >> > ======================== >> > ExceptionObject caught with writer->Update() >> > >> > itk::ExceptionObject (0000000000B3EC88) >> > Location: "void CUDA_fft_convolution(const int3 &, float *, float2 *)" >> > File: C:/RTK/code/rtkCudaFFTRampImageFilter.cu >> > Line: 85 >> > Description: itk::ERROR: CUFFT ERROR #2 >> > ========================== >> > >> > >> > I did try different CUDA toolkit versions (5.0 and 4.2) but it didn't >> > help. >> > Do you know what might be happening? Thanks! >> > >> > Cheers, >> > Andy >> > >> > >> > 2012/11/29 Simon Rit >> >> >> >> Great! I had no clue what the problem was.... Let us know if when we >> >> can >> >> help you with anything else, >> >> Simon >> >> >> >> On Nov 29, 2012 8:11 AM, "Andy Shieh" wrote: >> >>> >> >>> Hi Simon, >> >>> >> >>> The problem seems to disappear when I updated the whole directory to >> >>> the >> >>> newest version of RTK. >> >>> >> >>> Cheers, >> >>> Andy >> >>> >> >>> >> >>> 2012/11/29 Andy Shieh >> >>>> >> >>>> Hi Simon, >> >>>> >> >>>> Lately I've been trying to build RTK with CUDA. I tried both the CUDA >> >>>> production release 5.0 and 4.2. I doubled checked that CUDA is >> >>>> actually >> >>>> working (the CUDA examples run properly). And I made sure that the >> >>>> CUDA and >> >>>> CUDA SDK directories are correctly specified in the configuration >> >>>> when >> >>>> generating the build files. However, I keep getting these linking >> >>>> errors >> >>>> when I tried to compile RTK using Visual Studio 2010. Do you have any >> >>>> idea >> >>>> what might be going on? Thanks. >> >>>> >> >>>> I'm using Win7 64bit, and my CUDA toolkit is for 64 bit as well. >> >>>> >> >>>> ============================================= >> >>>> Error 1 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 2 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 3 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 4 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 5 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkinlinefdk >> >>>> Error 6 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkinlinefdk.exe >> >>>> rtkinlinefdk >> >>>> Error 7 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_init(int * const,int * const,float * >> >>>> &,float * >> >>>> &,float * &)" (?CUDA_reconstruct_conebeam_init@@YAXQEAH0AEAPEAM11 at Z) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 8 error LNK2019: Unresolved external symbols "class >> >>>> std::vector > __cdecl >> >>>> GetListOfCudaDevices(void)" >> >>>> (?GetListOfCudaDevices@@YA?AV?$vector at HV?$allocator at H@std@@@std@@XZ) >> >>>> referenced in function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::InitDevice(void)" >> >>>> (?InitDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 9 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam_cleanup(int * const,float *,float *,float >> >>>> *,float >> >>>> *)" (?CUDA_reconstruct_conebeam_cleanup@@YAXQEAHPEAM111 at Z) referenced >> >>>> in >> >>>> function "public: void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::CleanUpDevice(void)" >> >>>> (?CleanUpDevice at CudaFDKBackProjectionImageFilter@rtk@@QEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 10 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_reconstruct_conebeam(int * const,int * const,float *,float * >> >>>> const,float *,float *,float *)" >> >>>> (?CUDA_reconstruct_conebeam@@YAXQEAH0PEAMQEAM111 at Z) referenced in >> >>>> function >> >>>> "protected: virtual void __cdecl >> >>>> rtk::CudaFDKBackProjectionImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFDKBackProjectionImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFDKBackProjectionImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 11 error LNK2019: Unresolved external symbols "void __cdecl >> >>>> CUDA_fft_convolution(struct int3 const &,float *,struct float2 *)" >> >>>> (?CUDA_fft_convolution@@YAXAEBUint3@@PEAMPEAUfloat2@@@Z) referenced >> >>>> in >> >>>> function "protected: virtual void __cdecl >> >>>> rtk::CudaFFTRampImageFilter::GenerateData(void)" >> >>>> (?GenerateData at CudaFFTRampImageFilter@rtk@@MEAAXXZ) >> >>>> >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\applications\rtkcuda.lib(rtkCudaFFTRampImageFilter.obj) >> >>>> rtkfdk >> >>>> Error 12 error LNK1120: Five unresolved external symbols >> >>>> C:\SimonRit-RTK-4353(withHNC)\build\Release\rtkfdk.exe rtkfdk >> >>>> ============================================= >> >>>> >> >>>> Cheers, >> >>>> Andy >> >>> >> >>> >> >>> >> >>> _______________________________________________ >> >>> Rtk-users mailing list >> >>> Rtk-users at openrtk.org >> >>> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users >> >>> >> > > >