From w_ettehadi at yahoo.com Tue Nov 1 12:50:12 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Tue, 1 Nov 2016 16:50:12 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> Message-ID: <1400014065.1872614.1478019012480@mail.yahoo.com> Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards,Vahid -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 02:53:39 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 07:53:39 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1400014065.1872614.1478019012480@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> Message-ID: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: > Hello RTK users and developers, > > I already implemented the RTK and reconstructed some images with the > FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. > Now, I am trying to develop a model-based image reconstruction for our > cone-beam micro-CT. I see already that some iterative algorithms like > ART and its modifications and conjugate-gradient (CG) method are > implemented in the RTK. I want to develop a model-based reconstruction > through the Newton/quasi-Newton optimizations methods. I was wondering > is it possible to extract the gradient of least square function from > implemented algorithms like CG module? Any recommendation will be > appreciated. > > Best Regards, > Vahid > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Wed Nov 2 04:01:30 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 08:01:30 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have tried but I am not getting where to give --division 4 in my code. Please find my code given below and please let me know where I need to change in my code to make it work. int _tmain(int argc, _TCHAR* argv[]) { #pragma region "Variable declaration" const double PI = 3.14159265358979323846; float *angles; int nProj = 349; typedef unsigned short pixelType; typedef float OutpixelType; const int dimension = 3; typedef itk::Image imageType; typedef itk::ImageRegionConstIterator ImageIteratorType; imageType::Pointer Projections = imageType::New(); #pragma endregion "Variable declaration" Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); imageType::SpacingType pSpacing; pSpacing[0] = 0.2960; pSpacing[1] = 0.2960; pSpacing[2] = 0.2960; Projections->SetSpacing(pSpacing); imageType::PointType pOrigin; pOrigin[0] = -212.972; pOrigin[1] = -212.972; pOrigin[2] = -212.972; //-158.50; Projections->SetOrigin(pOrigin); Projections->Update(); //Read angles. char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; angles = new float[nProj]; angles = readAngles(angles_file, angles); #pragma region"Geometry" // Geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); for (unsigned int noProj = 0; noProj < nProj; noProj++) { geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // } typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); geometryWriter->SetFilename("D:\\geo.xml"); geometryWriter->SetObject(geometry); geometryWriter->WriteFile(); geometry->Update(); #pragma endregion "Geometry" //Define output image type #ifdef USE_CUDA typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #else typedef itk::Image OutPutImageType; typedef rtk::ParkerShortScanImageFilter PSSFType; typedef rtk::FDKConeBeamReconstructionFilter FDKType; #endif //ScatterCorrection typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); ScatterCorrection->SetInput(Projections); //VarianObiRawImageFilter typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); //Create the output image typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; ConstantImageSourceType::PointType origin_p; ConstantImageSourceType::SizeType size_p; ConstantImageSourceType::SpacingType spacing_p; ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); origin_p[0] = -127.5; origin_p[1] = -127.5; origin_p[2] = -127.5; size_p[0] = 512; size_p[1] = 512; size_p[2] = 512; spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); projectionsSource->SetOrigin(origin_p); projectionsSource->SetSpacing(spacing_p); projectionsSource->SetSize(size_p); projectionsSource->SetConstant(0); // Short scan image filter PSSFType::Pointer pssf = PSSFType::New(); pssf->SetInput(AttenuationFilter->GetOutput()); pssf->SetGeometry(geometry); pssf->InPlaceOff(); std::cout << "short scan image filter success" << std::endl; FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput(0, projectionsSource->GetOutput()); feldkamp->SetInput(1, pssf->GetOutput()); feldkamp->SetGeometry(geometry); feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); feldkamp->GetRampFilter()->SetHammingFrequency(5.0); feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); feldkamp->SetGPUEnabled(1); feldkamp->SetNumberOfThreads(10000); #pragma region "Write volume" //Create a raw io for writing itk::RawImageIO::Pointer io; io = itk::RawImageIO::New(); for (unsigned int i = 0; i < dimension; i++) { io->SetDimensions(i, size_p[i]); io->SetSpacing(i, spacing_p[i]); io->SetOrigin(i, origin_p[i]); } io->SetHeaderSize(0); io->SetByteOrderToLittleEndian(); io->SetPixelType(itk::ImageIOBase::SCALAR); io->SetNumberOfComponents(1); io->SetNumberOfDimensions(3); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(feldkamp->GetOutput()); try { writer->Update(); } catch (itk::ExceptionObject & excp) { std::cerr << "Error while writing the image " << std::endl; std::cerr << excp << std::endl; getchar(); } #pragma endregion "WriteVolume" delete[] angles; return 0; } Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > I was able to perform a reconstruction from your header and geometry > file, using the following command lines: > > rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > --phantomscale "128,128,128" --like Output.mhd > > rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > The first computes projections through a Shepp & Logan phantom, with the > same size, spacing, origin, etc... as your projections, using your > geometry file geo.xml. > > The second line performs the FDK reconstruction. I had to use both the > "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > on a Geforce GTX 780). "--lowmem" loads the projections into memory by > subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > parts, reconstructs them one by one, then assembles the results. Can you > run the same commands and let us know whether you still encounter the > crash you mentioned ? If it works, you can use your own projection data > in the second command line instead of "simulatedprojections.mha". > > Best, > > Cyril > > On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > > Dear Sir, > > > > Please find the Header file in the attachment. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> We do not need the projections file, at least not for a first stage of > >> error tracking. We only need the header. > >> Try the following command line: > >> > >> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >> > >> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >> what we need, and it is a very light text file. The "proj.raw" contains > >> the pixel values, but at the moment we do not need them. We will create > >> our own proj.raw file, filled with zeros, which should be enough to > >> track down the error you encounter. > >> > >> Looking forward to receiving your file, > >> Cyril > >> > >> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>> Dear Sir, > >>> > >>> The single raw file of the projections is 1.4 GB and we are > not > >> able to send this big file to you. Can you please suggest other > alternatives > >> for this? > >>> Or can you provide us the PC configuration to solve the > issue? > >>> > >>> Let me know if any other clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Hello Zahid, > >>>> > >>>> We will need the header of your projections file, too (It is best if > you > >>>> have all your projections as a single .mhd and a single .raw file, so > it > >>>> should be 3-D image, and you send only the .mhd file). > >>>> > >>>> Regards, > >>>> Cyril > >>>> > >>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> > >>>>> I have only used RTK version 1.3.0. but in the error > >>>> message it is showing RTK version 1.2.0. > >>>>> Please find the attachment of the geometry file of > our > >>>> projections. > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> Without some more information, it's unlikely that we find the source > of > >>>>>> the problem. Here are a few things you can do to help us (and > therefore > >>>>>> yourself): > >>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > the > >>>>>> Cuda forward and back projection filters since v1.2.0, so your > problem > >>>>>> might disappear just by upgrading to the new version > >>>>>> - create a small example that reproduces your problem. You can, for > >>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>> example). And send us the script > >>>>>> - OR send us your geometry file and the header of your projections > file > >>>>>> (no need to send the projection data itself, we'll create a > zero-filled > >>>>>> stack of projections), and the command line that crashes > >>>>>> > >>>>>> Best regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Simon Rit, > >>>>>>> > >>>>>>> Please find the screen shot in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> Senior Design Engineer > >>>>>>> Mobile No. +91-9738379729 > >>>>>>> > >>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>> http://www.panaceamedical.com > >>>>>>> Bangalore - India. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>> Cc: rtk-users at public.kitware.com > >> [mailto:rtk-users at public.kitware.com], > >>>>>> saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>> memory > >>>>>>>> error. If you use the command line tool rtkfdk, you should first > make > >>>>>> sure > >>>>>>>> that you use the --lowmem option to stream the projection images. > If > >> it > >>>>>> is > >>>>>>>> no sufficient, you can split your volume using the --divisions. The > >>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of > >> RTK > >>>> on > >>>>>>>> our case studies webpage > >>>>>> . > >>>>>>>> Simon > >>>>>>>> > >>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>> > >>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>> > >>>>>>>>>> I am unable to do 1024x1024x1024 > reconstruction > >>>> using > >>>>>> RTK > >>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > shoot > >> of > >>>>>>>>> the > >>>>>>>>>> same. > >>>>>>>>>> > >>>>>>>>>> I am using the following items given below. > >>>>>>>>>> > >>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >> application > >>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>> 5. CUDA 7. > >>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>> > >>>>>>>>>> Please provide the solution of this and let me > >> know > >>>> if > >>>>>>>> any > >>>>>>>>>> other clarification is required. > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> Thanks & Regards > >>>>>>>>>> > >>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>> Senior Design Engineer > >>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>> > >>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>> Bangalore - India. > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> ____________________________________________________________ > >>>>>>>>> ________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> Rtk-users mailing list > >>>>>>> Rtk-users at public.kitware.com > >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 04:33:32 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 09:33:32 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> References: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Message-ID: <398170fb-a69e-9781-73d5-2a419542d06d@creatis.insa-lyon.fr> Dear Zahid, The --divisions is an option of the command-line application rtkfdk. It is not directly an option of the FDKConeBeamReconstructionFilter : rather, it is passed to a streaming filter at the end of the pipeline. Look for the following bit of code in rtkfdk.cxx : // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput( pfeldkamp ); streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); You can find information on how a streaming filter works on this page: https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html I hope it helps, Cyril On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have tried but I am not getting where to give --division 4 in my code. > > > Please find my code given below and please let me know where I need to change in my code to make it work. > > > int _tmain(int argc, _TCHAR* argv[]) > { > #pragma region "Variable declaration" > const double PI = 3.14159265358979323846; > float *angles; > int nProj = 349; > typedef unsigned short pixelType; > typedef float OutpixelType; > const int dimension = 3; > typedef itk::Image imageType; > typedef itk::ImageRegionConstIterator ImageIteratorType; > imageType::Pointer Projections = imageType::New(); > > #pragma endregion "Variable declaration" > > Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > imageType::SpacingType pSpacing; > pSpacing[0] = 0.2960; > pSpacing[1] = 0.2960; > pSpacing[2] = 0.2960; > Projections->SetSpacing(pSpacing); > > imageType::PointType pOrigin; > pOrigin[0] = -212.972; > pOrigin[1] = -212.972; > pOrigin[2] = -212.972; //-158.50; > Projections->SetOrigin(pOrigin); > > Projections->Update(); > > //Read angles. > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > angles = new float[nProj]; > angles = readAngles(angles_file, angles); > > #pragma region"Geometry" > // Geometry object > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > GeometryType::Pointer geometry = GeometryType::New(); > for (unsigned int noProj = 0; noProj < nProj; noProj++) > { > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // > } > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > geometryWriter->SetFilename("D:\\geo.xml"); > geometryWriter->SetObject(geometry); > geometryWriter->WriteFile(); > geometry->Update(); > #pragma endregion "Geometry" > > //Define output image type > > #ifdef USE_CUDA > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > #else > typedef itk::Image OutPutImageType; > typedef rtk::ParkerShortScanImageFilter PSSFType; > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > #endif > > //ScatterCorrection > typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); > ScatterCorrection->SetInput(Projections); > > //VarianObiRawImageFilter > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; > RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > //Create the output image > typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; > ConstantImageSourceType::PointType origin_p; > ConstantImageSourceType::SizeType size_p; > ConstantImageSourceType::SpacingType spacing_p; > ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); > origin_p[0] = -127.5; > origin_p[1] = -127.5; > origin_p[2] = -127.5; > size_p[0] = 512; > size_p[1] = 512; > size_p[2] = 512; > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > projectionsSource->SetOrigin(origin_p); > projectionsSource->SetSpacing(spacing_p); > projectionsSource->SetSize(size_p); > projectionsSource->SetConstant(0); > > // Short scan image filter > PSSFType::Pointer pssf = PSSFType::New(); > pssf->SetInput(AttenuationFilter->GetOutput()); > pssf->SetGeometry(geometry); > pssf->InPlaceOff(); > std::cout << "short scan image filter success" << std::endl; > > FDKType::Pointer feldkamp = FDKType::New(); > feldkamp->SetInput(0, projectionsSource->GetOutput()); > feldkamp->SetInput(1, pssf->GetOutput()); > feldkamp->SetGeometry(geometry); > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > feldkamp->SetGPUEnabled(1); > feldkamp->SetNumberOfThreads(10000); > > #pragma region "Write volume" > > //Create a raw io for writing > > itk::RawImageIO::Pointer io; > io = itk::RawImageIO::New(); > > for (unsigned int i = 0; i < dimension; i++) > { > io->SetDimensions(i, size_p[i]); > io->SetSpacing(i, spacing_p[i]); > io->SetOrigin(i, origin_p[i]); > } > io->SetHeaderSize(0); > io->SetByteOrderToLittleEndian(); > io->SetPixelType(itk::ImageIOBase::SCALAR); > io->SetNumberOfComponents(1); > io->SetNumberOfDimensions(3); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(feldkamp->GetOutput()); > > try > { > writer->Update(); > } > catch (itk::ExceptionObject & excp) > { > std::cerr << "Error while writing the image " << std::endl; > std::cerr << excp << std::endl; > getchar(); > } > #pragma endregion "WriteVolume" > delete[] angles; > return 0; > } > > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> I was able to perform a reconstruction from your header and geometry >> file, using the following command lines: >> >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> --phantomscale "128,128,128" --like Output.mhd >> >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> >> The first computes projections through a Shepp & Logan phantom, with the >> same size, spacing, origin, etc... as your projections, using your >> geometry file geo.xml. >> >> The second line performs the FDK reconstruction. I had to use both the >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> parts, reconstructs them one by one, then assembles the results. Can you >> run the same commands and let us know whether you still encounter the >> crash you mentioned ? If it works, you can use your own projection data >> in the second command line instead of "simulatedprojections.mha". >> >> Best, >> >> Cyril >> >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> >>> Dear Sir, >>> >>> Please find the Header file in the attachment. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> We do not need the projections file, at least not for a first stage of >>>> error tracking. We only need the header. >>>> Try the following command line: >>>> >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>> >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>> what we need, and it is a very light text file. The "proj.raw" contains >>>> the pixel values, but at the moment we do not need them. We will create >>>> our own proj.raw file, filled with zeros, which should be enough to >>>> track down the error you encounter. >>>> >>>> Looking forward to receiving your file, >>>> Cyril >>>> >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>> Dear Sir, >>>>> >>>>> The single raw file of the projections is 1.4 GB and we are >> not >>>> able to send this big file to you. Can you please suggest other >> alternatives >>>> for this? >>>>> Or can you provide us the PC configuration to solve the >> issue? >>>>> Let me know if any other clarification is required. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Hello Zahid, >>>>>> >>>>>> We will need the header of your projections file, too (It is best if >> you >>>>>> have all your projections as a single .mhd and a single .raw file, so >> it >>>>>> should be 3-D image, and you send only the .mhd file). >>>>>> >>>>>> Regards, >>>>>> Cyril >>>>>> >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>> Dear Cyril Mory, >>>>>>> >>>>>>> >>>>>>> I have only used RTK version 1.3.0. but in the error >>>>>> message it is showing RTK version 1.2.0. >>>>>>> Please find the attachment of the geometry file of >> our >>>>>> projections. >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> Without some more information, it's unlikely that we find the source >> of >>>>>>>> the problem. Here are a few things you can do to help us (and >> therefore >>>>>>>> yourself): >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >> the >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >> problem >>>>>>>> might disappear just by upgrading to the new version >>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>> example). And send us the script >>>>>>>> - OR send us your geometry file and the header of your projections >> file >>>>>>>> (no need to send the projection data itself, we'll create a >> zero-filled >>>>>>>> stack of projections), and the command line that crashes >>>>>>>> >>>>>>>> Best regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Simon Rit, >>>>>>>>> >>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> Senior Design Engineer >>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>> >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>> http://www.panaceamedical.com >>>>>>>>> Bangalore - India. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>> Cc: rtk-users at public.kitware.com >>>> [mailto:rtk-users at public.kitware.com], >>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>> memory >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >> make >>>>>>>> sure >>>>>>>>>> that you use the --lowmem option to stream the projection images. >> If >>>> it >>>>>>>> is >>>>>>>>>> no sufficient, you can split your volume using the --divisions. The >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of >>>> RTK >>>>>> on >>>>>>>>>> our case studies webpage >>>>>>>> . >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>> >>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>> >>>>>>>>>>>> I am unable to do 1024x1024x1024 >> reconstruction >>>>>> using >>>>>>>> RTK >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >> shoot >>>> of >>>>>>>>>>> the >>>>>>>>>>>> same. >>>>>>>>>>>> >>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>> >>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>> application >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>> >>>>>>>>>>>> Please provide the solution of this and let me >>>> know >>>>>> if >>>>>>>>>> any >>>>>>>>>>>> other clarification is required. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>> >>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>> >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>> Bangalore - India. >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>> ________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rtk-users mailing list >>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 06:57:15 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 10:57:15 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. Please check my modified file writer code given below. // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput(feldkamp->GetOutput()); streamerBP->SetNumberOfStreamDivisions(4); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(streamerBP->GetOutput()); writer->SetNumberOfStreamDivisions(4); Please let me know if any clarification is required. Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The --divisions is an option of the command-line application rtkfdk. It > is not directly an option of the FDKConeBeamReconstructionFilter : > rather, it is passed to a streaming filter at the end of the pipeline. > Look for the following bit of code in rtkfdk.cxx : > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter CPUOutputImageType> StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput( pfeldkamp ); > streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > > You can find information on how a streaming filter works on this page: > > https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > I hope it helps, > > Cyril > > On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have tried but I am not getting where to give > --division 4 in my code. > > > > > > Please find my code given below and please let me know > where I need to change in my code to make it work. > > > > > > int _tmain(int argc, _TCHAR* argv[]) > > { > > #pragma region "Variable declaration" > > const double PI = 3.14159265358979323846; > > float *angles; > > int nProj = 349; > > typedef unsigned short pixelType; > > typedef float OutpixelType; > > const int dimension = 3; > > typedef itk::Image imageType; > > typedef itk::ImageRegionConstIterator ImageIteratorType; > > imageType::Pointer Projections = imageType::New(); > > > > #pragma endregion "Variable declaration" > > > > Projections = > ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > > imageType::SpacingType pSpacing; > > pSpacing[0] = 0.2960; > > pSpacing[1] = 0.2960; > > pSpacing[2] = 0.2960; > > Projections->SetSpacing(pSpacing); > > > > imageType::PointType pOrigin; > > pOrigin[0] = -212.972; > > pOrigin[1] = -212.972; > > pOrigin[2] = -212.972; //-158.50; > > Projections->SetOrigin(pOrigin); > > > > Projections->Update(); > > > > //Read angles. > > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > angles = new float[nProj]; > > angles = readAngles(angles_file, angles); > > > > #pragma region"Geometry" > > // Geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > for (unsigned int noProj = 0; noProj < nProj; noProj++) > > { > > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); > // 136 half fan //2.07 Kidwai // > > } > > > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > GeometryWriterType; > > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > > geometryWriter->SetFilename("D:\\geo.xml"); > > geometryWriter->SetObject(geometry); > > geometryWriter->WriteFile(); > > geometry->Update(); > > #pragma endregion "Geometry" > > > > //Define output image type > > > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef itk::Image OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter PSSFType; > > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > > #endif > > > > //ScatterCorrection > > typedef rtk::BoellaardScatterCorrectionImageFilter > BoellaardScatterCorrectionImageFilterType; > > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > BoellaardScatterCorrectionImageFilterType::New(); > > ScatterCorrection->SetInput(Projections); > > > > //VarianObiRawImageFilter > > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > RawImageFilterType; > > RawImageFilterType::Pointer AttenuationFilter = > RawImageFilterType::New(); > > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > > > //Create the output image > > typedef rtk::ConstantImageSource< OutPutImageType > > ConstantImageSourceType; > > ConstantImageSourceType::PointType origin_p; > > ConstantImageSourceType::SizeType size_p; > > ConstantImageSourceType::SpacingType spacing_p; > > ConstantImageSourceType::Pointer projectionsSource = > ConstantImageSourceType::New(); > > origin_p[0] = -127.5; > > origin_p[1] = -127.5; > > origin_p[2] = -127.5; > > size_p[0] = 512; > > size_p[1] = 512; > > size_p[2] = 512; > > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > > > projectionsSource->SetOrigin(origin_p); > > projectionsSource->SetSpacing(spacing_p); > > projectionsSource->SetSize(size_p); > > projectionsSource->SetConstant(0); > > > > // Short scan image filter > > PSSFType::Pointer pssf = PSSFType::New(); > > pssf->SetInput(AttenuationFilter->GetOutput()); > > pssf->SetGeometry(geometry); > > pssf->InPlaceOff(); > > std::cout << "short scan image filter success" << std::endl; > > > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput(0, projectionsSource->GetOutput()); > > feldkamp->SetInput(1, pssf->GetOutput()); > > feldkamp->SetGeometry(geometry); > > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > feldkamp->SetGPUEnabled(1); > > feldkamp->SetNumberOfThreads(10000); > > > > #pragma region "Write volume" > > > > //Create a raw io for writing > > > > itk::RawImageIO::Pointer io; > > io = itk::RawImageIO::New(); > > > > for (unsigned int i = 0; i < dimension; i++) > > { > > io->SetDimensions(i, size_p[i]); > > io->SetSpacing(i, spacing_p[i]); > > io->SetOrigin(i, origin_p[i]); > > } > > io->SetHeaderSize(0); > > io->SetByteOrderToLittleEndian(); > > io->SetPixelType(itk::ImageIOBase::SCALAR); > > io->SetNumberOfComponents(1); > > io->SetNumberOfDimensions(3); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(feldkamp->GetOutput()); > > > > try > > { > > writer->Update(); > > } > > catch (itk::ExceptionObject & excp) > > { > > std::cerr << "Error while writing the image " << std::endl; > > std::cerr << excp << std::endl; > > getchar(); > > } > > #pragma endregion "WriteVolume" > > delete[] angles; > > return 0; > > } > > > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> I was able to perform a reconstruction from your header and geometry > >> file, using the following command lines: > >> > >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >> --phantomscale "128,128,128" --like Output.mhd > >> > >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >> > >> The first computes projections through a Shepp & Logan phantom, with the > >> same size, spacing, origin, etc... as your projections, using your > >> geometry file geo.xml. > >> > >> The second line performs the FDK reconstruction. I had to use both the > >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >> parts, reconstructs them one by one, then assembles the results. Can you > >> run the same commands and let us know whether you still encounter the > >> crash you mentioned ? If it works, you can use your own projection data > >> in the second command line instead of "simulatedprojections.mha". > >> > >> Best, > >> > >> Cyril > >> > >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >> > >>> Dear Sir, > >>> > >>> Please find the Header file in the attachment. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> We do not need the projections file, at least not for a first stage of > >>>> error tracking. We only need the header. > >>>> Try the following command line: > >>>> > >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>> > >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>> what we need, and it is a very light text file. The "proj.raw" contains > >>>> the pixel values, but at the moment we do not need them. We will create > >>>> our own proj.raw file, filled with zeros, which should be enough to > >>>> track down the error you encounter. > >>>> > >>>> Looking forward to receiving your file, > >>>> Cyril > >>>> > >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Sir, > >>>>> > >>>>> The single raw file of the projections is 1.4 GB and we > are > >> not > >>>> able to send this big file to you. Can you please suggest other > >> alternatives > >>>> for this? > >>>>> Or can you provide us the PC configuration to solve the > >> issue? > >>>>> Let me know if any other clarification is required. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Hello Zahid, > >>>>>> > >>>>>> We will need the header of your projections file, too (It is best if > >> you > >>>>>> have all your projections as a single .mhd and a single .raw file, so > >> it > >>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>> > >>>>>> Regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Cyril Mory, > >>>>>>> > >>>>>>> > >>>>>>> I have only used RTK version 1.3.0. but in the > error > >>>>>> message it is showing RTK version 1.2.0. > >>>>>>> Please find the attachment of the geometry file > of > >> our > >>>>>> projections. > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> Without some more information, it's unlikely that we find the > source > >> of > >>>>>>>> the problem. Here are a few things you can do to help us (and > >> therefore > >>>>>>>> yourself): > >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > >> the > >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >> problem > >>>>>>>> might disappear just by upgrading to the new version > >>>>>>>> - create a small example that reproduces your problem. You can, for > >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>> example). And send us the script > >>>>>>>> - OR send us your geometry file and the header of your projections > >> file > >>>>>>>> (no need to send the projection data itself, we'll create a > >> zero-filled > >>>>>>>> stack of projections), and the command line that crashes > >>>>>>>> > >>>>>>>> Best regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Simon Rit, > >>>>>>>>> > >>>>>>>>> Please find the screen shot in the attachment. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> Senior Design Engineer > >>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>> > >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>> http://www.panaceamedical.com > >>>>>>>>> Bangalore - India. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>> Cc: rtk-users at public.kitware.com > >>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>>>> memory > >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first > >> make > >>>>>>>> sure > >>>>>>>>>> that you use the --lowmem option to stream the projection images. > >> If > >>>> it > >>>>>>>> is > >>>>>>>>>> no sufficient, you can split your volume using the --divisions. > The > >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > of > >>>> RTK > >>>>>> on > >>>>>>>>>> our case studies webpage > >>>>>>>> . > >>>>>>>>>> Simon > >>>>>>>>>> > >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>> > >>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>> > >>>>>>>>>>>> I am unable to do 1024x1024x1024 > >> reconstruction > >>>>>> using > >>>>>>>> RTK > >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >> shoot > >>>> of > >>>>>>>>>>> the > >>>>>>>>>>>> same. > >>>>>>>>>>>> > >>>>>>>>>>>> I am using the following items given below. > >>>>>>>>>>>> > >>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>> application > >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>> > >>>>>>>>>>>> Please provide the solution of this and let > me > >>>> know > >>>>>> if > >>>>>>>>>> any > >>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>> > >>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>> > >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>> ________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 08:27:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 13:27:18 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> References: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Message-ID: <84154ed0-3cb8-abf7-c253-3162d78bf7b7@creatis.insa-lyon.fr> I see two errors: Remove this line writer->SetNumberOfStreamDivisions(4); since only the streaming filter, not the write filter, needs to know about the number of divisions. And change the filename to "D:\\Output.mhd" It will write both the .mhd and the .raw files. I hope it helps, Cyril On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. > > Please check my modified file writer code given below. > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput(feldkamp->GetOutput()); > streamerBP->SetNumberOfStreamDivisions(4); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(streamerBP->GetOutput()); > writer->SetNumberOfStreamDivisions(4); > > > Please let me know if any clarification is required. > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> The --divisions is an option of the command-line application rtkfdk. It >> is not directly an option of the FDKConeBeamReconstructionFilter : >> rather, it is passed to a streaming filter at the end of the pipeline. >> Look for the following bit of code in rtkfdk.cxx : >> >> // Streaming depending on streaming capability of writer >> typedef itk::StreamingImageFilter> CPUOutputImageType> StreamerType; >> StreamerType::Pointer streamerBP = StreamerType::New(); >> streamerBP->SetInput( pfeldkamp ); >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >> >> You can find information on how a streaming filter works on this page: >> >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> >> I hope it helps, >> >> Cyril >> >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have tried but I am not getting where to give >> --division 4 in my code. >>> >>> Please find my code given below and please let me know >> where I need to change in my code to make it work. >>> >>> int _tmain(int argc, _TCHAR* argv[]) >>> { >>> #pragma region "Variable declaration" >>> const double PI = 3.14159265358979323846; >>> float *angles; >>> int nProj = 349; >>> typedef unsigned short pixelType; >>> typedef float OutpixelType; >>> const int dimension = 3; >>> typedef itk::Image imageType; >>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>> imageType::Pointer Projections = imageType::New(); >>> >>> #pragma endregion "Variable declaration" >>> >>> Projections = >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); >>> imageType::SpacingType pSpacing; >>> pSpacing[0] = 0.2960; >>> pSpacing[1] = 0.2960; >>> pSpacing[2] = 0.2960; >>> Projections->SetSpacing(pSpacing); >>> >>> imageType::PointType pOrigin; >>> pOrigin[0] = -212.972; >>> pOrigin[1] = -212.972; >>> pOrigin[2] = -212.972; //-158.50; >>> Projections->SetOrigin(pOrigin); >>> >>> Projections->Update(); >>> >>> //Read angles. >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>> angles = new float[nProj]; >>> angles = readAngles(angles_file, angles); >>> >>> #pragma region"Geometry" >>> // Geometry object >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> GeometryType::Pointer geometry = GeometryType::New(); >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>> { >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); >> // 136 half fan //2.07 Kidwai // >>> } >>> >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> GeometryWriterType; >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>> geometryWriter->SetFilename("D:\\geo.xml"); >>> geometryWriter->SetObject(geometry); >>> geometryWriter->WriteFile(); >>> geometry->Update(); >>> #pragma endregion "Geometry" >>> >>> //Define output image type >>> >>> #ifdef USE_CUDA >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> #else >>> typedef itk::Image OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>> #endif >>> >>> //ScatterCorrection >>> typedef rtk::BoellaardScatterCorrectionImageFilter >> BoellaardScatterCorrectionImageFilterType; >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >> BoellaardScatterCorrectionImageFilterType::New(); >>> ScatterCorrection->SetInput(Projections); >>> >>> //VarianObiRawImageFilter >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> RawImageFilterType; >>> RawImageFilterType::Pointer AttenuationFilter = >> RawImageFilterType::New(); >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>> >>> //Create the output image >>> typedef rtk::ConstantImageSource< OutPutImageType > >> ConstantImageSourceType; >>> ConstantImageSourceType::PointType origin_p; >>> ConstantImageSourceType::SizeType size_p; >>> ConstantImageSourceType::SpacingType spacing_p; >>> ConstantImageSourceType::Pointer projectionsSource = >> ConstantImageSourceType::New(); >>> origin_p[0] = -127.5; >>> origin_p[1] = -127.5; >>> origin_p[2] = -127.5; >>> size_p[0] = 512; >>> size_p[1] = 512; >>> size_p[2] = 512; >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>> >>> projectionsSource->SetOrigin(origin_p); >>> projectionsSource->SetSpacing(spacing_p); >>> projectionsSource->SetSize(size_p); >>> projectionsSource->SetConstant(0); >>> >>> // Short scan image filter >>> PSSFType::Pointer pssf = PSSFType::New(); >>> pssf->SetInput(AttenuationFilter->GetOutput()); >>> pssf->SetGeometry(geometry); >>> pssf->InPlaceOff(); >>> std::cout << "short scan image filter success" << std::endl; >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>> feldkamp->SetInput(1, pssf->GetOutput()); >>> feldkamp->SetGeometry(geometry); >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>> feldkamp->SetGPUEnabled(1); >>> feldkamp->SetNumberOfThreads(10000); >>> >>> #pragma region "Write volume" >>> >>> //Create a raw io for writing >>> >>> itk::RawImageIO::Pointer io; >>> io = itk::RawImageIO::New(); >>> >>> for (unsigned int i = 0; i < dimension; i++) >>> { >>> io->SetDimensions(i, size_p[i]); >>> io->SetSpacing(i, spacing_p[i]); >>> io->SetOrigin(i, origin_p[i]); >>> } >>> io->SetHeaderSize(0); >>> io->SetByteOrderToLittleEndian(); >>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>> io->SetNumberOfComponents(1); >>> io->SetNumberOfDimensions(3); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(feldkamp->GetOutput()); >>> >>> try >>> { >>> writer->Update(); >>> } >>> catch (itk::ExceptionObject & excp) >>> { >>> std::cerr << "Error while writing the image " << std::endl; >>> std::cerr << excp << std::endl; >>> getchar(); >>> } >>> #pragma endregion "WriteVolume" >>> delete[] angles; >>> return 0; >>> } >>> >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> I was able to perform a reconstruction from your header and geometry >>>> file, using the following command lines: >>>> >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>> --phantomscale "128,128,128" --like Output.mhd >>>> >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>> >>>> The first computes projections through a Shepp & Logan phantom, with the >>>> same size, spacing, origin, etc... as your projections, using your >>>> geometry file geo.xml. >>>> >>>> The second line performs the FDK reconstruction. I had to use both the >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>> parts, reconstructs them one by one, then assembles the results. Can you >>>> run the same commands and let us know whether you still encounter the >>>> crash you mentioned ? If it works, you can use your own projection data >>>> in the second command line instead of "simulatedprojections.mha". >>>> >>>> Best, >>>> >>>> Cyril >>>> >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>> >>>>> Dear Sir, >>>>> >>>>> Please find the Header file in the attachment. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> We do not need the projections file, at least not for a first stage of >>>>>> error tracking. We only need the header. >>>>>> Try the following command line: >>>>>> >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>> >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>> what we need, and it is a very light text file. The "proj.raw" contains >>>>>> the pixel values, but at the moment we do not need them. We will create >>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>> track down the error you encounter. >>>>>> >>>>>> Looking forward to receiving your file, >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>> Dear Sir, >>>>>>> >>>>>>> The single raw file of the projections is 1.4 GB and we >> are >>>> not >>>>>> able to send this big file to you. Can you please suggest other >>>> alternatives >>>>>> for this? >>>>>>> Or can you provide us the PC configuration to solve the >>>> issue? >>>>>>> Let me know if any other clarification is required. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Hello Zahid, >>>>>>>> >>>>>>>> We will need the header of your projections file, too (It is best if >>>> you >>>>>>>> have all your projections as a single .mhd and a single .raw file, so >>>> it >>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>> >>>>>>>> Regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Cyril Mory, >>>>>>>>> >>>>>>>>> >>>>>>>>> I have only used RTK version 1.3.0. but in the >> error >>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>> Please find the attachment of the geometry file >> of >>>> our >>>>>>>> projections. >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> >>>>>>>>>> Without some more information, it's unlikely that we find the >> source >>>> of >>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>> therefore >>>>>>>>>> yourself): >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >>>> the >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>> problem >>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>> example). And send us the script >>>>>>>>>> - OR send us your geometry file and the header of your projections >>>> file >>>>>>>>>> (no need to send the projection data itself, we'll create a >>>> zero-filled >>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>> >>>>>>>>>> Best regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>> >>>>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> Senior Design Engineer >>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>> >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>> Bangalore - India. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>>>> memory >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >>>> make >>>>>>>>>> sure >>>>>>>>>>>> that you use the --lowmem option to stream the projection images. >>>> If >>>>>> it >>>>>>>>>> is >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >> The >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >> of >>>>>> RTK >>>>>>>> on >>>>>>>>>>>> our case studies webpage >>>>>>>>>> . >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>> reconstruction >>>>>>>> using >>>>>>>>>> RTK >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>> shoot >>>>>> of >>>>>>>>>>>>> the >>>>>>>>>>>>>> same. >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>>>> >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>> application >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Please provide the solution of this and let >> me >>>>>> know >>>>>>>> if >>>>>>>>>>>> any >>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>> >>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>> >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url >> : >>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>> ________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>> >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>>>> >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 09:37:23 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 13:37:23 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. Please suggest us for further process. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > I see two errors: > > Remove this line > > writer->SetNumberOfStreamDivisions(4); > > since only the streaming filter, not the write filter, needs to know > about the number of divisions. > And change the filename to > > "D:\\Output.mhd" > > It will write both the .mhd and the .raw files. > > I hope it helps, > Cyril > > On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have modified my file writer code and used > StreamingImageFilter. Now its not giving any error message but the final > output is 0 byte for 1024 volume. It working fine for 512 volume. > > > > Please check my modified file writer code given below. > > > > // Streaming depending on streaming capability of writer > > typedef itk::StreamingImageFilter > StreamerType; > > StreamerType::Pointer streamerBP = StreamerType::New(); > > streamerBP->SetInput(feldkamp->GetOutput()); > > streamerBP->SetNumberOfStreamDivisions(4); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(streamerBP->GetOutput()); > > writer->SetNumberOfStreamDivisions(4); > > > > > > Please let me know if any clarification is required. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> The --divisions is an option of the command-line application rtkfdk. It > >> is not directly an option of the FDKConeBeamReconstructionFilter : > >> rather, it is passed to a streaming filter at the end of the pipeline. > >> Look for the following bit of code in rtkfdk.cxx : > >> > >> // Streaming depending on streaming capability of writer > >> typedef itk::StreamingImageFilter >> CPUOutputImageType> StreamerType; > >> StreamerType::Pointer streamerBP = StreamerType::New(); > >> streamerBP->SetInput( pfeldkamp ); > >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >> > >> You can find information on how a streaming filter works on this page: > >> > >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >> > >> I hope it helps, > >> > >> Cyril > >> > >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have tried but I am not getting where to give > >> --division 4 in my code. > >>> > >>> Please find my code given below and please let me know > >> where I need to change in my code to make it work. > >>> > >>> int _tmain(int argc, _TCHAR* argv[]) > >>> { > >>> #pragma region "Variable declaration" > >>> const double PI = 3.14159265358979323846; > >>> float *angles; > >>> int nProj = 349; > >>> typedef unsigned short pixelType; > >>> typedef float OutpixelType; > >>> const int dimension = 3; > >>> typedef itk::Image imageType; > >>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>> imageType::Pointer Projections = imageType::New(); > >>> > >>> #pragma endregion "Variable declaration" > >>> > >>> Projections = > >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > nProj); > >>> imageType::SpacingType pSpacing; > >>> pSpacing[0] = 0.2960; > >>> pSpacing[1] = 0.2960; > >>> pSpacing[2] = 0.2960; > >>> Projections->SetSpacing(pSpacing); > >>> > >>> imageType::PointType pOrigin; > >>> pOrigin[0] = -212.972; > >>> pOrigin[1] = -212.972; > >>> pOrigin[2] = -212.972; //-158.50; > >>> Projections->SetOrigin(pOrigin); > >>> > >>> Projections->Update(); > >>> > >>> //Read angles. > >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>> angles = new float[nProj]; > >>> angles = readAngles(angles_file, angles); > >>> > >>> #pragma region"Geometry" > >>> // Geometry object > >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>> GeometryType::Pointer geometry = GeometryType::New(); > >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>> { > >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > 0); > >> // 136 half fan //2.07 Kidwai // > >>> } > >>> > >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >> GeometryWriterType; > >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > >>> geometryWriter->SetFilename("D:\\geo.xml"); > >>> geometryWriter->SetObject(geometry); > >>> geometryWriter->WriteFile(); > >>> geometry->Update(); > >>> #pragma endregion "Geometry" > >>> > >>> //Define output image type > >>> > >>> #ifdef USE_CUDA > >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>> #else > >>> typedef itk::Image OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; > >>> #endif > >>> > >>> //ScatterCorrection > >>> typedef rtk::BoellaardScatterCorrectionImageFilter > > >> BoellaardScatterCorrectionImageFilterType; > >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > >> BoellaardScatterCorrectionImageFilterType::New(); > >>> ScatterCorrection->SetInput(Projections); > >>> > >>> //VarianObiRawImageFilter > >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >> RawImageFilterType; > >>> RawImageFilterType::Pointer AttenuationFilter = > >> RawImageFilterType::New(); > >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>> > >>> //Create the output image > >>> typedef rtk::ConstantImageSource< OutPutImageType > > >> ConstantImageSourceType; > >>> ConstantImageSourceType::PointType origin_p; > >>> ConstantImageSourceType::SizeType size_p; > >>> ConstantImageSourceType::SpacingType spacing_p; > >>> ConstantImageSourceType::Pointer projectionsSource = > >> ConstantImageSourceType::New(); > >>> origin_p[0] = -127.5; > >>> origin_p[1] = -127.5; > >>> origin_p[2] = -127.5; > >>> size_p[0] = 512; > >>> size_p[1] = 512; > >>> size_p[2] = 512; > >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>> > >>> projectionsSource->SetOrigin(origin_p); > >>> projectionsSource->SetSpacing(spacing_p); > >>> projectionsSource->SetSize(size_p); > >>> projectionsSource->SetConstant(0); > >>> > >>> // Short scan image filter > >>> PSSFType::Pointer pssf = PSSFType::New(); > >>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>> pssf->SetGeometry(geometry); > >>> pssf->InPlaceOff(); > >>> std::cout << "short scan image filter success" << std::endl; > >>> > >>> FDKType::Pointer feldkamp = FDKType::New(); > >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>> feldkamp->SetInput(1, pssf->GetOutput()); > >>> feldkamp->SetGeometry(geometry); > >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>> feldkamp->SetGPUEnabled(1); > >>> feldkamp->SetNumberOfThreads(10000); > >>> > >>> #pragma region "Write volume" > >>> > >>> //Create a raw io for writing > >>> > >>> itk::RawImageIO::Pointer io; > >>> io = itk::RawImageIO::New(); > >>> > >>> for (unsigned int i = 0; i < dimension; i++) > >>> { > >>> io->SetDimensions(i, size_p[i]); > >>> io->SetSpacing(i, spacing_p[i]); > >>> io->SetOrigin(i, origin_p[i]); > >>> } > >>> io->SetHeaderSize(0); > >>> io->SetByteOrderToLittleEndian(); > >>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>> io->SetNumberOfComponents(1); > >>> io->SetNumberOfDimensions(3); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(feldkamp->GetOutput()); > >>> > >>> try > >>> { > >>> writer->Update(); > >>> } > >>> catch (itk::ExceptionObject & excp) > >>> { > >>> std::cerr << "Error while writing the image " << std::endl; > >>> std::cerr << excp << std::endl; > >>> getchar(); > >>> } > >>> #pragma endregion "WriteVolume" > >>> delete[] angles; > >>> return 0; > >>> } > >>> > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> I was able to perform a reconstruction from your header and geometry > >>>> file, using the following command lines: > >>>> > >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>> --phantomscale "128,128,128" --like Output.mhd > >>>> > >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > --hardware > >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>> > >>>> The first computes projections through a Shepp & Logan phantom, with > the > >>>> same size, spacing, origin, etc... as your projections, using your > >>>> geometry file geo.xml. > >>>> > >>>> The second line performs the FDK reconstruction. I had to use both the > >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>> parts, reconstructs them one by one, then assembles the results. Can > you > >>>> run the same commands and let us know whether you still encounter the > >>>> crash you mentioned ? If it works, you can use your own projection data > >>>> in the second command line instead of "simulatedprojections.mha". > >>>> > >>>> Best, > >>>> > >>>> Cyril > >>>> > >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>> > >>>>> Dear Sir, > >>>>> > >>>>> Please find the Header file in the attachment. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> We do not need the projections file, at least not for a first stage > of > >>>>>> error tracking. We only need the header. > >>>>>> Try the following command line: > >>>>>> > >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>> > >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>>>> what we need, and it is a very light text file. The "proj.raw" > contains > >>>>>> the pixel values, but at the moment we do not need them. We will > create > >>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>> track down the error you encounter. > >>>>>> > >>>>>> Looking forward to receiving your file, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> The single raw file of the projections is 1.4 GB and > we > >> are > >>>> not > >>>>>> able to send this big file to you. Can you please suggest other > >>>> alternatives > >>>>>> for this? > >>>>>>> Or can you provide us the PC configuration to solve > the > >>>> issue? > >>>>>>> Let me know if any other clarification is required. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Hello Zahid, > >>>>>>>> > >>>>>>>> We will need the header of your projections file, too (It is best > if > >>>> you > >>>>>>>> have all your projections as a single .mhd and a single .raw file, > so > >>>> it > >>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>> > >>>>>>>> Regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Cyril Mory, > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> I have only used RTK version 1.3.0. but in the > >> error > >>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>> Please find the attachment of the geometry > file > >> of > >>>> our > >>>>>>>> projections. > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> > >>>>>>>>>> Without some more information, it's unlikely that we find the > >> source > >>>> of > >>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>> therefore > >>>>>>>>>> yourself): > >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes > in > >>>> the > >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>> problem > >>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>> - create a small example that reproduces your problem. You can, > for > >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > logan > >>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>>>> example). And send us the script > >>>>>>>>>> - OR send us your geometry file and the header of your > projections > >>>> file > >>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>> zero-filled > >>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>> > >>>>>>>>>> Best regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>> > >>>>>>>>>>> Please find the screen shot in the > attachment. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>> > >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > CUDA > >>>>>>>> memory > >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > first > >>>> make > >>>>>>>>>> sure > >>>>>>>>>>>> that you use the --lowmem option to stream the projection > images. > >>>> If > >>>>>> it > >>>>>>>>>> is > >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. > >> The > >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > >> of > >>>>>> RTK > >>>>>>>> on > >>>>>>>>>>>> our case studies webpage > >>>>>>>>>> . > >>>>>>>>>>>> Simon > >>>>>>>>>>>> > >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>> reconstruction > >>>>>>>> using > >>>>>>>>>> RTK > >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >>>> shoot > >>>>>> of > >>>>>>>>>>>>> the > >>>>>>>>>>>>>> same. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am using the following items given > below. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>>>> application > >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Please provide the solution of this and > let > >> me > >>>>>> know > >>>>>>>> if > >>>>>>>>>>>> any > >>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, > >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > >> : > >>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>> ________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>> > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: RTK_Error.png Type: image/png Size: 57211 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 10:00:50 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 15:00:50 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> References: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Message-ID: <94e0045d-ef88-726d-9b7b-8b5ebf5ac067@creatis.insa-lyon.fr> Dear Zahid, The output looks correct. If the command line solution I suggested in a previous email works, the best way to move forward would be to compare your code and that of rtkfdk.cxx, and where it differs, make sure you have not introduced an error. Cyril On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. > > Please suggest us for further process. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> I see two errors: >> >> Remove this line >> >> writer->SetNumberOfStreamDivisions(4); >> >> since only the streaming filter, not the write filter, needs to know >> about the number of divisions. >> And change the filename to >> >> "D:\\Output.mhd" >> >> It will write both the .mhd and the .raw files. >> >> I hope it helps, >> Cyril >> >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have modified my file writer code and used >> StreamingImageFilter. Now its not giving any error message but the final >> output is 0 byte for 1024 volume. It working fine for 512 volume. >>> Please check my modified file writer code given below. >>> >>> // Streaming depending on streaming capability of writer >>> typedef itk::StreamingImageFilter >> StreamerType; >>> StreamerType::Pointer streamerBP = StreamerType::New(); >>> streamerBP->SetInput(feldkamp->GetOutput()); >>> streamerBP->SetNumberOfStreamDivisions(4); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(streamerBP->GetOutput()); >>> writer->SetNumberOfStreamDivisions(4); >>> >>> >>> Please let me know if any clarification is required. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> The --divisions is an option of the command-line application rtkfdk. It >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >>>> rather, it is passed to a streaming filter at the end of the pipeline. >>>> Look for the following bit of code in rtkfdk.cxx : >>>> >>>> // Streaming depending on streaming capability of writer >>>> typedef itk::StreamingImageFilter>>> CPUOutputImageType> StreamerType; >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >>>> streamerBP->SetInput( pfeldkamp ); >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >>>> >>>> You can find information on how a streaming filter works on this page: >>>> >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >>>> >>>> I hope it helps, >>>> >>>> Cyril >>>> >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>>>> Dear Cyril Mory, >>>>> >>>>> I have tried but I am not getting where to give >>>> --division 4 in my code. >>>>> Please find my code given below and please let me know >>>> where I need to change in my code to make it work. >>>>> int _tmain(int argc, _TCHAR* argv[]) >>>>> { >>>>> #pragma region "Variable declaration" >>>>> const double PI = 3.14159265358979323846; >>>>> float *angles; >>>>> int nProj = 349; >>>>> typedef unsigned short pixelType; >>>>> typedef float OutpixelType; >>>>> const int dimension = 3; >>>>> typedef itk::Image imageType; >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>>>> imageType::Pointer Projections = imageType::New(); >>>>> >>>>> #pragma endregion "Variable declaration" >>>>> >>>>> Projections = >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> nProj); >>>>> imageType::SpacingType pSpacing; >>>>> pSpacing[0] = 0.2960; >>>>> pSpacing[1] = 0.2960; >>>>> pSpacing[2] = 0.2960; >>>>> Projections->SetSpacing(pSpacing); >>>>> >>>>> imageType::PointType pOrigin; >>>>> pOrigin[0] = -212.972; >>>>> pOrigin[1] = -212.972; >>>>> pOrigin[2] = -212.972; //-158.50; >>>>> Projections->SetOrigin(pOrigin); >>>>> >>>>> Projections->Update(); >>>>> >>>>> //Read angles. >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>>>> angles = new float[nProj]; >>>>> angles = readAngles(angles_file, angles); >>>>> >>>>> #pragma region"Geometry" >>>>> // Geometry object >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>>>> { >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, >> 0); >>>> // 136 half fan //2.07 Kidwai // >>>>> } >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >>>> GeometryWriterType; >>>>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >>>>> geometryWriter->SetObject(geometry); >>>>> geometryWriter->WriteFile(); >>>>> geometry->Update(); >>>>> #pragma endregion "Geometry" >>>>> >>>>> //Define output image type >>>>> >>>>> #ifdef USE_CUDA >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> #else >>>>> typedef itk::Image OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>>>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>>>> #endif >>>>> >>>>> //ScatterCorrection >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter>>> BoellaardScatterCorrectionImageFilterType; >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >>>> BoellaardScatterCorrectionImageFilterType::New(); >>>>> ScatterCorrection->SetInput(Projections); >>>>> >>>>> //VarianObiRawImageFilter >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >>>> RawImageFilterType; >>>>> RawImageFilterType::Pointer AttenuationFilter = >>>> RawImageFilterType::New(); >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>>>> >>>>> //Create the output image >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >>>> ConstantImageSourceType; >>>>> ConstantImageSourceType::PointType origin_p; >>>>> ConstantImageSourceType::SizeType size_p; >>>>> ConstantImageSourceType::SpacingType spacing_p; >>>>> ConstantImageSourceType::Pointer projectionsSource = >>>> ConstantImageSourceType::New(); >>>>> origin_p[0] = -127.5; >>>>> origin_p[1] = -127.5; >>>>> origin_p[2] = -127.5; >>>>> size_p[0] = 512; >>>>> size_p[1] = 512; >>>>> size_p[2] = 512; >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>>>> >>>>> projectionsSource->SetOrigin(origin_p); >>>>> projectionsSource->SetSpacing(spacing_p); >>>>> projectionsSource->SetSize(size_p); >>>>> projectionsSource->SetConstant(0); >>>>> >>>>> // Short scan image filter >>>>> PSSFType::Pointer pssf = PSSFType::New(); >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >>>>> pssf->SetGeometry(geometry); >>>>> pssf->InPlaceOff(); >>>>> std::cout << "short scan image filter success" << std::endl; >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >>>>> feldkamp->SetGeometry(geometry); >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>>>> feldkamp->SetGPUEnabled(1); >>>>> feldkamp->SetNumberOfThreads(10000); >>>>> >>>>> #pragma region "Write volume" >>>>> >>>>> //Create a raw io for writing >>>>> >>>>> itk::RawImageIO::Pointer io; >>>>> io = itk::RawImageIO::New(); >>>>> >>>>> for (unsigned int i = 0; i < dimension; i++) >>>>> { >>>>> io->SetDimensions(i, size_p[i]); >>>>> io->SetSpacing(i, spacing_p[i]); >>>>> io->SetOrigin(i, origin_p[i]); >>>>> } >>>>> io->SetHeaderSize(0); >>>>> io->SetByteOrderToLittleEndian(); >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>>>> io->SetNumberOfComponents(1); >>>>> io->SetNumberOfDimensions(3); >>>>> >>>>> //create a writer and write reconstructed file >>>>> itk::ImageFileWriter::Pointer writer; >>>>> writer = itk::ImageFileWriter::New(); >>>>> writer->SetFileName("D:\\Output.raw"); >>>>> writer->SetImageIO(io); >>>>> writer->SetInput(feldkamp->GetOutput()); >>>>> >>>>> try >>>>> { >>>>> writer->Update(); >>>>> } >>>>> catch (itk::ExceptionObject & excp) >>>>> { >>>>> std::cerr << "Error while writing the image " << std::endl; >>>>> std::cerr << excp << std::endl; >>>>> getchar(); >>>>> } >>>>> #pragma endregion "WriteVolume" >>>>> delete[] angles; >>>>> return 0; >>>>> } >>>>> >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> Senior Design Engineer >>>>> Mobile No. +91-9738379729 >>>>> >>>>> Panacea Medical Technologies Pvt. Ltd. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>> http://www.panaceamedical.com >>>>> Bangalore - India. >>>>> >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> I was able to perform a reconstruction from your header and geometry >>>>>> file, using the following command lines: >>>>>> >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>>>> --phantomscale "128,128,128" --like Output.mhd >>>>>> >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> --hardware >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>>>> >>>>>> The first computes projections through a Shepp & Logan phantom, with >> the >>>>>> same size, spacing, origin, etc... as your projections, using your >>>>>> geometry file geo.xml. >>>>>> >>>>>> The second line performs the FDK reconstruction. I had to use both the >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>>>> parts, reconstructs them one by one, then assembles the results. Can >> you >>>>>> run the same commands and let us know whether you still encounter the >>>>>> crash you mentioned ? If it works, you can use your own projection data >>>>>> in the second command line instead of "simulatedprojections.mha". >>>>>> >>>>>> Best, >>>>>> >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>>>> >>>>>>> Dear Sir, >>>>>>> >>>>>>> Please find the Header file in the attachment. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> We do not need the projections file, at least not for a first stage >> of >>>>>>>> error tracking. We only need the header. >>>>>>>> Try the following command line: >>>>>>>> >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>>>> >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> contains >>>>>>>> the pixel values, but at the moment we do not need them. We will >> create >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>>>> track down the error you encounter. >>>>>>>> >>>>>>>> Looking forward to receiving your file, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Sir, >>>>>>>>> >>>>>>>>> The single raw file of the projections is 1.4 GB and >> we >>>> are >>>>>> not >>>>>>>> able to send this big file to you. Can you please suggest other >>>>>> alternatives >>>>>>>> for this? >>>>>>>>> Or can you provide us the PC configuration to solve >> the >>>>>> issue? >>>>>>>>> Let me know if any other clarification is required. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Hello Zahid, >>>>>>>>>> >>>>>>>>>> We will need the header of your projections file, too (It is best >> if >>>>>> you >>>>>>>>>> have all your projections as a single .mhd and a single .raw file, >> so >>>>>> it >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Cyril Mory, >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I have only used RTK version 1.3.0. but in the >>>> error >>>>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>>>> Please find the attachment of the geometry >> file >>>> of >>>>>> our >>>>>>>>>> projections. >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >>>> Simon >>>>>>>> Rit >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> >>>>>>>>>>>> Without some more information, it's unlikely that we find the >>>> source >>>>>> of >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>>>> therefore >>>>>>>>>>>> yourself): >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes >> in >>>>>> the >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>>>> problem >>>>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>>>> - create a small example that reproduces your problem. You can, >> for >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> logan >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>>>> example). And send us the script >>>>>>>>>>>> - OR send us your geometry file and the header of your >> projections >>>>>> file >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >>>>>> zero-filled >>>>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>>>> >>>>>>>>>>>> Best regards, >>>>>>>>>>>> Cyril >>>>>>>>>>>> >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>>>> >>>>>>>>>>>>> Please find the screen shot in the >> attachment. >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>> >>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>> >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a >> CUDA >>>>>>>>>> memory >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> first >>>>>> make >>>>>>>>>>>> sure >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> images. >>>>>> If >>>>>>>> it >>>>>>>>>>>> is >>>>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >>>> The >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >>>> of >>>>>>>> RTK >>>>>>>>>> on >>>>>>>>>>>>>> our case studies webpage >>>>>>>>>>>> . >>>>>>>>>>>>>> Simon >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>>>> reconstruction >>>>>>>>>> using >>>>>>>>>>>> RTK >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>>>> shoot >>>>>>>> of >>>>>>>>>>>>>>> the >>>>>>>>>>>>>>>> same. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am using the following items given >> below. >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>>>> application >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Please provide the solution of this and >> let >>>> me >>>>>>>> know >>>>>>>>>> if >>>>>>>>>>>>>> any >>>>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >>>> : >>>>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>>>> ________________ >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> This email and any files transmitted with it are confidential >>>> and >>>>>>>>>>>> intended >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >>>>>>>>>>>> addressed. >>>>>>>>>>>>>>> If you have received this email in error please notify the >>>> system >>>>>>>>>>>> manager. >>>>>>>>>>>>>>> Please note that any views or opinions presented in this email >>>> are >>>>>>>>>>>> solely >>>>>>>>>>>>>>> those of the author and do not necessarily represent those of >>>> the >>>>>>>>>>>> company. >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >>>> attachments >>>>>>>> for >>>>>>>>>>>> the >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>>>> damage >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>>>> >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >>> >>> >> >> > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Wed Nov 2 22:38:38 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 02:38:38 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Message-ID: <24189134.77160.1478140718379@mail.yahoo.com> Hello Simon and Cyril,Thanks for the reply.You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do.Thanks again for the reply. @Cyril:Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards,Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 02:05:51 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 06:05:51 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103060551.f7bfa0c3@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, Thank you for your help. We are able to reconstruct 1024 volume now. But the reconstruction time is around 4 minutes. Can you please help us to reduce the reconstruction time? We are using NVIDIA TITAN X GPU which has 12 GB memory. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The output looks correct. > > If the command line solution I suggested in a previous email works, the > best way to move forward would be to compare your code and that of > rtkfdk.cxx, and where it differs, make sure you have not introduced an > error. > > Cyril > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have done the same but the Output.mhd file is still 0 > KB for 1024 volume. Please find the attachment of the status of the output > displayed. > > > > Please suggest us for further process. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> I see two errors: > >> > >> Remove this line > >> > >> writer->SetNumberOfStreamDivisions(4); > >> > >> since only the streaming filter, not the write filter, needs to know > >> about the number of divisions. > >> And change the filename to > >> > >> "D:\\Output.mhd" > >> > >> It will write both the .mhd and the .raw files. > >> > >> I hope it helps, > >> Cyril > >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have modified my file writer code and used > >> StreamingImageFilter. Now its not giving any error message but the final > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > >>> Please check my modified file writer code given below. > >>> > >>> // Streaming depending on streaming capability of writer > >>> typedef itk::StreamingImageFilter > >> StreamerType; > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>> streamerBP->SetInput(feldkamp->GetOutput()); > >>> streamerBP->SetNumberOfStreamDivisions(4); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(streamerBP->GetOutput()); > >>> writer->SetNumberOfStreamDivisions(4); > >>> > >>> > >>> Please let me know if any clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> The --divisions is an option of the command-line application rtkfdk. It > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > >>>> rather, it is passed to a streaming filter at the end of the pipeline. > >>>> Look for the following bit of code in rtkfdk.cxx : > >>>> > >>>> // Streaming depending on streaming capability of writer > >>>> typedef itk::StreamingImageFilter >>>> CPUOutputImageType> StreamerType; > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>>> streamerBP->SetInput( pfeldkamp ); > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >>>> > >>>> You can find information on how a streaming filter works on this page: > >>>> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >>>> > >>>> I hope it helps, > >>>> > >>>> Cyril > >>>> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> I have tried but I am not getting where to give > >>>> --division 4 in my code. > >>>>> Please find my code given below and please let me > know > >>>> where I need to change in my code to make it work. > >>>>> int _tmain(int argc, _TCHAR* argv[]) > >>>>> { > >>>>> #pragma region "Variable declaration" > >>>>> const double PI = 3.14159265358979323846; > >>>>> float *angles; > >>>>> int nProj = 349; > >>>>> typedef unsigned short pixelType; > >>>>> typedef float OutpixelType; > >>>>> const int dimension = 3; > >>>>> typedef itk::Image imageType; > >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>>>> imageType::Pointer Projections = imageType::New(); > >>>>> > >>>>> #pragma endregion "Variable declaration" > >>>>> > >>>>> Projections = > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > >> nProj); > >>>>> imageType::SpacingType pSpacing; > >>>>> pSpacing[0] = 0.2960; > >>>>> pSpacing[1] = 0.2960; > >>>>> pSpacing[2] = 0.2960; > >>>>> Projections->SetSpacing(pSpacing); > >>>>> > >>>>> imageType::PointType pOrigin; > >>>>> pOrigin[0] = -212.972; > >>>>> pOrigin[1] = -212.972; > >>>>> pOrigin[2] = -212.972; //-158.50; > >>>>> Projections->SetOrigin(pOrigin); > >>>>> > >>>>> Projections->Update(); > >>>>> > >>>>> //Read angles. > >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>>>> angles = new float[nProj]; > >>>>> angles = readAngles(angles_file, angles); > >>>>> > >>>>> #pragma region"Geometry" > >>>>> // Geometry object > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>>>> { > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > >> 0); > >>>> // 136 half fan //2.07 Kidwai // > >>>>> } > >>>>> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >>>> GeometryWriterType; > >>>>> GeometryWriterType::Pointer geometryWriter = > GeometryWriterType::New(); > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > >>>>> geometryWriter->SetObject(geometry); > >>>>> geometryWriter->WriteFile(); > >>>>> geometry->Update(); > >>>>> #pragma endregion "Geometry" > >>>>> > >>>>> //Define output image type > >>>>> > >>>>> #ifdef USE_CUDA > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>>>> #else > >>>>> typedef itk::Image OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > FDKType; > >>>>> #endif > >>>>> > >>>>> //ScatterCorrection > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter imageType > >>>> BoellaardScatterCorrectionImageFilterType; > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection > = > >>>> BoellaardScatterCorrectionImageFilterType::New(); > >>>>> ScatterCorrection->SetInput(Projections); > >>>>> > >>>>> //VarianObiRawImageFilter > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >>>> RawImageFilterType; > >>>>> RawImageFilterType::Pointer AttenuationFilter = > >>>> RawImageFilterType::New(); > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>>>> > >>>>> //Create the output image > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > >>>> ConstantImageSourceType; > >>>>> ConstantImageSourceType::PointType origin_p; > >>>>> ConstantImageSourceType::SizeType size_p; > >>>>> ConstantImageSourceType::SpacingType spacing_p; > >>>>> ConstantImageSourceType::Pointer projectionsSource = > >>>> ConstantImageSourceType::New(); > >>>>> origin_p[0] = -127.5; > >>>>> origin_p[1] = -127.5; > >>>>> origin_p[2] = -127.5; > >>>>> size_p[0] = 512; > >>>>> size_p[1] = 512; > >>>>> size_p[2] = 512; > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>>>> > >>>>> projectionsSource->SetOrigin(origin_p); > >>>>> projectionsSource->SetSpacing(spacing_p); > >>>>> projectionsSource->SetSize(size_p); > >>>>> projectionsSource->SetConstant(0); > >>>>> > >>>>> // Short scan image filter > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>>>> pssf->SetGeometry(geometry); > >>>>> pssf->InPlaceOff(); > >>>>> std::cout << "short scan image filter success" << std::endl; > >>>>> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > >>>>> feldkamp->SetGeometry(geometry); > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>>>> feldkamp->SetGPUEnabled(1); > >>>>> feldkamp->SetNumberOfThreads(10000); > >>>>> > >>>>> #pragma region "Write volume" > >>>>> > >>>>> //Create a raw io for writing > >>>>> > >>>>> itk::RawImageIO::Pointer io; > >>>>> io = itk::RawImageIO::New(); > >>>>> > >>>>> for (unsigned int i = 0; i < dimension; i++) > >>>>> { > >>>>> io->SetDimensions(i, size_p[i]); > >>>>> io->SetSpacing(i, spacing_p[i]); > >>>>> io->SetOrigin(i, origin_p[i]); > >>>>> } > >>>>> io->SetHeaderSize(0); > >>>>> io->SetByteOrderToLittleEndian(); > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>>>> io->SetNumberOfComponents(1); > >>>>> io->SetNumberOfDimensions(3); > >>>>> > >>>>> //create a writer and write reconstructed file > >>>>> itk::ImageFileWriter::Pointer writer; > >>>>> writer = itk::ImageFileWriter::New(); > >>>>> writer->SetFileName("D:\\Output.raw"); > >>>>> writer->SetImageIO(io); > >>>>> writer->SetInput(feldkamp->GetOutput()); > >>>>> > >>>>> try > >>>>> { > >>>>> writer->Update(); > >>>>> } > >>>>> catch (itk::ExceptionObject & excp) > >>>>> { > >>>>> std::cerr << "Error while writing the image " << std::endl; > >>>>> std::cerr << excp << std::endl; > >>>>> getchar(); > >>>>> } > >>>>> #pragma endregion "WriteVolume" > >>>>> delete[] angles; > >>>>> return 0; > >>>>> } > >>>>> > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> Senior Design Engineer > >>>>> Mobile No. +91-9738379729 > >>>>> > >>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>> http://www.panaceamedical.com > >>>>> Bangalore - India. > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> I was able to perform a reconstruction from your header and geometry > >>>>>> file, using the following command lines: > >>>>>> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>>>> --phantomscale "128,128,128" --like Output.mhd > >>>>>> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > >> --hardware > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>>>> > >>>>>> The first computes projections through a Shepp & Logan phantom, with > >> the > >>>>>> same size, spacing, origin, etc... as your projections, using your > >>>>>> geometry file geo.xml. > >>>>>> > >>>>>> The second line performs the FDK reconstruction. I had to use both > the > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > (3GB, > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > by > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>>>> parts, reconstructs them one by one, then assembles the results. Can > >> you > >>>>>> run the same commands and let us know whether you still encounter the > >>>>>> crash you mentioned ? If it works, you can use your own projection > data > >>>>>> in the second command line instead of "simulatedprojections.mha". > >>>>>> > >>>>>> Best, > >>>>>> > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>>>> > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> Please find the Header file in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> We do not need the projections file, at least not for a first stage > >> of > >>>>>>>> error tracking. We only need the header. > >>>>>>>> Try the following command line: > >>>>>>>> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>>>> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file > is > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > >> contains > >>>>>>>> the pixel values, but at the moment we do not need them. We will > >> create > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>>>> track down the error you encounter. > >>>>>>>> > >>>>>>>> Looking forward to receiving your file, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Sir, > >>>>>>>>> > >>>>>>>>> The single raw file of the projections is 1.4 GB > and > >> we > >>>> are > >>>>>> not > >>>>>>>> able to send this big file to you. Can you please suggest other > >>>>>> alternatives > >>>>>>>> for this? > >>>>>>>>> Or can you provide us the PC configuration to solve > >> the > >>>>>> issue? > >>>>>>>>> Let me know if any other clarification is required. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Hello Zahid, > >>>>>>>>>> > >>>>>>>>>> We will need the header of your projections file, too (It is best > >> if > >>>>>> you > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > file, > >> so > >>>>>> it > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>>>> > >>>>>>>>>> Regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Cyril Mory, > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> I have only used RTK version 1.3.0. but in > the > >>>> error > >>>>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>>>> Please find the attachment of the geometry > >> file > >>>> of > >>>>>> our > >>>>>>>>>> projections. > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >>>> Simon > >>>>>>>> Rit > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > >>>> source > >>>>>> of > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>>>> therefore > >>>>>>>>>>>> yourself): > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > changes > >> in > >>>>>> the > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>>>> problem > >>>>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>>>> - create a small example that reproduces your problem. You can, > >> for > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > >> logan > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > an > >>>>>>>>>>>> example). And send us the script > >>>>>>>>>>>> - OR send us your geometry file and the header of your > >> projections > >>>>>> file > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>>>> zero-filled > >>>>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>>>> > >>>>>>>>>>>> Best regards, > >>>>>>>>>>>> Cyril > >>>>>>>>>>>> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>>>> > >>>>>>>>>>>>> Please find the screen shot in the > >> attachment. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>> > >>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > >> CUDA > >>>>>>>>>> memory > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > >> first > >>>>>> make > >>>>>>>>>>>> sure > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > >> images. > >>>>>> If > >>>>>>>> it > >>>>>>>>>>>> is > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > --divisions. > >>>> The > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > use > >>>> of > >>>>>>>> RTK > >>>>>>>>>> on > >>>>>>>>>>>>>> our case studies webpage > >>>>>>>>>>>> . > >>>>>>>>>>>>>> Simon > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>>>> reconstruction > >>>>>>>>>> using > >>>>>>>>>>>> RTK > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > screen > >>>>>> shoot > >>>>>>>> of > >>>>>>>>>>>>>>> the > >>>>>>>>>>>>>>>> same. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am using the following items given > >> below. > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > console > >>>>>>>> application > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Please provide the solution of this > and > >> let > >>>> me > >>>>>>>> know > >>>>>>>>>> if > >>>>>>>>>>>>>> any > >>>>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > >> Url > >>>> : > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>>>> ________________ > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> This email and any files transmitted with it are > confidential > >>>> and > >>>>>>>>>>>> intended > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they > >> are > >>>>>>>>>>>> addressed. > >>>>>>>>>>>>>>> If you have received this email in error please notify the > >>>> system > >>>>>>>>>>>> manager. > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > email > >>>> are > >>>>>>>>>>>> solely > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > of > >>>> the > >>>>>>>>>>>> company. > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > >>>> attachments > >>>>>>>> for > >>>>>>>>>>>> the > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > >>>>>> damage > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>>>> > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Thu Nov 3 02:23:25 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 3 Nov 2016 07:23:25 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <24189134.77160.1478140718379@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> Message-ID: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): {\begin{aligned}&\mathbf {r} _{0}:=\mathbf {b} -\mathbf {Ax} _{0}\\&\mathbf {p} _{0}:=\mathbf {r} _{0}\\&k:=0\\&{\hbox{repeat}}\\&\qquad \alpha _{k}:={\frac {\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}{\mathbf {p} _{k}^{\mathsf {T}}\mathbf {Ap} _{k}}}\\&\qquad \mathbf {x} _{k+1}:=\mathbf {x} _{k}+\alpha _{k}\mathbf {p} _{k}\\&\qquad \mathbf {r} _{k+1}:=\mathbf {r} _{k}-\alpha _{k}\mathbf {Ap} _{k}\\&\qquad {\hbox{if }}r_{k+1}{\hbox{ is sufficiently small then exit loop}}\\&\qquad \beta _{k}:={\frac {\mathbf {r} _{k+1}^{\mathsf {T}}\mathbf {r} _{k+1}}{\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}}\\&\qquad \mathbf {p} _{k+1}:=\mathbf {r} _{k+1}+\beta _{k}\mathbf {p} _{k}\\&\qquad k:=k+1\\&{\hbox{end repeat}}\\&{\hbox{The result is }}\mathbf {x} _{k+1}\end{aligned}} In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: > Hello Simon and Cyril, > Thanks for the reply. > You are right Simon. I did not notice it too in the literature. The > main problem as you said is the storage. Actually I developed the > conjugate gradient (CG), quasi-Newton and Newton optimization methods > for optical tomography and I intended to apply them to the CT > reconstruction as well. I implemented the Newton's methods > (Gauss-Newton and Levenberg-Marquardt) in a > Jacobian-Free-Newton-Krylov approaches to avoid the matrix > multiplication of Jacobians (sensitivity). It means we only need to > store the Jacobian matrix for the these methods (the matrix R that > Cyril was mentioned), that is still a big matrix for practical > problems in CT reconstruction. For the quasi-Newton I adapted an > L-BFGS algorithm that only need the 3 or 8 last iterations of the > gradient vector to calculate the Hessian matrix. In my case, the > L-BFGS and Newton's methods was much faster than the CG as you know > because of using the second order derivative (hessian matrix). I saw > in your last paper you implement the conjugate gradient method, so I > thought it might be easy to extract the gradient vector from CG > modules and solve the cost function within the quasi-Newton/Newton > methods. I will look at the codes to see what I can do. > Thanks again for the reply. > > @Cyril: > Please correct me if I am wrong. you mean the output of > backProjectionFilter is the gradient of defined cost function? > > Regards, > Vahid > > > On Wednesday, November 2, 2016 2:53 AM, Cyril Mory > wrote: > > > Hi Vahid, > Welcome to RTK :) > Indeed, there are several iterative methods already implemented in > RTK, but none of the filters allows you to easily extract the gradient > of the least squares function there are minimizing. > If you need to minimize the classical non-regularized tomographic cost > function, ie || R f - p ||?, with R the forward projection operator, f > the volume you are looking for, and p the measured projections, my > best advice would be to copy some part of the pipeline of > rtkSARTConeBeamReconstructionFilter to get the job done, ie the > following part (copy-paste this into webgraphviz.com) > > digraph SARTConeBeamReconstructionFilter { > > Input0 [ label="Input 0 (Volume)"]; > Input0 [shape=Mdiamond]; > Input1 [label="Input 1 (Projections)"]; > Input1 [shape=Mdiamond]; > > node [shape=box]; > ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref > rtk::ForwardProjectionImageFilter"]; > Extract [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref > itk::MultiplyImageFilter"]; > AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; > Subtract [ label="itk::SubtractImageFilter" URL="\ref > itk::SubtractImageFilter"]; > MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" > URL="\ref itk::MultiplyImageFilter"]; > Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref > itk::DivideOrZeroOutImageFilter"]; > GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" > URL="\ref itk::MultiplyImageFilter", style=dashed]; > Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref > rtk::DisplacedDetectorImageFilter"]; > ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref > rtk::RayBoxIntersectionImageFilter"]; > ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref > rtk::BackProjectionImageFilter"]; > OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; > OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; > Input0 -> OutofInput0 [arrowhead=none]; > OutofInput0 -> ForwardProject; > ConstantVolume -> BeforeBP [arrowhead=none]; > BeforeBP -> BackProjection; > Extract -> AfterExtract[arrowhead=none]; > AfterExtract -> MultiplyByZero; > AfterExtract -> Subtract; > MultiplyByZero -> ForwardProject; > Input1 -> Extract; > ForwardProject -> Subtract; > Subtract -> MultiplyByLambda; > MultiplyByLambda -> Divide; > Divide -> GatingWeight; > GatingWeight -> Displaced; > ConstantProjectionStack -> ExtractConstantProjection; > ExtractConstantProjection -> RayBox; > RayBox -> Divide; > Displaced -> BackProjection; > BackProjection -> OutofBP [arrowhead=none]; > } > > As you can see, it is a very large part of the SART reconstruction > filter, so yoiu might be better off just copying the whole > SARTConeBeamReconstructionFilter and modifying it. > > Of course, you could also look into ITK's cost function class, and see > if one of the classes inherited from it suits your needs, implement > your cost function this way, and use ITK's off-the-shelf solvers to > minimize it. See the inheritance diagram in > https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if > you want to try this approach. > > Best regards, > Cyril > > On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >> Hello RTK users and developers, >> >> I already implemented the RTK and reconstructed some images with the >> FDK algorithm implemented in RTK. It works well. Thanks to RTK >> developers. >> Now, I am trying to develop a model-based image reconstruction for >> our cone-beam micro-CT. I see already that some iterative algorithms >> like ART and its modifications and conjugate-gradient (CG) method are >> implemented in the RTK. I want to develop a model-based >> reconstruction through the Newton/quasi-Newton optimizations methods. >> I was wondering is it possible to extract the gradient of least >> square function from implemented algorithms like CG module? Any >> recommendation will be appreciated. >> >> Best Regards, >> Vahid >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 10:21:11 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 14:21:11 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. The RTKScatterGlareCorrectionImageFilter code is given below. //rtkLagCorrectionImageFilter typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); LagCorrection->SetInput(Projections); //rtkScatterGlareCorrectionImageFilter typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Cyril Mory, > > > Thank you for your help. We are able to reconstruct 1024 > volume now. > > But the reconstruction time is around 4 minutes. Can you > please help us to reduce the reconstruction time? > > We are using NVIDIA TITAN X GPU which has 12 GB memory. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > Dear Zahid, > > > > The output looks correct. > > > > If the command line solution I suggested in a previous email works, the > > best way to move forward would be to compare your code and that of > > rtkfdk.cxx, and where it differs, make sure you have not introduced an > > error. > > > > Cyril > > > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > > Dear Cyril Mory, > > > > > > I have done the same but the Output.mhd file is still 0 > > KB for 1024 volume. Please find the attachment of the status of the output > > displayed. > > > > > > Please suggest us for further process. > > > > > > > > > Thanks & Regards > > > > > > Zahid Hasan Ansari > > > > > > > > > > > > > > > ----- Original Message ----- > > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > > [mailto:simon.rit at creatis.insa-lyon.fr] > > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > > > > >> I see two errors: > > >> > > >> Remove this line > > >> > > >> writer->SetNumberOfStreamDivisions(4); > > >> > > >> since only the streaming filter, not the write filter, needs to know > > >> about the number of divisions. > > >> And change the filename to > > >> > > >> "D:\\Output.mhd" > > >> > > >> It will write both the .mhd and the .raw files. > > >> > > >> I hope it helps, > > >> Cyril > > >> > > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > >>> Dear Cyril Mory, > > >>> > > >>> I have modified my file writer code and used > > >> StreamingImageFilter. Now its not giving any error message but the > final > > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > > >>> Please check my modified file writer code given > below. > > >>> > > >>> // Streaming depending on streaming capability of writer > > >>> typedef itk::StreamingImageFilter > > >> StreamerType; > > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>> streamerBP->SetInput(feldkamp->GetOutput()); > > >>> streamerBP->SetNumberOfStreamDivisions(4); > > >>> > > >>> //create a writer and write reconstructed file > > >>> itk::ImageFileWriter::Pointer writer; > > >>> writer = itk::ImageFileWriter::New(); > > >>> writer->SetFileName("D:\\Output.raw"); > > >>> writer->SetImageIO(io); > > >>> writer->SetInput(streamerBP->GetOutput()); > > >>> writer->SetNumberOfStreamDivisions(4); > > >>> > > >>> > > >>> Please let me know if any clarification is required. > > >>> > > >>> > > >>> Thanks & Regards > > >>> > > >>> Zahid Hasan Ansari > > >>> Senior Design Engineer > > >>> Mobile No. +91-9738379729 > > >>> > > >>> Panacea Medical Technologies Pvt. Ltd. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >> http://www.panaceamedical.com > > >>> Bangalore - India. > > >>> > > >>> > > >>> > > >>> > > >>> ----- Original Message ----- > > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > > Rit > > >> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>> > > >>> > > >>>> Dear Zahid, > > >>>> > > >>>> The --divisions is an option of the command-line application rtkfdk. > It > > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > > >>>> rather, it is passed to a streaming filter at the end of the > pipeline. > > >>>> Look for the following bit of code in rtkfdk.cxx : > > >>>> > > >>>> // Streaming depending on streaming capability of writer > > >>>> typedef itk::StreamingImageFilter > >>>> CPUOutputImageType> StreamerType; > > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>>> streamerBP->SetInput( pfeldkamp ); > > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg > ); > > >>>> > > >>>> You can find information on how a streaming filter works on this > page: > > >>>> > > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > >>>> > > >>>> I hope it helps, > > >>>> > > >>>> Cyril > > >>>> > > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > >>>>> Dear Cyril Mory, > > >>>>> > > >>>>> I have tried but I am not getting where to give > > >>>> --division 4 in my code. > > >>>>> Please find my code given below and please let me > > know > > >>>> where I need to change in my code to make it work. > > >>>>> int _tmain(int argc, _TCHAR* argv[]) > > >>>>> { > > >>>>> #pragma region "Variable declaration" > > >>>>> const double PI = 3.14159265358979323846; > > >>>>> float *angles; > > >>>>> int nProj = 349; > > >>>>> typedef unsigned short pixelType; > > >>>>> typedef float OutpixelType; > > >>>>> const int dimension = 3; > > >>>>> typedef itk::Image imageType; > > >>>>> typedef itk::ImageRegionConstIterator > ImageIteratorType; > > >>>>> imageType::Pointer Projections = imageType::New(); > > >>>>> > > >>>>> #pragma endregion "Variable declaration" > > >>>>> > > >>>>> Projections = > > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > > >> nProj); > > >>>>> imageType::SpacingType pSpacing; > > >>>>> pSpacing[0] = 0.2960; > > >>>>> pSpacing[1] = 0.2960; > > >>>>> pSpacing[2] = 0.2960; > > >>>>> Projections->SetSpacing(pSpacing); > > >>>>> > > >>>>> imageType::PointType pOrigin; > > >>>>> pOrigin[0] = -212.972; > > >>>>> pOrigin[1] = -212.972; > > >>>>> pOrigin[2] = -212.972; //-158.50; > > >>>>> Projections->SetOrigin(pOrigin); > > >>>>> > > >>>>> Projections->Update(); > > >>>>> > > >>>>> //Read angles. > > >>>>> char *angles_file = > "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > >>>>> angles = new float[nProj]; > > >>>>> angles = readAngles(angles_file, angles); > > >>>>> > > >>>>> #pragma region"Geometry" > > >>>>> // Geometry object > > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > > >>>>> { > > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, > 0, > > >> 0); > > >>>> // 136 half fan //2.07 Kidwai // > > >>>>> } > > >>>>> > > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > > >>>> GeometryWriterType; > > >>>>> GeometryWriterType::Pointer geometryWriter = > > GeometryWriterType::New(); > > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > > >>>>> geometryWriter->SetObject(geometry); > > >>>>> geometryWriter->WriteFile(); > > >>>>> geometry->Update(); > > >>>>> #pragma endregion "Geometry" > > >>>>> > > >>>>> //Define output image type > > >>>>> > > >>>>> #ifdef USE_CUDA > > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > > PSSFType; > > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > >>>>> #else > > >>>>> typedef itk::Image OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter > PSSFType; > > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > > FDKType; > > >>>>> #endif > > >>>>> > > >>>>> //ScatterCorrection > > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter > imageType > > >>>> BoellaardScatterCorrectionImageFilterType; > > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer > ScatterCorrection > > = > > >>>> BoellaardScatterCorrectionImageFilterType::New(); > > >>>>> ScatterCorrection->SetInput(Projections); > > >>>>> > > >>>>> //VarianObiRawImageFilter > > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > > >>>> RawImageFilterType; > > >>>>> RawImageFilterType::Pointer AttenuationFilter = > > >>>> RawImageFilterType::New(); > > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > >>>>> > > >>>>> //Create the output image > > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > > >>>> ConstantImageSourceType; > > >>>>> ConstantImageSourceType::PointType origin_p; > > >>>>> ConstantImageSourceType::SizeType size_p; > > >>>>> ConstantImageSourceType::SpacingType spacing_p; > > >>>>> ConstantImageSourceType::Pointer projectionsSource = > > >>>> ConstantImageSourceType::New(); > > >>>>> origin_p[0] = -127.5; > > >>>>> origin_p[1] = -127.5; > > >>>>> origin_p[2] = -127.5; > > >>>>> size_p[0] = 512; > > >>>>> size_p[1] = 512; > > >>>>> size_p[2] = 512; > > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > >>>>> > > >>>>> projectionsSource->SetOrigin(origin_p); > > >>>>> projectionsSource->SetSpacing(spacing_p); > > >>>>> projectionsSource->SetSize(size_p); > > >>>>> projectionsSource->SetConstant(0); > > >>>>> > > >>>>> // Short scan image filter > > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > > >>>>> pssf->SetGeometry(geometry); > > >>>>> pssf->InPlaceOff(); > > >>>>> std::cout << "short scan image filter success" << std::endl; > > >>>>> > > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > > >>>>> feldkamp->SetGeometry(geometry); > > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > >>>>> feldkamp->SetGPUEnabled(1); > > >>>>> feldkamp->SetNumberOfThreads(10000); > > >>>>> > > >>>>> #pragma region "Write volume" > > >>>>> > > >>>>> //Create a raw io for writing > > >>>>> > > >>>>> itk::RawImageIO::Pointer io; > > >>>>> io = itk::RawImageIO::New(); > > >>>>> > > >>>>> for (unsigned int i = 0; i < dimension; i++) > > >>>>> { > > >>>>> io->SetDimensions(i, size_p[i]); > > >>>>> io->SetSpacing(i, spacing_p[i]); > > >>>>> io->SetOrigin(i, origin_p[i]); > > >>>>> } > > >>>>> io->SetHeaderSize(0); > > >>>>> io->SetByteOrderToLittleEndian(); > > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > > >>>>> io->SetNumberOfComponents(1); > > >>>>> io->SetNumberOfDimensions(3); > > >>>>> > > >>>>> //create a writer and write reconstructed file > > >>>>> itk::ImageFileWriter::Pointer writer; > > >>>>> writer = itk::ImageFileWriter::New(); > > >>>>> writer->SetFileName("D:\\Output.raw"); > > >>>>> writer->SetImageIO(io); > > >>>>> writer->SetInput(feldkamp->GetOutput()); > > >>>>> > > >>>>> try > > >>>>> { > > >>>>> writer->Update(); > > >>>>> } > > >>>>> catch (itk::ExceptionObject & excp) > > >>>>> { > > >>>>> std::cerr << "Error while writing the image " << std::endl; > > >>>>> std::cerr << excp << std::endl; > > >>>>> getchar(); > > >>>>> } > > >>>>> #pragma endregion "WriteVolume" > > >>>>> delete[] angles; > > >>>>> return 0; > > >>>>> } > > >>>>> > > >>>>> > > >>>>> > > >>>>> Thanks & Regards > > >>>>> > > >>>>> Zahid Hasan Ansari > > >>>>> Senior Design Engineer > > >>>>> Mobile No. +91-9738379729 > > >>>>> > > >>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >>>> http://www.panaceamedical.com > > >>>>> Bangalore - India. > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> ----- Original Message ----- > > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > > >> Rit > > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>> > > >>>>> > > >>>>>> Dear Zahid, > > >>>>>> > > >>>>>> I was able to perform a reconstruction from your header and > geometry > > >>>>>> file, using the following command lines: > > >>>>>> > > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > > >>>>>> --phantomscale "128,128,128" --like Output.mhd > > >>>>>> > > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > > >> --hardware > > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > >>>>>> > > >>>>>> The first computes projections through a Shepp & Logan phantom, > with > > >> the > > >>>>>> same size, spacing, origin, etc... as your projections, using your > > >>>>>> geometry file geo.xml. > > >>>>>> > > >>>>>> The second line performs the FDK reconstruction. I had to use both > > the > > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > > (3GB, > > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > > by > > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > > >>>>>> parts, reconstructs them one by one, then assembles the results. > Can > > >> you > > >>>>>> run the same commands and let us know whether you still encounter > the > > >>>>>> crash you mentioned ? If it works, you can use your own projection > > data > > >>>>>> in the second command line instead of "simulatedprojections.mha". > > >>>>>> > > >>>>>> Best, > > >>>>>> > > >>>>>> Cyril > > >>>>>> > > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > >>>>>> > > >>>>>>> Dear Sir, > > >>>>>>> > > >>>>>>> Please find the Header file in the attachment. > > >>>>>>> > > >>>>>>> > > >>>>>>> Thanks & Regards > > >>>>>>> > > >>>>>>> Zahid Hasan Ansari > > >>>>>>> > > >>>>>>> > > >>>>>>> ----- Original Message ----- > > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > Simon > > >>>> Rit > > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>> > > >>>>>>> > > >>>>>>>> Dear Zahid, > > >>>>>>>> > > >>>>>>>> We do not need the projections file, at least not for a first > stage > > >> of > > >>>>>>>> error tracking. We only need the header. > > >>>>>>>> Try the following command line: > > >>>>>>>> > > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > > >>>>>>>> > > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" > file > > is > > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > > >> contains > > >>>>>>>> the pixel values, but at the moment we do not need them. We will > > >> create > > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough > to > > >>>>>>>> track down the error you encounter. > > >>>>>>>> > > >>>>>>>> Looking forward to receiving your file, > > >>>>>>>> Cyril > > >>>>>>>> > > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > > >>>>>>>>> Dear Sir, > > >>>>>>>>> > > >>>>>>>>> The single raw file of the projections is 1.4 GB > > and > > >> we > > >>>> are > > >>>>>> not > > >>>>>>>> able to send this big file to you. Can you please suggest other > > >>>>>> alternatives > > >>>>>>>> for this? > > >>>>>>>>> Or can you provide us the PC configuration to > solve > > >> the > > >>>>>> issue? > > >>>>>>>>> Let me know if any other clarification is > required. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> Thanks & Regards > > >>>>>>>>> > > >>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> ----- Original Message ----- > > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > >> Simon > > >>>>>> Rit > > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>>> Hello Zahid, > > >>>>>>>>>> > > >>>>>>>>>> We will need the header of your projections file, too (It is > best > > >> if > > >>>>>> you > > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > > file, > > >> so > > >>>>>> it > > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > > >>>>>>>>>> > > >>>>>>>>>> Regards, > > >>>>>>>>>> Cyril > > >>>>>>>>>> > > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>> Dear Cyril Mory, > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> I have only used RTK version 1.3.0. but > in > > the > > >>>> error > > >>>>>>>>>> message it is showing RTK version 1.2.0. > > >>>>>>>>>>> Please find the attachment of the > geometry > > >> file > > >>>> of > > >>>>>> our > > >>>>>>>>>> projections. > > >>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>> > > >>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com], > > >>>> Simon > > >>>>>>>> Rit > > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, > saimahesh.m at panaceamedical.com > > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>> > > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > > >>>> source > > >>>>>> of > > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > > >>>>>> therefore > > >>>>>>>>>>>> yourself): > > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > > changes > > >> in > > >>>>>> the > > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so > your > > >>>>>> problem > > >>>>>>>>>>>> might disappear just by upgrading to the new version > > >>>>>>>>>>>> - create a small example that reproduces your problem. You > can, > > >> for > > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > > >> logan > > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look > at > > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > > an > > >>>>>>>>>>>> example). And send us the script > > >>>>>>>>>>>> - OR send us your geometry file and the header of your > > >> projections > > >>>>>> file > > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > > >>>>>> zero-filled > > >>>>>>>>>>>> stack of projections), and the command line that crashes > > >>>>>>>>>>>> > > >>>>>>>>>>>> Best regards, > > >>>>>>>>>>>> Cyril > > >>>>>>>>>>>> > > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>>>> Dear Simon Rit, > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Please find the screen shot in the > > >> attachment. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > > : > > >>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>>>> To: Zahid Hasan Ansari > > [mailto:zahidhasan.a at panaceamedical.com] > > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > > >>>>>>>> [mailto:rtk-users at public.kitware.com], > > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is > a > > >> CUDA > > >>>>>>>>>> memory > > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > > >> first > > >>>>>> make > > >>>>>>>>>>>> sure > > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > > >> images. > > >>>>>> If > > >>>>>>>> it > > >>>>>>>>>>>> is > > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > > --divisions. > > >>>> The > > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > > use > > >>>> of > > >>>>>>>> RTK > > >>>>>>>>>> on > > >>>>>>>>>>>>>> our case studies webpage > > >>>>>>>>>>>> . > > >>>>>>>>>>>>>> Simon > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Dear Sir\Madam, > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > > >>>>>> reconstruction > > >>>>>>>>>> using > > >>>>>>>>>>>> RTK > > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > > screen > > >>>>>> shoot > > >>>>>>>> of > > >>>>>>>>>>>>>>> the > > >>>>>>>>>>>>>>>> same. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am using the following items > given > > >> below. > > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > > console > > >>>>>>>> application > > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > > >>>>>>>>>>>>>>>> 5. CUDA 7. > > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Please provide the solution of this > > and > > >> let > > >>>> me > > >>>>>>>> know > > >>>>>>>>>> if > > >>>>>>>>>>>>>> any > > >>>>>>>>>>>>>>>> other clarification is required. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, > > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 > | > > >> Url > > >>>> : > > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>>>> > ____________________________________________________________ > > >>>>>>>>>>>>>>> ________________ > > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> This email and any files transmitted with it are > > confidential > > >>>> and > > >>>>>>>>>>>> intended > > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom > they > > >> are > > >>>>>>>>>>>> addressed. > > >>>>>>>>>>>>>>> If you have received this email in error please notify the > > >>>> system > > >>>>>>>>>>>> manager. > > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > > email > > >>>> are > > >>>>>>>>>>>> solely > > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > > of > > >>>> the > > >>>>>>>>>>>> company. > > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > > >>>> attachments > > >>>>>>>> for > > >>>>>>>>>>>> the > > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > > any > > >>>>>> damage > > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> This email and any files transmitted with it are > confidential > > >> and > > >>>>>>>>>> intended > > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > > are > > >>>>>>>>>> addressed. > > >>>>>>>>>>>>> If you have received this email in error please notify the > > >> system > > >>>>>>>>>> manager. > > >>>>>>>>>>>>> Please note that any views or opinions presented in this > email > > >> are > > >>>>>>>>>> solely > > >>>>>>>>>>>>> those of the author and do not necessarily represent those > of > > >> the > > >>>>>>>>>> company. > > >>>>>>>>>>>>> Finally, the recipient should check this email and any > > >> attachments > > >>>>>> for > > >>>>>>>>>> the > > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > > >>>> damage > > >>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>> ________________________________________ > > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > Area > > >>>>>> Phase > > >>>>>>>> 1, > > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > Industrial > > >>>>>> Area, > > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>> > > >>>>>>>>>>> This email and any files transmitted with it are confidential > > and > > >>>>>>>> intended > > >>>>>>>>>>> solely for the use of the individual or entity to whom they > are > > >>>>>>>> addressed. > > >>>>>>>>>>> If you have received this email in error please notify the > > system > > >>>>>>>> manager. > > >>>>>>>>>>> Please note that any views or opinions presented in this email > > are > > >>>>>>>> solely > > >>>>>>>>>>> those of the author and do not necessarily represent those of > > the > > >>>>>>>> company. > > >>>>>>>>>>> Finally, the recipient should check this email and any > > attachments > > >>>> for > > >>>>>>>> the > > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > > >> damage > > >>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>> > > >>>>>>>>> ________________________________________ > > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > > >>>> Phase > > >>>>>> 1, > > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > > >>>> Area, > > >>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>> > > >>>>>>>>> This email and any files transmitted with it are confidential > and > > >>>>>> intended > > >>>>>>>>> solely for the use of the individual or entity to whom they are > > >>>>>> addressed. > > >>>>>>>>> If you have received this email in error please notify the > system > > >>>>>> manager. > > >>>>>>>>> Please note that any views or opinions presented in this email > are > > >>>>>> solely > > >>>>>>>>> those of the author and do not necessarily represent those of > the > > >>>>>> company. > > >>>>>>>>> Finally, the recipient should check this email and any > attachments > > >> for > > >>>>>> the > > >>>>>>>>> presence of viruses. The company accepts no liability for any > > damage > > >>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>> ________________________________________ > > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > >> Phase > > >>>> 1, > > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > >> Area, > > >>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>> Fax : + 91 80 42428710 > > >>>>>>> Url : http://www.panaceamedical.com > > >>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>> > > >>>>>>> This email and any files transmitted with it are confidential and > > >>>> intended > > >>>>>>> solely for the use of the individual or entity to whom they are > > >>>> addressed. > > >>>>>>> If you have received this email in error please notify the system > > >>>> manager. > > >>>>>>> Please note that any views or opinions presented in this email are > > >>>> solely > > >>>>>>> those of the author and do not necessarily represent those of the > > >>>> company. > > >>>>>>> Finally, the recipient should check this email and any attachments > > for > > >>>> the > > >>>>>>> presence of viruses. The company accepts no liability for any > damage > > >>>>>>> caused by any virus transmitted by this email. > > >>>>>>> > > >>>>> ________________________________________ > > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>> Fax : + 91 80 42428710 > > >>>>> Url : http://www.panaceamedical.com > > >>>>> > > >> > > > ____________________________________________________________________________ > > >>>>> PMT EMAIL DISCLAIMER: > > >>>>> > > >>>>> This email and any files transmitted with it are confidential and > > >> intended > > >>>>> solely for the use of the individual or entity to whom they are > > >> addressed. > > >>>>> If you have received this email in error please notify the system > > >> manager. > > >>>>> Please note that any views or opinions presented in this email are > > >> solely > > >>>>> those of the author and do not necessarily represent those of the > > >> company. > > >>>>> Finally, the recipient should check this email and any attachments > for > > >> the > > >>>>> presence of viruses. The company accepts no liability for any damage > > >>>>> caused by any virus transmitted by this email. > > >>>>> > > >>>>> > > >>>>> > > >>>> > > >>> ________________________________________ > > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 > > >>> Fax : + 91 80 42428710 > > >>> Url : http://www.panaceamedical.com > > >>> > > >> > > > ____________________________________________________________________________ > > >>> PMT EMAIL DISCLAIMER: > > >>> > > >>> This email and any files transmitted with it are confidential and > > intended > > >>> solely for the use of the individual or entity to whom they are > > addressed. > > >>> If you have received this email in error please notify the system > > manager. > > >>> Please note that any views or opinions presented in this email are > > solely > > >>> those of the author and do not necessarily represent those of the > > company. > > >>> Finally, the recipient should check this email and any attachments for > > the > > >>> presence of viruses. The company accepts no liability for any damage > > >>> caused by any virus transmitted by this email. > > >>> > > >>> > > >>> > > >>> > > >>> > > >> > > >> > > > > > > ________________________________________ > > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > > Malur - 563130. Kolar District. INDIA. > > > > > > Tel : +91 80 4242 8700 / 2845 4785 > > > Fax : + 91 80 42428710 > > > Url : http://www.panaceamedical.com > > > > > > ____________________________________________________________________________ > > > PMT EMAIL DISCLAIMER: > > > > > > This email and any files transmitted with it are confidential and > intended > > > solely for the use of the individual or entity to whom they are > addressed. > > > If you have received this email in error please notify the system > manager. > > > Please note that any views or opinions presented in this email are > solely > > > those of the author and do not necessarily represent those of the > company. > > > Finally, the recipient should check this email and any attachments for > the > > > presence of viruses. The company accepts no liability for any damage > > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: ScatterGlareError.png Type: image/png Size: 121487 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 3 10:28:49 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 3 Nov 2016 15:28:49 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> References: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Message-ID: Hi, I think you should look at the applications before posting a question on the mailing list. There is a rtkscatterglarecorrection tool, look at rtkscatterglarecorrection.cxx. You must init the coefficients. I'll add a check to make the error message more readable but please, take the time to look at all the examples available in applications before posting a question. Thanks, Simon On Thu, Nov 3, 2016 at 3:21 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > > We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. > > The RTKScatterGlareCorrectionImageFilter code is given below. > > //rtkLagCorrectionImageFilter > typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; > LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); > LagCorrection->SetInput(Projections); > > //rtkScatterGlareCorrectionImageFilter > typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; > ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); > ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); > > > > > > Thanks & Regards > > Zahid Hasan Ansari > > > > ----- Original Message ----- > From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Cyril Mory, >> >> >> Thank you for your help. We are able to reconstruct 1024 >> volume now. >> >> But the reconstruction time is around 4 minutes. Can you >> please help us to reduce the reconstruction time? >> >> We are using NVIDIA TITAN X GPU which has 12 GB memory. >> >> >> Thanks & Regards >> >> Zahid Hasan Ansari >> >> >> >> >> ----- Original Message ----- >> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> >> >> > Dear Zahid, >> > >> > The output looks correct. >> > >> > If the command line solution I suggested in a previous email works, the >> > best way to move forward would be to compare your code and that of >> > rtkfdk.cxx, and where it differs, make sure you have not introduced an >> > error. >> > >> > Cyril >> > >> > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: >> > > Dear Cyril Mory, >> > > >> > > I have done the same but the Output.mhd file is still 0 >> > KB for 1024 volume. Please find the attachment of the status of the output >> > displayed. >> > > >> > > Please suggest us for further process. >> > > >> > > >> > > Thanks & Regards >> > > >> > > Zahid Hasan Ansari >> > > >> > > >> > > >> > > >> > > ----- Original Message ----- >> > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >> > [mailto:simon.rit at creatis.insa-lyon.fr] >> > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > > >> > > >> > >> I see two errors: >> > >> >> > >> Remove this line >> > >> >> > >> writer->SetNumberOfStreamDivisions(4); >> > >> >> > >> since only the streaming filter, not the write filter, needs to know >> > >> about the number of divisions. >> > >> And change the filename to >> > >> >> > >> "D:\\Output.mhd" >> > >> >> > >> It will write both the .mhd and the .raw files. >> > >> >> > >> I hope it helps, >> > >> Cyril >> > >> >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >> > >>> Dear Cyril Mory, >> > >>> >> > >>> I have modified my file writer code and used >> > >> StreamingImageFilter. Now its not giving any error message but the >> final >> > >> output is 0 byte for 1024 volume. It working fine for 512 volume. >> > >>> Please check my modified file writer code given >> below. >> > >>> >> > >>> // Streaming depending on streaming capability of writer >> > >>> typedef itk::StreamingImageFilter >> > >> StreamerType; >> > >>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>> streamerBP->SetInput(feldkamp->GetOutput()); >> > >>> streamerBP->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> //create a writer and write reconstructed file >> > >>> itk::ImageFileWriter::Pointer writer; >> > >>> writer = itk::ImageFileWriter::New(); >> > >>> writer->SetFileName("D:\\Output.raw"); >> > >>> writer->SetImageIO(io); >> > >>> writer->SetInput(streamerBP->GetOutput()); >> > >>> writer->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> >> > >>> Please let me know if any clarification is required. >> > >>> >> > >>> >> > >>> Thanks & Regards >> > >>> >> > >>> Zahid Hasan Ansari >> > >>> Senior Design Engineer >> > >>> Mobile No. +91-9738379729 >> > >>> >> > >>> Panacea Medical Technologies Pvt. Ltd. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >> http://www.panaceamedical.com >> > >>> Bangalore - India. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> ----- Original Message ----- >> > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> > Rit >> > >> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>> >> > >>> >> > >>>> Dear Zahid, >> > >>>> >> > >>>> The --divisions is an option of the command-line application rtkfdk. >> It >> > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >> > >>>> rather, it is passed to a streaming filter at the end of the >> pipeline. >> > >>>> Look for the following bit of code in rtkfdk.cxx : >> > >>>> >> > >>>> // Streaming depending on streaming capability of writer >> > >>>> typedef itk::StreamingImageFilter> > >>>> CPUOutputImageType> StreamerType; >> > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>>> streamerBP->SetInput( pfeldkamp ); >> > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg >> ); >> > >>>> >> > >>>> You can find information on how a streaming filter works on this >> page: >> > >>>> >> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> > >>>> >> > >>>> I hope it helps, >> > >>>> >> > >>>> Cyril >> > >>>> >> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >> > >>>>> Dear Cyril Mory, >> > >>>>> >> > >>>>> I have tried but I am not getting where to give >> > >>>> --division 4 in my code. >> > >>>>> Please find my code given below and please let me >> > know >> > >>>> where I need to change in my code to make it work. >> > >>>>> int _tmain(int argc, _TCHAR* argv[]) >> > >>>>> { >> > >>>>> #pragma region "Variable declaration" >> > >>>>> const double PI = 3.14159265358979323846; >> > >>>>> float *angles; >> > >>>>> int nProj = 349; >> > >>>>> typedef unsigned short pixelType; >> > >>>>> typedef float OutpixelType; >> > >>>>> const int dimension = 3; >> > >>>>> typedef itk::Image imageType; >> > >>>>> typedef itk::ImageRegionConstIterator >> ImageIteratorType; >> > >>>>> imageType::Pointer Projections = imageType::New(); >> > >>>>> >> > >>>>> #pragma endregion "Variable declaration" >> > >>>>> >> > >>>>> Projections = >> > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> > >> nProj); >> > >>>>> imageType::SpacingType pSpacing; >> > >>>>> pSpacing[0] = 0.2960; >> > >>>>> pSpacing[1] = 0.2960; >> > >>>>> pSpacing[2] = 0.2960; >> > >>>>> Projections->SetSpacing(pSpacing); >> > >>>>> >> > >>>>> imageType::PointType pOrigin; >> > >>>>> pOrigin[0] = -212.972; >> > >>>>> pOrigin[1] = -212.972; >> > >>>>> pOrigin[2] = -212.972; //-158.50; >> > >>>>> Projections->SetOrigin(pOrigin); >> > >>>>> >> > >>>>> Projections->Update(); >> > >>>>> >> > >>>>> //Read angles. >> > >>>>> char *angles_file = >> "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >> > >>>>> angles = new float[nProj]; >> > >>>>> angles = readAngles(angles_file, angles); >> > >>>>> >> > >>>>> #pragma region"Geometry" >> > >>>>> // Geometry object >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> > >>>>> GeometryType::Pointer geometry = GeometryType::New(); >> > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >> > >>>>> { >> > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, >> 0, >> > >> 0); >> > >>>> // 136 half fan //2.07 Kidwai // >> > >>>>> } >> > >>>>> >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> > >>>> GeometryWriterType; >> > >>>>> GeometryWriterType::Pointer geometryWriter = >> > GeometryWriterType::New(); >> > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >> > >>>>> geometryWriter->SetObject(geometry); >> > >>>>> geometryWriter->WriteFile(); >> > >>>>> geometry->Update(); >> > >>>>> #pragma endregion "Geometry" >> > >>>>> >> > >>>>> //Define output image type >> > >>>>> >> > >>>>> #ifdef USE_CUDA >> > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > >> PSSFType; >> > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> > >>>>> #else >> > >>>>> typedef itk::Image OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter >> PSSFType; >> > >>>>> typedef rtk::FDKConeBeamReconstructionFilter >> > FDKType; >> > >>>>> #endif >> > >>>>> >> > >>>>> //ScatterCorrection >> > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter> > imageType >> > >>>> BoellaardScatterCorrectionImageFilterType; >> > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer >> ScatterCorrection >> > = >> > >>>> BoellaardScatterCorrectionImageFilterType::New(); >> > >>>>> ScatterCorrection->SetInput(Projections); >> > >>>>> >> > >>>>> //VarianObiRawImageFilter >> > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> > >>>> RawImageFilterType; >> > >>>>> RawImageFilterType::Pointer AttenuationFilter = >> > >>>> RawImageFilterType::New(); >> > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >> > >>>>> >> > >>>>> //Create the output image >> > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >> > >>>> ConstantImageSourceType; >> > >>>>> ConstantImageSourceType::PointType origin_p; >> > >>>>> ConstantImageSourceType::SizeType size_p; >> > >>>>> ConstantImageSourceType::SpacingType spacing_p; >> > >>>>> ConstantImageSourceType::Pointer projectionsSource = >> > >>>> ConstantImageSourceType::New(); >> > >>>>> origin_p[0] = -127.5; >> > >>>>> origin_p[1] = -127.5; >> > >>>>> origin_p[2] = -127.5; >> > >>>>> size_p[0] = 512; >> > >>>>> size_p[1] = 512; >> > >>>>> size_p[2] = 512; >> > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >> > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >> > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >> > >>>>> >> > >>>>> projectionsSource->SetOrigin(origin_p); >> > >>>>> projectionsSource->SetSpacing(spacing_p); >> > >>>>> projectionsSource->SetSize(size_p); >> > >>>>> projectionsSource->SetConstant(0); >> > >>>>> >> > >>>>> // Short scan image filter >> > >>>>> PSSFType::Pointer pssf = PSSFType::New(); >> > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >> > >>>>> pssf->SetGeometry(geometry); >> > >>>>> pssf->InPlaceOff(); >> > >>>>> std::cout << "short scan image filter success" << std::endl; >> > >>>>> >> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); >> > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >> > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >> > >>>>> feldkamp->SetGeometry(geometry); >> > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >> > >>>>> feldkamp->SetGPUEnabled(1); >> > >>>>> feldkamp->SetNumberOfThreads(10000); >> > >>>>> >> > >>>>> #pragma region "Write volume" >> > >>>>> >> > >>>>> //Create a raw io for writing >> > >>>>> >> > >>>>> itk::RawImageIO::Pointer io; >> > >>>>> io = itk::RawImageIO::New(); >> > >>>>> >> > >>>>> for (unsigned int i = 0; i < dimension; i++) >> > >>>>> { >> > >>>>> io->SetDimensions(i, size_p[i]); >> > >>>>> io->SetSpacing(i, spacing_p[i]); >> > >>>>> io->SetOrigin(i, origin_p[i]); >> > >>>>> } >> > >>>>> io->SetHeaderSize(0); >> > >>>>> io->SetByteOrderToLittleEndian(); >> > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >> > >>>>> io->SetNumberOfComponents(1); >> > >>>>> io->SetNumberOfDimensions(3); >> > >>>>> >> > >>>>> //create a writer and write reconstructed file >> > >>>>> itk::ImageFileWriter::Pointer writer; >> > >>>>> writer = itk::ImageFileWriter::New(); >> > >>>>> writer->SetFileName("D:\\Output.raw"); >> > >>>>> writer->SetImageIO(io); >> > >>>>> writer->SetInput(feldkamp->GetOutput()); >> > >>>>> >> > >>>>> try >> > >>>>> { >> > >>>>> writer->Update(); >> > >>>>> } >> > >>>>> catch (itk::ExceptionObject & excp) >> > >>>>> { >> > >>>>> std::cerr << "Error while writing the image " << std::endl; >> > >>>>> std::cerr << excp << std::endl; >> > >>>>> getchar(); >> > >>>>> } >> > >>>>> #pragma endregion "WriteVolume" >> > >>>>> delete[] angles; >> > >>>>> return 0; >> > >>>>> } >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> Thanks & Regards >> > >>>>> >> > >>>>> Zahid Hasan Ansari >> > >>>>> Senior Design Engineer >> > >>>>> Mobile No. +91-9738379729 >> > >>>>> >> > >>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >>>> http://www.panaceamedical.com >> > >>>>> Bangalore - India. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> ----- Original Message ----- >> > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >> > >> Rit >> > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>> >> > >>>>> >> > >>>>>> Dear Zahid, >> > >>>>>> >> > >>>>>> I was able to perform a reconstruction from your header and >> geometry >> > >>>>>> file, using the following command lines: >> > >>>>>> >> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> > >>>>>> --phantomscale "128,128,128" --like Output.mhd >> > >>>>>> >> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> > >> --hardware >> > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> > >>>>>> >> > >>>>>> The first computes projections through a Shepp & Logan phantom, >> with >> > >> the >> > >>>>>> same size, spacing, origin, etc... as your projections, using your >> > >>>>>> geometry file geo.xml. >> > >>>>>> >> > >>>>>> The second line performs the FDK reconstruction. I had to use both >> > the >> > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory >> > (3GB, >> > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory >> > by >> > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> > >>>>>> parts, reconstructs them one by one, then assembles the results. >> Can >> > >> you >> > >>>>>> run the same commands and let us know whether you still encounter >> the >> > >>>>>> crash you mentioned ? If it works, you can use your own projection >> > data >> > >>>>>> in the second command line instead of "simulatedprojections.mha". >> > >>>>>> >> > >>>>>> Best, >> > >>>>>> >> > >>>>>> Cyril >> > >>>>>> >> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> > >>>>>> >> > >>>>>>> Dear Sir, >> > >>>>>>> >> > >>>>>>> Please find the Header file in the attachment. >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> Thanks & Regards >> > >>>>>>> >> > >>>>>>> Zahid Hasan Ansari >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> ----- Original Message ----- >> > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > Simon >> > >>>> Rit >> > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>> >> > >>>>>>> >> > >>>>>>>> Dear Zahid, >> > >>>>>>>> >> > >>>>>>>> We do not need the projections file, at least not for a first >> stage >> > >> of >> > >>>>>>>> error tracking. We only need the header. >> > >>>>>>>> Try the following command line: >> > >>>>>>>> >> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >> > >>>>>>>> >> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" >> file >> > is >> > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> > >> contains >> > >>>>>>>> the pixel values, but at the moment we do not need them. We will >> > >> create >> > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough >> to >> > >>>>>>>> track down the error you encounter. >> > >>>>>>>> >> > >>>>>>>> Looking forward to receiving your file, >> > >>>>>>>> Cyril >> > >>>>>>>> >> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >> > >>>>>>>>> Dear Sir, >> > >>>>>>>>> >> > >>>>>>>>> The single raw file of the projections is 1.4 GB >> > and >> > >> we >> > >>>> are >> > >>>>>> not >> > >>>>>>>> able to send this big file to you. Can you please suggest other >> > >>>>>> alternatives >> > >>>>>>>> for this? >> > >>>>>>>>> Or can you provide us the PC configuration to >> solve >> > >> the >> > >>>>>> issue? >> > >>>>>>>>> Let me know if any other clarification is >> required. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> Thanks & Regards >> > >>>>>>>>> >> > >>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> ----- Original Message ----- >> > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > >> Simon >> > >>>>>> Rit >> > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>>> Hello Zahid, >> > >>>>>>>>>> >> > >>>>>>>>>> We will need the header of your projections file, too (It is >> best >> > >> if >> > >>>>>> you >> > >>>>>>>>>> have all your projections as a single .mhd and a single .raw >> > file, >> > >> so >> > >>>>>> it >> > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >> > >>>>>>>>>> >> > >>>>>>>>>> Regards, >> > >>>>>>>>>> Cyril >> > >>>>>>>>>> >> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>> Dear Cyril Mory, >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> I have only used RTK version 1.3.0. but >> in >> > the >> > >>>> error >> > >>>>>>>>>> message it is showing RTK version 1.2.0. >> > >>>>>>>>>>> Please find the attachment of the >> geometry >> > >> file >> > >>>> of >> > >>>>>> our >> > >>>>>>>>>> projections. >> > >>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>> >> > >>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>>>> To: Zahid Hasan Ansari >> [mailto:zahidhasan.a at panaceamedical.com], >> > >>>> Simon >> > >>>>>>>> Rit >> > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, >> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the >> > >>>> source >> > >>>>>> of >> > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >> > >>>>>> therefore >> > >>>>>>>>>>>> yourself): >> > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable >> > changes >> > >> in >> > >>>>>> the >> > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so >> your >> > >>>>>> problem >> > >>>>>>>>>>>> might disappear just by upgrading to the new version >> > >>>>>>>>>>>> - create a small example that reproduces your problem. You >> can, >> > >> for >> > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> > >> logan >> > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look >> at >> > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need >> > an >> > >>>>>>>>>>>> example). And send us the script >> > >>>>>>>>>>>> - OR send us your geometry file and the header of your >> > >> projections >> > >>>>>> file >> > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >> > >>>>>> zero-filled >> > >>>>>>>>>>>> stack of projections), and the command line that crashes >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Best regards, >> > >>>>>>>>>>>> Cyril >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>>>> Dear Simon Rit, >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Please find the screen shot in the >> > >> attachment. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >> > : >> > >>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>>>> To: Zahid Hasan Ansari >> > [mailto:zahidhasan.a at panaceamedical.com] >> > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >> > >>>>>>>> [mailto:rtk-users at public.kitware.com], >> > >>>>>>>>>>>> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is >> a >> > >> CUDA >> > >>>>>>>>>> memory >> > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> > >> first >> > >>>>>> make >> > >>>>>>>>>>>> sure >> > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> > >> images. >> > >>>>>> If >> > >>>>>>>> it >> > >>>>>>>>>>>> is >> > >>>>>>>>>>>>>> no sufficient, you can split your volume using the >> > --divisions. >> > >>>> The >> > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >> > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the >> > use >> > >>>> of >> > >>>>>>>> RTK >> > >>>>>>>>>> on >> > >>>>>>>>>>>>>> our case studies webpage >> > >>>>>>>>>>>> . >> > >>>>>>>>>>>>>> Simon >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >> > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Dear Sir\Madam, >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >> > >>>>>> reconstruction >> > >>>>>>>>>> using >> > >>>>>>>>>>>> RTK >> > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the >> > screen >> > >>>>>> shoot >> > >>>>>>>> of >> > >>>>>>>>>>>>>>> the >> > >>>>>>>>>>>>>>>> same. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am using the following items >> given >> > >> below. >> > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >> > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >> > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit >> > console >> > >>>>>>>> application >> > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >> > >>>>>>>>>>>>>>>> 5. CUDA 7. >> > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >> > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Please provide the solution of this >> > and >> > >> let >> > >>>> me >> > >>>>>>>> know >> > >>>>>>>>>> if >> > >>>>>>>>>>>>>> any >> > >>>>>>>>>>>>>>>> other clarification is required. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> > EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, >> > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 >> | >> > >> Url >> > >>>> : >> > >>>>>>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>>>> >> ____________________________________________________________ >> > >>>>>>>>>>>>>>> ________________ >> > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> This email and any files transmitted with it are >> > confidential >> > >>>> and >> > >>>>>>>>>>>> intended >> > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom >> they >> > >> are >> > >>>>>>>>>>>> addressed. >> > >>>>>>>>>>>>>>> If you have received this email in error please notify the >> > >>>> system >> > >>>>>>>>>>>> manager. >> > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this >> > email >> > >>>> are >> > >>>>>>>>>>>> solely >> > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those >> > of >> > >>>> the >> > >>>>>>>>>>>> company. >> > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >>>> attachments >> > >>>>>>>> for >> > >>>>>>>>>>>> the >> > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> > any >> > >>>>>> damage >> > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> This email and any files transmitted with it are >> confidential >> > >> and >> > >>>>>>>>>> intended >> > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> > are >> > >>>>>>>>>> addressed. >> > >>>>>>>>>>>>> If you have received this email in error please notify the >> > >> system >> > >>>>>>>>>> manager. >> > >>>>>>>>>>>>> Please note that any views or opinions presented in this >> email >> > >> are >> > >>>>>>>>>> solely >> > >>>>>>>>>>>>> those of the author and do not necessarily represent those >> of >> > >> the >> > >>>>>>>>>> company. >> > >>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >> attachments >> > >>>>>> for >> > >>>>>>>>>> the >> > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> any >> > >>>> damage >> > >>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > Area >> > >>>>>> Phase >> > >>>>>>>> 1, >> > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > Industrial >> > >>>>>> Area, >> > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>> >> > >>>>>>>>>>> This email and any files transmitted with it are confidential >> > and >> > >>>>>>>> intended >> > >>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >> > >>>>>>>> addressed. >> > >>>>>>>>>>> If you have received this email in error please notify the >> > system >> > >>>>>>>> manager. >> > >>>>>>>>>>> Please note that any views or opinions presented in this email >> > are >> > >>>>>>>> solely >> > >>>>>>>>>>> those of the author and do not necessarily represent those of >> > the >> > >>>>>>>> company. >> > >>>>>>>>>>> Finally, the recipient should check this email and any >> > attachments >> > >>>> for >> > >>>>>>>> the >> > >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> > >> damage >> > >>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>> >> > >>>>>>>>> ________________________________________ >> > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >> > >>>> Phase >> > >>>>>> 1, >> > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >> > >>>> Area, >> > >>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>> >> > >>>>>>>>> This email and any files transmitted with it are confidential >> and >> > >>>>>> intended >> > >>>>>>>>> solely for the use of the individual or entity to whom they are >> > >>>>>> addressed. >> > >>>>>>>>> If you have received this email in error please notify the >> system >> > >>>>>> manager. >> > >>>>>>>>> Please note that any views or opinions presented in this email >> are >> > >>>>>> solely >> > >>>>>>>>> those of the author and do not necessarily represent those of >> the >> > >>>>>> company. >> > >>>>>>>>> Finally, the recipient should check this email and any >> attachments >> > >> for >> > >>>>>> the >> > >>>>>>>>> presence of viruses. The company accepts no liability for any >> > damage >> > >>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>> ________________________________________ >> > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > >> Phase >> > >>>> 1, >> > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > >> Area, >> > >>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>> Fax : + 91 80 42428710 >> > >>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>> >> > >>>>>>> This email and any files transmitted with it are confidential and >> > >>>> intended >> > >>>>>>> solely for the use of the individual or entity to whom they are >> > >>>> addressed. >> > >>>>>>> If you have received this email in error please notify the system >> > >>>> manager. >> > >>>>>>> Please note that any views or opinions presented in this email are >> > >>>> solely >> > >>>>>>> those of the author and do not necessarily represent those of the >> > >>>> company. >> > >>>>>>> Finally, the recipient should check this email and any attachments >> > for >> > >>>> the >> > >>>>>>> presence of viruses. The company accepts no liability for any >> damage >> > >>>>>>> caused by any virus transmitted by this email. >> > >>>>>>> >> > >>>>> ________________________________________ >> > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>> Fax : + 91 80 42428710 >> > >>>>> Url : http://www.panaceamedical.com >> > >>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>> PMT EMAIL DISCLAIMER: >> > >>>>> >> > >>>>> This email and any files transmitted with it are confidential and >> > >> intended >> > >>>>> solely for the use of the individual or entity to whom they are >> > >> addressed. >> > >>>>> If you have received this email in error please notify the system >> > >> manager. >> > >>>>> Please note that any views or opinions presented in this email are >> > >> solely >> > >>>>> those of the author and do not necessarily represent those of the >> > >> company. >> > >>>>> Finally, the recipient should check this email and any attachments >> for >> > >> the >> > >>>>> presence of viruses. The company accepts no liability for any damage >> > >>>>> caused by any virus transmitted by this email. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>> >> > >>> ________________________________________ >> > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>> Fax : + 91 80 42428710 >> > >>> Url : http://www.panaceamedical.com >> > >>> >> > >> >> > >> ____________________________________________________________________________ >> > >>> PMT EMAIL DISCLAIMER: >> > >>> >> > >>> This email and any files transmitted with it are confidential and >> > intended >> > >>> solely for the use of the individual or entity to whom they are >> > addressed. >> > >>> If you have received this email in error please notify the system >> > manager. >> > >>> Please note that any views or opinions presented in this email are >> > solely >> > >>> those of the author and do not necessarily represent those of the >> > company. >> > >>> Finally, the recipient should check this email and any attachments for >> > the >> > >>> presence of viruses. The company accepts no liability for any damage >> > >>> caused by any virus transmitted by this email. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > >> >> > >> >> > > >> > > ________________________________________ >> > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >> > Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> > Malur - 563130. Kolar District. INDIA. >> > > >> > > Tel : +91 80 4242 8700 / 2845 4785 >> > > Fax : + 91 80 42428710 >> > > Url : http://www.panaceamedical.com >> > > >> > >> ____________________________________________________________________________ >> > > PMT EMAIL DISCLAIMER: >> > > >> > > This email and any files transmitted with it are confidential and >> intended >> > > solely for the use of the individual or entity to whom they are >> addressed. >> > > If you have received this email in error please notify the system >> manager. >> > > Please note that any views or opinions presented in this email are >> solely >> > > those of the author and do not necessarily represent those of the >> company. >> > > Finally, the recipient should check this email and any attachments for >> the >> > > presence of viruses. The company accepts no liability for any damage >> > > caused by any virus transmitted by this email. >> > > >> > >> > >> > > > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Thu Nov 3 16:10:31 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 20:10:31 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Message-ID: <1775591917.651990.1478203831679@mail.yahoo.com> OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right?About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question:I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards,Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Fri Nov 4 02:31:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 4 Nov 2016 07:31:18 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1775591917.651990.1478203831679@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> Message-ID: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: > OK. good. Thank Cyril to clarify it to me. To implement the Newton's > methods instead of multiplication of R with R^T, we need the > multiplication of Jacobian/Sensitivity (R here) matrix with vector > variable (here x) and the gradient vector (here multiplication of R > with -r). I think it is possible to implement the Newton optimization > methods with the current modules as I think we could extract the R and > f dot product and R and r dot product. Am I right? > About the displayed algorithms, I think the gradient vector is dot > product of matrix A (Jacobian) with the minus residual vector (-r). > > One more question: > I already developed my codes in python. Do you think it is easy to > wrap your modules in python? I don't have experience in these subject. > > Regards, > Vahid > > > On Thursday, November 3, 2016 2:23 AM, Cyril Mory > wrote: > > > Hello Vahid, > Thank you for this insight on Newton's methods. Yes, the output of the > backprojection filter, in SART, is the gradient of the cost function. > You may have noticed that the pipeline performs a division of the > forward projection by something coming from > "RayBoxIntersectionFilter". This is to normalize the forward > projection, so that R^T R f ~= blurry f. If you don't do it, you'll > have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, > and your algorithm will quickly diverge. > You could try to extract the gradient from the conjugate gradient > filter as well, but it is significantly more tricky: first, the CG > filter was implemented from the following algorithm, taken from > wikipedia (which embeds the normalization I was mentioning earlier): > In this algorithm, it is not clear to me what exactly is the gradient > of the cost function. I would say it is something like "- r_k", but > I'm not sure. Second, as you see, the CG filter needs an operator A, > which may differ from one problem to another, so this operator is > implemented in a separate filter, which in your case would be > rtkReconstructionConjugateGradientOperator, with the laplacian > regularization parameter gamma set to 0. > Note that we never actually store the system matrix R. Instead, the > interpolation coefficient it contains are re-computed on the fly > everytime we forward project. And the same holds for backprojection, > i.e the matrix R^T. > Best, > Cyril > > On 11/03/2016 03:38 AM, vahid ettehadi wrote: >> Hello Simon and Cyril, >> Thanks for the reply. >> You are right Simon. I did not notice it too in the literature. The >> main problem as you said is the storage. Actually I developed the >> conjugate gradient (CG), quasi-Newton and Newton optimization methods >> for optical tomography and I intended to apply them to the CT >> reconstruction as well. I implemented the Newton's methods >> (Gauss-Newton and Levenberg-Marquardt) in a >> Jacobian-Free-Newton-Krylov approaches to avoid the matrix >> multiplication of Jacobians (sensitivity). It means we only need to >> store the Jacobian matrix for the these methods (the matrix R that >> Cyril was mentioned), that is still a big matrix for practical >> problems in CT reconstruction. For the quasi-Newton I adapted an >> L-BFGS algorithm that only need the 3 or 8 last iterations of the >> gradient vector to calculate the Hessian matrix. In my case, the >> L-BFGS and Newton's methods was much faster than the CG as you know >> because of using the second order derivative (hessian matrix). I saw >> in your last paper you implement the conjugate gradient method, so I >> thought it might be easy to extract the gradient vector from CG >> modules and solve the cost function within the quasi-Newton/Newton >> methods. I will look at the codes to see what I can do. >> Thanks again for the reply. >> >> @Cyril: >> Please correct me if I am wrong. you mean the output of >> backProjectionFilter is the gradient of defined cost function? >> >> Regards, >> Vahid >> >> >> On Wednesday, November 2, 2016 2:53 AM, Cyril Mory >> >> wrote: >> >> >> Hi Vahid, >> Welcome to RTK :) >> Indeed, there are several iterative methods already implemented in >> RTK, but none of the filters allows you to easily extract the >> gradient of the least squares function there are minimizing. >> If you need to minimize the classical non-regularized tomographic >> cost function, ie || R f - p ||?, with R the forward projection >> operator, f the volume you are looking for, and p the measured >> projections, my best advice would be to copy some part of the >> pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, >> ie the following part (copy-paste this into webgraphviz.com) >> >> digraph SARTConeBeamReconstructionFilter { >> >> Input0 [ label="Input 0 (Volume)"]; >> Input0 [shape=Mdiamond]; >> Input1 [label="Input 1 (Projections)"]; >> Input1 [shape=Mdiamond]; >> >> node [shape=box]; >> ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref >> rtk::ForwardProjectionImageFilter"]; >> Extract [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref >> itk::MultiplyImageFilter"]; >> AfterExtract [label="", fixedsize="false", width=0, height=0, >> shape=none]; >> Subtract [ label="itk::SubtractImageFilter" URL="\ref >> itk::SubtractImageFilter"]; >> MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" >> URL="\ref itk::MultiplyImageFilter"]; >> Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref >> itk::DivideOrZeroOutImageFilter"]; >> GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" >> URL="\ref itk::MultiplyImageFilter", style=dashed]; >> Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref >> rtk::DisplacedDetectorImageFilter"]; >> ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref >> rtk::RayBoxIntersectionImageFilter"]; >> ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref >> rtk::BackProjectionImageFilter"]; >> OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; >> OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; >> Input0 -> OutofInput0 [arrowhead=none]; >> OutofInput0 -> ForwardProject; >> ConstantVolume -> BeforeBP [arrowhead=none]; >> BeforeBP -> BackProjection; >> Extract -> AfterExtract[arrowhead=none]; >> AfterExtract -> MultiplyByZero; >> AfterExtract -> Subtract; >> MultiplyByZero -> ForwardProject; >> Input1 -> Extract; >> ForwardProject -> Subtract; >> Subtract -> MultiplyByLambda; >> MultiplyByLambda -> Divide; >> Divide -> GatingWeight; >> GatingWeight -> Displaced; >> ConstantProjectionStack -> ExtractConstantProjection; >> ExtractConstantProjection -> RayBox; >> RayBox -> Divide; >> Displaced -> BackProjection; >> BackProjection -> OutofBP [arrowhead=none]; >> } >> >> As you can see, it is a very large part of the SART reconstruction >> filter, so yoiu might be better off just copying the whole >> SARTConeBeamReconstructionFilter and modifying it. >> >> Of course, you could also look into ITK's cost function class, and >> see if one of the classes inherited from it suits your needs, >> implement your cost function this way, and use ITK's off-the-shelf >> solvers to minimize it. See the inheritance diagram in >> https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if >> you want to try this approach. >> >> Best regards, >> Cyril >> >> On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >>> Hello RTK users and developers, >>> >>> I already implemented the RTK and reconstructed some images with the >>> FDK algorithm implemented in RTK. It works well. Thanks to RTK >>> developers. >>> Now, I am trying to develop a model-based image reconstruction for >>> our cone-beam micro-CT. I see already that some iterative algorithms >>> like ART and its modifications and conjugate-gradient (CG) method >>> are implemented in the RTK. I want to develop a model-based >>> reconstruction through the Newton/quasi-Newton optimizations >>> methods. I was wondering is it possible to extract the gradient of >>> least square function from implemented algorithms like CG module? >>> Any recommendation will be appreciated. >>> >>> Best Regards, >>> Vahid >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Fri Nov 4 16:42:08 2016 From: julien.jomier at kitware.com (Julien Jomier) Date: Fri, 4 Nov 2016 21:42:08 +0100 Subject: [Rtk-users] SimpleRTK + Matlab In-Reply-To: References: <06d4327e-9fd4-bf08-565d-5304f577b521@creatis.insa-lyon.fr> Message-ID: <89255846-9a06-a625-45f1-88d140c0013d@kitware.com> Hi Arvid, Sorry for the late reply. We successfully build the latest RTK with ITK 4.11.0 on Visual Studio 2013 with static libraries (BUILD_SHARED_LIBS set to OFF). I have just pushed a fix to SimpleRTK to build as shared libraries. Note that you would need to have ITK built as shared libraries as well. Let us know if you still have any issues, Julien On 23/09/2016 10:29, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi again. > > I've been spending some more time with this, and feel I learned a little > bit more. I have now tested this on several machines with several > compiler versions (more or less all of them) and serveral cmake versions > - all with Windows 7. > > I can actually reproduce the successful build you linked to, but this > can only be done if you do not include any of the language wrappings, > like in the build you linked to. Enable any of them, and the build will > break. (see attachment) > > I suspect it must have been working in the past, but since none of them > are included in your test there have been a breaking change, and none of > them work anymore. > > I am still trying to tweak then projects manually to build SimpleRTK > with some sort of language support, but still without any luck. > > best > > Arvid > > On Tue, Sep 20, 2016 at 4:19 PM, Simon Rit > > > wrote: > > Hi, > Sorry, I won't be able to help but I'd advise to tick on WRAP_PYTHON > only at first in cmake, not the other languages (i.e., tick off > WRAP_LUA). > I can't solve your problem but Kitware is going to look into an > upgrade of SimpleRTK in the coming days, I'll ask them if they know > what is the issue. If you look here: > http://my.cdash.org/viewNotes.php?buildid=1052065 > > this is a nightly build of SimpleRTK on Windows and it seems to > work. I don't see why it wouldn't work for you. > Simon > > On Tue, Sep 20, 2016 at 2:17 PM, Arvid Piehl Lauritsen B?ttiger > > wrote: > > Hi again. > > I understand, but could you please help me get in contact with > the person who knows something about the windows build (if any), > I think there is something wrong. > > I have been investigating the build problems I had and found > that in the sub folder "SimpleRTK-build" there is a solutions > file with SimpleRTK. I opened it up and found the projects which > I had problems building: "SimpleRTKCommon", > "SimpleRTKBasicFilters0", "SimpleRTKBasicFilters1" etc. > > When I then tried to build SimpleRTKCommon manually it just > compiled without any problems. However, when I followed up by > building "SimpleRTKBasicFilters0" it gave me an error which > stated that it couldn't find "SimpleRTKCommon-0.9.lib" - which I > just build. > > After some more investigation I realized that the > SimpleRTKCommon is set to build a dynamic linked library (DLL), > and SimpleRTKBasicFilters0 expects it to be a static linked > library (LIB). After changing SimpleRTKCommon to be build as a > static library - and changing the output location - I could > build SimpleRTKBasicFilters0. > > However, SimpleRTKBasicFilters0 is also build as an DLL, but > changing that to a LIB as well I could build > SimpleRTKBasicFilters1, then SimpleRTKBasicFilters2 and then > SimpleRTKBasicFilters3. You get the point. > > I'm unsure if the intention is to build them as static or > dynamic libraries, but in any case the current build > configuration doesn't work - on my setup at least. > > However, I should note than for some reason the "lua5" project > did build successfully out of the box. Whatever it does > differently works. > > best > > Arvid > > > > On Tue, Sep 20, 2016 at 7:33 AM, Simon Rit > > wrote: > > I'm not an msvc specialist but your first line suggests that > you have pasted only part of the log: > > 20> Done Building Project > "C:\Users\aplb\Work\RTK\RTK1.2-bin-vs13\SimpleRTK-build\ALL_BUILD.vcxproj" > (default targets) -- FAILED. > > What you need to find out is why this build failed. If the > build fails, the linking cannot work. > Cheers, > Simon > > > On 19/09/2016 19:44, Arvid Piehl Lauritsen B?ttiger wrote: >> I did a complete rebuild, and here is the end of the >> output: http://pastebin.com/hvQ33WWg >> >> I have to admit I'm not sure what to make of it. I should >> note that I'm trying to compile the version I just pulled >> from git earlier today, since the other version I normally >> work with is really old. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 6:50 PM, Simon Rit >> > > wrote: >> >> SimpleRTKCommon is a library generated when compiling. >> Don't you have another error before that which >> explains why it did not compile? >> Simon >> >> On Mon, Sep 19, 2016 at 2:30 PM, Arvid Piehl Lauritsen >> B?ttiger > > wrote: >> >> Hi again. >> >> I've been trying to get it working. However, I did >> run into some problems compiling SimpleRTK. The >> main issue seems to be that it depends on >> SimpleRTKCommon - which I do not have. >> >> Here is the last few lines from VS2013 >> >> > 5>LINK : fatal error LNK1181: cannot open input >> file '..\..\..\lib\Debug\SimpleRTKCommon-0.9.lib' >> [C:\Users\aplb\Work\RTK\RTK1.2- >> > >> bin-vs13\SimpleRTK-build\Code\IO\src\SimpleRTKIO.vcxproj] >> > 5> >> > 5> 0 Warning(s) >> > 5> 2 Error(s) >> > 5> >> > 5> Time Elapsed 00:00:25.26 >> > ========== Build: 4 succeeded, 1 failed, 0 >> up-to-date, 0 skipped ========== >> >> I'm not quite sure what is going on, because the >> only reference I can find to SimpleRTKCommon is >> the CMakeLists.txt on github: >> https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/CMakeLists.txt >> >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:19 AM, Simon Rit >> > > wrote: >> >> The latest MacOS. It's nice if you can test it >> on other platforms, I'll try to run it on >> Linux but I have to upgrade matlab first (I >> think python calls are available starting with >> Matlab 2014). >> Simon >> >> On Mon, Sep 19, 2016 at 11:14 AM, Arvid Piehl >> Lauritsen B?ttiger > > wrote: >> >> Dear Simon >> >> This look very interesting! Which platform >> did you successfully execute this on? >> I will give it a try at once (on windows) >> and let you know if I run into any problems. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:05 AM, Simon >> Rit > > >> wrote: >> >> Dear RTK users, >> I have quickly tested calling the >> SimpleRTK python lib from Matlab and >> it seems to work well: >> http://wiki.openrtk.org/index.php/SimpleRTK#Matlab >> >> Therefore, I don't think we have to >> work on Matlab wrappings but let us >> know if you think otherwise. >> Future works include a simple >> installation mechanism for >> pre-compiled SimpleRTK libraries. >> We'll keep you posted! >> Simon >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> >> >> >> >> > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From w_ettehadi at yahoo.com Mon Nov 7 16:53:54 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Mon, 7 Nov 2016 21:53:54 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Message-ID: <1477848112.17731.1478555634307@mail.yahoo.com> Thanks Cyril for your time and advises. Vahid On Friday, November 4, 2016 2:31 AM, Cyril Mory wrote: Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right? About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question: I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards, Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Philipp.Freislederer at med.uni-muenchen.de Thu Nov 17 05:08:09 2016 From: Philipp.Freislederer at med.uni-muenchen.de (Freislederer, Philipp) Date: Thu, 17 Nov 2016 10:08:09 +0000 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac Message-ID: Dear all, I currently have some issues in generating off-plane projections where I think rtk might be helpful. I am trying to generate projections from an Brainlab ExacTrac geometry. What I am getting is a projection matrix generated by the system itself. Using only this information I am able to project any voxel value in a CT onto a panel. Now, in order to speed everything up a little and not re-implement everything that has been done sufficiently already I am hoping to use 'rtkforwardprojections'. The problem is I am not able to reproduce the Brainlab geometry using 'rtksimulatedgeometry' from the projection matrix directly. I could calculate the room angle of the source to the panel from the projection matrix but I am getting weird results when applying these on something like plastimatch, so I think I have an error in there. Is there a way of creating a geometry simply from the projection matrix or do I have to work around and calculate every parameter needed specifically? Maybe someone has some experience with this type of issue. Thanks in advance! Philipp -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 17 05:27:14 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 17 Nov 2016 11:27:14 +0100 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac In-Reply-To: References: Message-ID: Hi, Yes ! I have actually added that functionality recently from Thibault Notargiacomo's code see bool rtk::ThreeDCircularProjectionGeometry::AddProjection ( const HomogeneousProjectionMatrixType & pMat) Note that the projection matrix must be for a 3D position in mm to a 2D position in mm. You can add pre-/post-matrices to go from mm to voxel. There is no command line tool to do it but you can easily create your command line tool to do it. This is tested in testing/rtkgeometryfrommatrixtest.cxx. Let me know if you need more info, Simon On Thu, Nov 17, 2016 at 11:08 AM, Freislederer, Philipp < Philipp.Freislederer at med.uni-muenchen.de> wrote: > Dear all, > > > > I currently have some issues in generating off-plane projections where I > think rtk might be helpful. > > I am trying to generate projections from an Brainlab ExacTrac geometry. > > What I am getting is a projection matrix generated by the system itself. > Using only this information I am able to project any voxel value in a CT > onto a panel. > > Now, in order to speed everything up a little and not re-implement > everything that has been done sufficiently already I am hoping to use > ?rtkforwardprojections?. > > The problem is I am not able to reproduce the Brainlab geometry using > ?rtksimulatedgeometry? from the projection matrix directly. > > I could calculate the room angle of the source to the panel from the > projection matrix but I am getting weird results when applying these on > something like plastimatch, so I think I have an error in there. > > > > Is there a way of creating a geometry simply from the projection matrix or > do I have to work around and calculate every parameter needed specifically? > > Maybe someone has some experience with this type of issue. > > > > Thanks in advance! > > > > Philipp > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Sat Nov 19 14:51:24 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Sat, 19 Nov 2016 19:51:24 +0000 Subject: [Rtk-users] Geometric calibration Message-ID: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ From simon.rit at creatis.insa-lyon.fr Tue Nov 22 02:01:19 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 22 Nov 2016 08:01:19 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: Message-ID: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper ). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > Hi RTK users, > > I'm interested in reconstructing images acquired by a fluoroscopy system > rotating around a knee phantom. Unfortunately, I've been unsuccessful so > far. I recognize some of the phantom in the reconstructed image, but it > contains double contours and the shape is deformed. > > I think the issue might be incorrect geometry specification. I have images > also including a phantom containing markers for which we know the > coordinates, which should allow us to calibrate the system. On the wiki on > image quality, I saw that some users had developed scripts to do the > calibration? Would someone be willing to share it? > > Kind regards, > Sepp > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: after.pdf Type: application/pdf Size: 5974 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: before.pdf Type: application/pdf Size: 5678 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: calib.py Type: text/x-python Size: 2488 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 23 12:44:11 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 23 Nov 2016 18:44:11 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Andreas, Today we had the RTK training and some users were looking for a XIM file reader. I pointed to your contributions but any chance to have it put in RTK soon? Thanks in advance, Simon On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit wrote: > Hi, > Thanks for sharing. There still seems to be some streak artefacts, do you > see the same in the Varian reconstruction? > I'm looking forward to the pull-request, I think we should try to make the > bzip2 optional. > Simon > > On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < > andreasg at phys.au.dk> wrote: > >> Thanks for the fast response Simon! >> >> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >> right all along! >> I just didn't get why it makes a difference. I think I do now, as the >> resulting image was flipped upside down and not left/right as I expected. >> [attached] >> >> The reconstruction is significantly better, I'll look into what should be >> included in the reader and what I should keep in my program to keep >> conformity with the other readers. Then I'll create a pull request. >> >> Just for the purpose of others hitting the same or a similar bug, I also >> attempted: >> I did the SART reconstruction with 10 iterations, lambda=0.3, and Joseph >> back/forward projection, *but with no* significant improvement [attached] >> >> And: >> If you want you can download the data set from: [Dropbox link to 460MB >> zip (I'll >> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >> is used along with the Scan.xml (Calibrations folder may be used in the >> future in my program, but I'm not sure if you can rely on the existence of >> the content). >> >> A MatLab XimReader is available: link >> (also >> available from Varian bitbucket along a with a python version and a >> C#->matlab plugin >> ). >> Otherwise my fork with the RTK-style reader is available from the same >> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >> so bzip2 is a new dependancy). >> >> Best regards >> Andreas >> >> >> __________________________________ >> >> Andreas Gravgaard Andersen >> >> Department of Oncology, >> >> Aarhus University Hospital >> >> N?rrebrogade 44, >> >> 8000, Aarhus C >> >> Mail: andreasg at phys.au.dk >> >> Cell: +45 3165 8140 >> >> >> >> 2016-09-16 16:13 GMT+02:00 Simon Rit : >> >>> Hi, >>> You can try any iterative reconstruction, they can also handle short >>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>> However, the nature of the artifacts indicate more a problem in the >>> geometry in my opinion. I have seen such errors when, for example, rotating >>> in the wrong direction. I can have a look if you share the dataset. >>> Cheers, >>> Simon >>> >>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>> andreasg at phys.au.dk> wrote: >>> >>>> Thanks for the suggestions, Simon and Cyril! >>>> >>>> I have been carefully looking though the geometry and from what I >>>> understand of the transformations matrices, the geometry looks correct/(as >>>> expected). >>>> >>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>> were because had used half-fan scans (full-arc). >>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>> artifacts occurs! >>>> >>>> Are there other (built-in) means of improving half-arc scans, than the >>>> parker short scan filter? >>>> >>>> Parker short scan does a decent job, but the result is still far from >>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>> >>>> Best regards >>>> Andreas >>>> >>>> >>>> __________________________________ >>>> >>>> Andreas Gravgaard Andersen >>>> >>>> Department of Oncology, >>>> >>>> Aarhus University Hospital >>>> >>>> N?rrebrogade 44, >>>> >>>> 8000, Aarhus C >>>> >>>> Mail: andreasg at phys.au.dk >>>> >>>> Cell: +45 3165 8140 >>>> >>>> >>>> >>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory : >>>> >>>>> One suggestion since it works with the Hnd projections: >>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>> Xim projections) and output two projection stack files and two geometry >>>>> files, then compare the projection stack files by subtracting one to the >>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>> are identical, then I do not see any reason why the reconstructions should >>>>> be different, so my guess is that you will find differences. >>>>> >>>>> >>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>> >>>>>> Hi, >>>>>> I have almost never worked with Varian data but it looks like a >>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>> projections which results in assigning a bad geometry to each >>>>>> projection. How did you name your projections? Maybe check that the >>>>>> order matches that of the RTK geometry file. Otherwise, there might be >>>>>> an issue in the creation of the geometry file itself. >>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>> code when you feel it's ready. >>>>>> Simon >>>>>> >>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>> wrote: >>>>>> >>>>>>> Dear RTK experts, >>>>>>> >>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>> format. I >>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>> available with RTK. >>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>> >>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>> in UI), >>>>>>> however when reconstructing with a regular FDK I get a reconstructed >>>>>>> image >>>>>>> that is smeared out around the high and low density areas [see >>>>>>> attached >>>>>>> image] >>>>>>> >>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>> Scripps >>>>>>> (~520 projections). Fixed detector and source (offset=0) with SID=2m, >>>>>>> SDD=3m. >>>>>>> >>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>> algorithm). >>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>> software works >>>>>>> perfectly. >>>>>>> >>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>> creates >>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>> If the first few projections are excluded, the following projection >>>>>>> will act >>>>>>> the same way. >>>>>>> >>>>>>> The projections are corrected for beam hardening and all the >>>>>>> projections >>>>>>> have the expected attenuation. >>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>> reconstruction >>>>>>> makes the same artifacts. >>>>>>> >>>>>>> Setting the value of the first and last projection to zero has the >>>>>>> same >>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>> not the >>>>>>> artifacts. >>>>>>> >>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>> >>>>>>> Best regards >>>>>>> Andreas >>>>>>> >>>>>>> __________________________________ >>>>>>> >>>>>>> Andreas Gravgaard Andersen >>>>>>> >>>>>>> Department of Oncology, >>>>>>> >>>>>>> Aarhus University Hospital >>>>>>> >>>>>>> N?rrebrogade 44, >>>>>>> >>>>>>> 8000, Aarhus C >>>>>>> >>>>>>> Mail: andreasg at phys.au.dk >>>>>>> >>>>>>> Cell: +45 3165 8140 >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Thu Nov 24 01:34:58 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Thu, 24 Nov 2016 06:34:58 +0000 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: , Message-ID: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Hi Simon, Thanks for the script. I was wondering if you could also share the csv or a dummy file? I'm unsure of what the second column contains. An offset distance to the rotation axis? Or the height? Which distance was known in your example? From the code it looks like the distance to the rotation axis? Sepp On 22 Nov 2016, at 08.01, Simon Rit > wrote: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt > wrote: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 24 01:44:42 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 24 Nov 2016 07:44:42 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> References: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Message-ID: Hi, Enclosed. Column 1 is platform angle, 2 is bb height, 3 is the u coordinate (in pixel) and 4 is the v coordinate (in pixel too). I had approximately measured the source-to-detector (270) and source-to-isocenter (210) distances but they were still optimized to have a better assessment. Simon On Thu, Nov 24, 2016 at 7:34 AM, Sepp de Raedt wrote: > Hi Simon, > > Thanks for the script. I was wondering if you could also share the csv or > a dummy file? I'm unsure of what the second column contains. An offset > distance to the rotation axis? Or the height? > > Which distance was known in your example? From the code it looks like the > distance to the rotation axis? > > Sepp > > On 22 Nov 2016, at 08.01, Simon Rit > wrote: > > Hi Sepp, > I did do a calibration script on a micro CT platform. The idea was that I > had a bb taken from 4 different view points at 4 different heights with a > known distance. Their projected position was segmented beforehand on the > projections and I tried to match the projections by optimizing the > calibration (which we see in before.pdf and after.pdf). I don't think it's > a good script, e.g., because I tried to find 8 parameters when 7 are > sufficient for my system (see, e.g., this paper > ). > But this gives you a starting point to develop your own script which will > hopefully be better. Please share if you do something from it! > Thanks, > Simon > > On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > >> Hi RTK users, >> >> I'm interested in reconstructing images acquired by a fluoroscopy system >> rotating around a knee phantom. Unfortunately, I've been unsuccessful so >> far. I recognize some of the phantom in the reconstructed image, but it >> contains double contours and the shape is deformed. >> >> I think the issue might be incorrect geometry specification. I have >> images also including a phantom containing markers for which we know the >> coordinates, which should allow us to calibrate the system. On the wiki on >> image quality, I saw that some users had developed scripts to do the >> calibration? Would someone be willing to share it? >> >> Kind regards, >> Sepp >> >> ______________________________________________________________________ >> This email has been scanned by the Symantec Email Security.cloud service. >> For more information please visit http://www.symanteccloud.com >> ______________________________________________________________________ >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > > > > > > > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CentroidPositions_H5_to_H25_90degstep.csv Type: text/csv Size: 321 bytes Desc: not available URL: From andreasg at phys.au.dk Fri Nov 25 10:25:55 2016 From: andreasg at phys.au.dk (Andreas Gravgaard Andersen) Date: Fri, 25 Nov 2016 16:25:55 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Simon, I have created a pull-request with the XIM file reader. I'm sorry for being late with the promised pull-request (there were a lot of merge conflicts, so it got postponed). I have cleaned it up, but it is still not flawless as mentioned in the pull-request-message. I have tried to keep the RTK coding-style by creating it as a modified HND file reader, but I have only a year of experience with C++, so I apologize if I've left some ugly code in there.. Best regards Andreas __________________________________ Andreas Gravgaard Andersen Department of Oncology, Aarhus University Hospital N?rrebrogade 44, 8000, Aarhus C Mail: andreasg at phys.au.dk Cell: +45 3165 8140 2016-11-23 18:44 GMT+01:00 Simon Rit : > Dear Andreas, > Today we had the RTK training and some users were looking for a XIM file > reader. I pointed to your contributions but any chance to have it put in > RTK soon? > Thanks in advance, > Simon > > On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit > wrote: > >> Hi, >> Thanks for sharing. There still seems to be some streak artefacts, do you >> see the same in the Varian reconstruction? >> I'm looking forward to the pull-request, I think we should try to make >> the bzip2 optional. >> Simon >> >> On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < >> andreasg at phys.au.dk> wrote: >> >>> Thanks for the fast response Simon! >>> >>> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >>> right all along! >>> I just didn't get why it makes a difference. I think I do now, as the >>> resulting image was flipped upside down and not left/right as I expected. >>> [attached] >>> >>> The reconstruction is significantly better, I'll look into what should >>> be included in the reader and what I should keep in my program to keep >>> conformity with the other readers. Then I'll create a pull request. >>> >>> Just for the purpose of others hitting the same or a similar bug, I also >>> attempted: >>> I did the SART reconstruction with 10 iterations, lambda=0.3, and >>> Joseph back/forward projection, *but with no* significant improvement >>> [attached] >>> >>> And: >>> If you want you can download the data set from: [Dropbox link to 460MB >>> zip (I'll >>> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >>> is used along with the Scan.xml (Calibrations folder may be used in the >>> future in my program, but I'm not sure if you can rely on the existence of >>> the content). >>> >>> A MatLab XimReader is available: link >>> (also >>> available from Varian bitbucket along a with a python version and a >>> C#->matlab plugin >>> ). >>> Otherwise my fork with the RTK-style reader is available from the same >>> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >>> so bzip2 is a new dependancy). >>> >>> Best regards >>> Andreas >>> >>> >>> __________________________________ >>> >>> Andreas Gravgaard Andersen >>> >>> Department of Oncology, >>> >>> Aarhus University Hospital >>> >>> N?rrebrogade 44, >>> >>> 8000, Aarhus C >>> >>> Mail: andreasg at phys.au.dk >>> >>> Cell: +45 3165 8140 >>> >>> >>> >>> 2016-09-16 16:13 GMT+02:00 Simon Rit : >>> >>>> Hi, >>>> You can try any iterative reconstruction, they can also handle short >>>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>>> However, the nature of the artifacts indicate more a problem in the >>>> geometry in my opinion. I have seen such errors when, for example, rotating >>>> in the wrong direction. I can have a look if you share the dataset. >>>> Cheers, >>>> Simon >>>> >>>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>>> andreasg at phys.au.dk> wrote: >>>> >>>>> Thanks for the suggestions, Simon and Cyril! >>>>> >>>>> I have been carefully looking though the geometry and from what I >>>>> understand of the transformations matrices, the geometry looks correct/(as >>>>> expected). >>>>> >>>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>>> were because had used half-fan scans (full-arc). >>>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>>> artifacts occurs! >>>>> >>>>> Are there other (built-in) means of improving half-arc scans, than the >>>>> parker short scan filter? >>>>> >>>>> Parker short scan does a decent job, but the result is still far from >>>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>>> >>>>> Best regards >>>>> Andreas >>>>> >>>>> >>>>> __________________________________ >>>>> >>>>> Andreas Gravgaard Andersen >>>>> >>>>> Department of Oncology, >>>>> >>>>> Aarhus University Hospital >>>>> >>>>> N?rrebrogade 44, >>>>> >>>>> 8000, Aarhus C >>>>> >>>>> Mail: andreasg at phys.au.dk >>>>> >>>>> Cell: +45 3165 8140 >>>>> >>>>> >>>>> >>>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory >>>>> : >>>>> >>>>>> One suggestion since it works with the Hnd projections: >>>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>>> Xim projections) and output two projection stack files and two geometry >>>>>> files, then compare the projection stack files by subtracting one to the >>>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>>> are identical, then I do not see any reason why the reconstructions should >>>>>> be different, so my guess is that you will find differences. >>>>>> >>>>>> >>>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>>> >>>>>>> Hi, >>>>>>> I have almost never worked with Varian data but it looks like a >>>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>>> projections which results in assigning a bad geometry to each >>>>>>> projection. How did you name your projections? Maybe check that the >>>>>>> order matches that of the RTK geometry file. Otherwise, there might >>>>>>> be >>>>>>> an issue in the creation of the geometry file itself. >>>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>>> code when you feel it's ready. >>>>>>> Simon >>>>>>> >>>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>>> wrote: >>>>>>> >>>>>>>> Dear RTK experts, >>>>>>>> >>>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>>> format. I >>>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>>> available with RTK. >>>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>>> >>>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>>> in UI), >>>>>>>> however when reconstructing with a regular FDK I get a >>>>>>>> reconstructed image >>>>>>>> that is smeared out around the high and low density areas [see >>>>>>>> attached >>>>>>>> image] >>>>>>>> >>>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>>> Scripps >>>>>>>> (~520 projections). Fixed detector and source (offset=0) with >>>>>>>> SID=2m, >>>>>>>> SDD=3m. >>>>>>>> >>>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>>> algorithm). >>>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>>> software works >>>>>>>> perfectly. >>>>>>>> >>>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>>> creates >>>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>>> If the first few projections are excluded, the following projection >>>>>>>> will act >>>>>>>> the same way. >>>>>>>> >>>>>>>> The projections are corrected for beam hardening and all the >>>>>>>> projections >>>>>>>> have the expected attenuation. >>>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>>> reconstruction >>>>>>>> makes the same artifacts. >>>>>>>> >>>>>>>> Setting the value of the first and last projection to zero has the >>>>>>>> same >>>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>>> not the >>>>>>>> artifacts. >>>>>>>> >>>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>>> >>>>>>>> Best regards >>>>>>>> Andreas >>>>>>>> >>>>>>>> __________________________________ >>>>>>>> >>>>>>>> Andreas Gravgaard Andersen >>>>>>>> >>>>>>>> Department of Oncology, >>>>>>>> >>>>>>>> Aarhus University Hospital >>>>>>>> >>>>>>>> N?rrebrogade 44, >>>>>>>> >>>>>>>> 8000, Aarhus C >>>>>>>> >>>>>>>> Mail: andreasg at phys.au.dk >>>>>>>> >>>>>>>> Cell: +45 3165 8140 >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rtk-users mailing list >>>>>>>> Rtk-users at public.kitware.com >>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From w_ettehadi at yahoo.com Tue Nov 1 12:50:12 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Tue, 1 Nov 2016 16:50:12 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> Message-ID: <1400014065.1872614.1478019012480@mail.yahoo.com> Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards,Vahid -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 02:53:39 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 07:53:39 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1400014065.1872614.1478019012480@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> Message-ID: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: > Hello RTK users and developers, > > I already implemented the RTK and reconstructed some images with the > FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. > Now, I am trying to develop a model-based image reconstruction for our > cone-beam micro-CT. I see already that some iterative algorithms like > ART and its modifications and conjugate-gradient (CG) method are > implemented in the RTK. I want to develop a model-based reconstruction > through the Newton/quasi-Newton optimizations methods. I was wondering > is it possible to extract the gradient of least square function from > implemented algorithms like CG module? Any recommendation will be > appreciated. > > Best Regards, > Vahid > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Wed Nov 2 04:01:30 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 08:01:30 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have tried but I am not getting where to give --division 4 in my code. Please find my code given below and please let me know where I need to change in my code to make it work. int _tmain(int argc, _TCHAR* argv[]) { #pragma region "Variable declaration" const double PI = 3.14159265358979323846; float *angles; int nProj = 349; typedef unsigned short pixelType; typedef float OutpixelType; const int dimension = 3; typedef itk::Image imageType; typedef itk::ImageRegionConstIterator ImageIteratorType; imageType::Pointer Projections = imageType::New(); #pragma endregion "Variable declaration" Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); imageType::SpacingType pSpacing; pSpacing[0] = 0.2960; pSpacing[1] = 0.2960; pSpacing[2] = 0.2960; Projections->SetSpacing(pSpacing); imageType::PointType pOrigin; pOrigin[0] = -212.972; pOrigin[1] = -212.972; pOrigin[2] = -212.972; //-158.50; Projections->SetOrigin(pOrigin); Projections->Update(); //Read angles. char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; angles = new float[nProj]; angles = readAngles(angles_file, angles); #pragma region"Geometry" // Geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); for (unsigned int noProj = 0; noProj < nProj; noProj++) { geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // } typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); geometryWriter->SetFilename("D:\\geo.xml"); geometryWriter->SetObject(geometry); geometryWriter->WriteFile(); geometry->Update(); #pragma endregion "Geometry" //Define output image type #ifdef USE_CUDA typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #else typedef itk::Image OutPutImageType; typedef rtk::ParkerShortScanImageFilter PSSFType; typedef rtk::FDKConeBeamReconstructionFilter FDKType; #endif //ScatterCorrection typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); ScatterCorrection->SetInput(Projections); //VarianObiRawImageFilter typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); //Create the output image typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; ConstantImageSourceType::PointType origin_p; ConstantImageSourceType::SizeType size_p; ConstantImageSourceType::SpacingType spacing_p; ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); origin_p[0] = -127.5; origin_p[1] = -127.5; origin_p[2] = -127.5; size_p[0] = 512; size_p[1] = 512; size_p[2] = 512; spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); projectionsSource->SetOrigin(origin_p); projectionsSource->SetSpacing(spacing_p); projectionsSource->SetSize(size_p); projectionsSource->SetConstant(0); // Short scan image filter PSSFType::Pointer pssf = PSSFType::New(); pssf->SetInput(AttenuationFilter->GetOutput()); pssf->SetGeometry(geometry); pssf->InPlaceOff(); std::cout << "short scan image filter success" << std::endl; FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput(0, projectionsSource->GetOutput()); feldkamp->SetInput(1, pssf->GetOutput()); feldkamp->SetGeometry(geometry); feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); feldkamp->GetRampFilter()->SetHammingFrequency(5.0); feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); feldkamp->SetGPUEnabled(1); feldkamp->SetNumberOfThreads(10000); #pragma region "Write volume" //Create a raw io for writing itk::RawImageIO::Pointer io; io = itk::RawImageIO::New(); for (unsigned int i = 0; i < dimension; i++) { io->SetDimensions(i, size_p[i]); io->SetSpacing(i, spacing_p[i]); io->SetOrigin(i, origin_p[i]); } io->SetHeaderSize(0); io->SetByteOrderToLittleEndian(); io->SetPixelType(itk::ImageIOBase::SCALAR); io->SetNumberOfComponents(1); io->SetNumberOfDimensions(3); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(feldkamp->GetOutput()); try { writer->Update(); } catch (itk::ExceptionObject & excp) { std::cerr << "Error while writing the image " << std::endl; std::cerr << excp << std::endl; getchar(); } #pragma endregion "WriteVolume" delete[] angles; return 0; } Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > I was able to perform a reconstruction from your header and geometry > file, using the following command lines: > > rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > --phantomscale "128,128,128" --like Output.mhd > > rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > The first computes projections through a Shepp & Logan phantom, with the > same size, spacing, origin, etc... as your projections, using your > geometry file geo.xml. > > The second line performs the FDK reconstruction. I had to use both the > "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > on a Geforce GTX 780). "--lowmem" loads the projections into memory by > subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > parts, reconstructs them one by one, then assembles the results. Can you > run the same commands and let us know whether you still encounter the > crash you mentioned ? If it works, you can use your own projection data > in the second command line instead of "simulatedprojections.mha". > > Best, > > Cyril > > On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > > Dear Sir, > > > > Please find the Header file in the attachment. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> We do not need the projections file, at least not for a first stage of > >> error tracking. We only need the header. > >> Try the following command line: > >> > >> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >> > >> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >> what we need, and it is a very light text file. The "proj.raw" contains > >> the pixel values, but at the moment we do not need them. We will create > >> our own proj.raw file, filled with zeros, which should be enough to > >> track down the error you encounter. > >> > >> Looking forward to receiving your file, > >> Cyril > >> > >> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>> Dear Sir, > >>> > >>> The single raw file of the projections is 1.4 GB and we are > not > >> able to send this big file to you. Can you please suggest other > alternatives > >> for this? > >>> Or can you provide us the PC configuration to solve the > issue? > >>> > >>> Let me know if any other clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Hello Zahid, > >>>> > >>>> We will need the header of your projections file, too (It is best if > you > >>>> have all your projections as a single .mhd and a single .raw file, so > it > >>>> should be 3-D image, and you send only the .mhd file). > >>>> > >>>> Regards, > >>>> Cyril > >>>> > >>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> > >>>>> I have only used RTK version 1.3.0. but in the error > >>>> message it is showing RTK version 1.2.0. > >>>>> Please find the attachment of the geometry file of > our > >>>> projections. > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> Without some more information, it's unlikely that we find the source > of > >>>>>> the problem. Here are a few things you can do to help us (and > therefore > >>>>>> yourself): > >>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > the > >>>>>> Cuda forward and back projection filters since v1.2.0, so your > problem > >>>>>> might disappear just by upgrading to the new version > >>>>>> - create a small example that reproduces your problem. You can, for > >>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>> example). And send us the script > >>>>>> - OR send us your geometry file and the header of your projections > file > >>>>>> (no need to send the projection data itself, we'll create a > zero-filled > >>>>>> stack of projections), and the command line that crashes > >>>>>> > >>>>>> Best regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Simon Rit, > >>>>>>> > >>>>>>> Please find the screen shot in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> Senior Design Engineer > >>>>>>> Mobile No. +91-9738379729 > >>>>>>> > >>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>> http://www.panaceamedical.com > >>>>>>> Bangalore - India. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>> Cc: rtk-users at public.kitware.com > >> [mailto:rtk-users at public.kitware.com], > >>>>>> saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>> memory > >>>>>>>> error. If you use the command line tool rtkfdk, you should first > make > >>>>>> sure > >>>>>>>> that you use the --lowmem option to stream the projection images. > If > >> it > >>>>>> is > >>>>>>>> no sufficient, you can split your volume using the --divisions. The > >>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of > >> RTK > >>>> on > >>>>>>>> our case studies webpage > >>>>>> . > >>>>>>>> Simon > >>>>>>>> > >>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>> > >>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>> > >>>>>>>>>> I am unable to do 1024x1024x1024 > reconstruction > >>>> using > >>>>>> RTK > >>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > shoot > >> of > >>>>>>>>> the > >>>>>>>>>> same. > >>>>>>>>>> > >>>>>>>>>> I am using the following items given below. > >>>>>>>>>> > >>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >> application > >>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>> 5. CUDA 7. > >>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>> > >>>>>>>>>> Please provide the solution of this and let me > >> know > >>>> if > >>>>>>>> any > >>>>>>>>>> other clarification is required. > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> Thanks & Regards > >>>>>>>>>> > >>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>> Senior Design Engineer > >>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>> > >>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>> Bangalore - India. > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> ____________________________________________________________ > >>>>>>>>> ________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> Rtk-users mailing list > >>>>>>> Rtk-users at public.kitware.com > >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 04:33:32 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 09:33:32 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> References: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Message-ID: <398170fb-a69e-9781-73d5-2a419542d06d@creatis.insa-lyon.fr> Dear Zahid, The --divisions is an option of the command-line application rtkfdk. It is not directly an option of the FDKConeBeamReconstructionFilter : rather, it is passed to a streaming filter at the end of the pipeline. Look for the following bit of code in rtkfdk.cxx : // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput( pfeldkamp ); streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); You can find information on how a streaming filter works on this page: https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html I hope it helps, Cyril On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have tried but I am not getting where to give --division 4 in my code. > > > Please find my code given below and please let me know where I need to change in my code to make it work. > > > int _tmain(int argc, _TCHAR* argv[]) > { > #pragma region "Variable declaration" > const double PI = 3.14159265358979323846; > float *angles; > int nProj = 349; > typedef unsigned short pixelType; > typedef float OutpixelType; > const int dimension = 3; > typedef itk::Image imageType; > typedef itk::ImageRegionConstIterator ImageIteratorType; > imageType::Pointer Projections = imageType::New(); > > #pragma endregion "Variable declaration" > > Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > imageType::SpacingType pSpacing; > pSpacing[0] = 0.2960; > pSpacing[1] = 0.2960; > pSpacing[2] = 0.2960; > Projections->SetSpacing(pSpacing); > > imageType::PointType pOrigin; > pOrigin[0] = -212.972; > pOrigin[1] = -212.972; > pOrigin[2] = -212.972; //-158.50; > Projections->SetOrigin(pOrigin); > > Projections->Update(); > > //Read angles. > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > angles = new float[nProj]; > angles = readAngles(angles_file, angles); > > #pragma region"Geometry" > // Geometry object > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > GeometryType::Pointer geometry = GeometryType::New(); > for (unsigned int noProj = 0; noProj < nProj; noProj++) > { > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // > } > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > geometryWriter->SetFilename("D:\\geo.xml"); > geometryWriter->SetObject(geometry); > geometryWriter->WriteFile(); > geometry->Update(); > #pragma endregion "Geometry" > > //Define output image type > > #ifdef USE_CUDA > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > #else > typedef itk::Image OutPutImageType; > typedef rtk::ParkerShortScanImageFilter PSSFType; > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > #endif > > //ScatterCorrection > typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); > ScatterCorrection->SetInput(Projections); > > //VarianObiRawImageFilter > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; > RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > //Create the output image > typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; > ConstantImageSourceType::PointType origin_p; > ConstantImageSourceType::SizeType size_p; > ConstantImageSourceType::SpacingType spacing_p; > ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); > origin_p[0] = -127.5; > origin_p[1] = -127.5; > origin_p[2] = -127.5; > size_p[0] = 512; > size_p[1] = 512; > size_p[2] = 512; > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > projectionsSource->SetOrigin(origin_p); > projectionsSource->SetSpacing(spacing_p); > projectionsSource->SetSize(size_p); > projectionsSource->SetConstant(0); > > // Short scan image filter > PSSFType::Pointer pssf = PSSFType::New(); > pssf->SetInput(AttenuationFilter->GetOutput()); > pssf->SetGeometry(geometry); > pssf->InPlaceOff(); > std::cout << "short scan image filter success" << std::endl; > > FDKType::Pointer feldkamp = FDKType::New(); > feldkamp->SetInput(0, projectionsSource->GetOutput()); > feldkamp->SetInput(1, pssf->GetOutput()); > feldkamp->SetGeometry(geometry); > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > feldkamp->SetGPUEnabled(1); > feldkamp->SetNumberOfThreads(10000); > > #pragma region "Write volume" > > //Create a raw io for writing > > itk::RawImageIO::Pointer io; > io = itk::RawImageIO::New(); > > for (unsigned int i = 0; i < dimension; i++) > { > io->SetDimensions(i, size_p[i]); > io->SetSpacing(i, spacing_p[i]); > io->SetOrigin(i, origin_p[i]); > } > io->SetHeaderSize(0); > io->SetByteOrderToLittleEndian(); > io->SetPixelType(itk::ImageIOBase::SCALAR); > io->SetNumberOfComponents(1); > io->SetNumberOfDimensions(3); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(feldkamp->GetOutput()); > > try > { > writer->Update(); > } > catch (itk::ExceptionObject & excp) > { > std::cerr << "Error while writing the image " << std::endl; > std::cerr << excp << std::endl; > getchar(); > } > #pragma endregion "WriteVolume" > delete[] angles; > return 0; > } > > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> I was able to perform a reconstruction from your header and geometry >> file, using the following command lines: >> >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> --phantomscale "128,128,128" --like Output.mhd >> >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> >> The first computes projections through a Shepp & Logan phantom, with the >> same size, spacing, origin, etc... as your projections, using your >> geometry file geo.xml. >> >> The second line performs the FDK reconstruction. I had to use both the >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> parts, reconstructs them one by one, then assembles the results. Can you >> run the same commands and let us know whether you still encounter the >> crash you mentioned ? If it works, you can use your own projection data >> in the second command line instead of "simulatedprojections.mha". >> >> Best, >> >> Cyril >> >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> >>> Dear Sir, >>> >>> Please find the Header file in the attachment. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> We do not need the projections file, at least not for a first stage of >>>> error tracking. We only need the header. >>>> Try the following command line: >>>> >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>> >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>> what we need, and it is a very light text file. The "proj.raw" contains >>>> the pixel values, but at the moment we do not need them. We will create >>>> our own proj.raw file, filled with zeros, which should be enough to >>>> track down the error you encounter. >>>> >>>> Looking forward to receiving your file, >>>> Cyril >>>> >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>> Dear Sir, >>>>> >>>>> The single raw file of the projections is 1.4 GB and we are >> not >>>> able to send this big file to you. Can you please suggest other >> alternatives >>>> for this? >>>>> Or can you provide us the PC configuration to solve the >> issue? >>>>> Let me know if any other clarification is required. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Hello Zahid, >>>>>> >>>>>> We will need the header of your projections file, too (It is best if >> you >>>>>> have all your projections as a single .mhd and a single .raw file, so >> it >>>>>> should be 3-D image, and you send only the .mhd file). >>>>>> >>>>>> Regards, >>>>>> Cyril >>>>>> >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>> Dear Cyril Mory, >>>>>>> >>>>>>> >>>>>>> I have only used RTK version 1.3.0. but in the error >>>>>> message it is showing RTK version 1.2.0. >>>>>>> Please find the attachment of the geometry file of >> our >>>>>> projections. >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> Without some more information, it's unlikely that we find the source >> of >>>>>>>> the problem. Here are a few things you can do to help us (and >> therefore >>>>>>>> yourself): >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >> the >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >> problem >>>>>>>> might disappear just by upgrading to the new version >>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>> example). And send us the script >>>>>>>> - OR send us your geometry file and the header of your projections >> file >>>>>>>> (no need to send the projection data itself, we'll create a >> zero-filled >>>>>>>> stack of projections), and the command line that crashes >>>>>>>> >>>>>>>> Best regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Simon Rit, >>>>>>>>> >>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> Senior Design Engineer >>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>> >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>> http://www.panaceamedical.com >>>>>>>>> Bangalore - India. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>> Cc: rtk-users at public.kitware.com >>>> [mailto:rtk-users at public.kitware.com], >>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>> memory >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >> make >>>>>>>> sure >>>>>>>>>> that you use the --lowmem option to stream the projection images. >> If >>>> it >>>>>>>> is >>>>>>>>>> no sufficient, you can split your volume using the --divisions. The >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of >>>> RTK >>>>>> on >>>>>>>>>> our case studies webpage >>>>>>>> . >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>> >>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>> >>>>>>>>>>>> I am unable to do 1024x1024x1024 >> reconstruction >>>>>> using >>>>>>>> RTK >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >> shoot >>>> of >>>>>>>>>>> the >>>>>>>>>>>> same. >>>>>>>>>>>> >>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>> >>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>> application >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>> >>>>>>>>>>>> Please provide the solution of this and let me >>>> know >>>>>> if >>>>>>>>>> any >>>>>>>>>>>> other clarification is required. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>> >>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>> >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>> Bangalore - India. >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>> ________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rtk-users mailing list >>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 06:57:15 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 10:57:15 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. Please check my modified file writer code given below. // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput(feldkamp->GetOutput()); streamerBP->SetNumberOfStreamDivisions(4); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(streamerBP->GetOutput()); writer->SetNumberOfStreamDivisions(4); Please let me know if any clarification is required. Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The --divisions is an option of the command-line application rtkfdk. It > is not directly an option of the FDKConeBeamReconstructionFilter : > rather, it is passed to a streaming filter at the end of the pipeline. > Look for the following bit of code in rtkfdk.cxx : > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter CPUOutputImageType> StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput( pfeldkamp ); > streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > > You can find information on how a streaming filter works on this page: > > https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > I hope it helps, > > Cyril > > On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have tried but I am not getting where to give > --division 4 in my code. > > > > > > Please find my code given below and please let me know > where I need to change in my code to make it work. > > > > > > int _tmain(int argc, _TCHAR* argv[]) > > { > > #pragma region "Variable declaration" > > const double PI = 3.14159265358979323846; > > float *angles; > > int nProj = 349; > > typedef unsigned short pixelType; > > typedef float OutpixelType; > > const int dimension = 3; > > typedef itk::Image imageType; > > typedef itk::ImageRegionConstIterator ImageIteratorType; > > imageType::Pointer Projections = imageType::New(); > > > > #pragma endregion "Variable declaration" > > > > Projections = > ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > > imageType::SpacingType pSpacing; > > pSpacing[0] = 0.2960; > > pSpacing[1] = 0.2960; > > pSpacing[2] = 0.2960; > > Projections->SetSpacing(pSpacing); > > > > imageType::PointType pOrigin; > > pOrigin[0] = -212.972; > > pOrigin[1] = -212.972; > > pOrigin[2] = -212.972; //-158.50; > > Projections->SetOrigin(pOrigin); > > > > Projections->Update(); > > > > //Read angles. > > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > angles = new float[nProj]; > > angles = readAngles(angles_file, angles); > > > > #pragma region"Geometry" > > // Geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > for (unsigned int noProj = 0; noProj < nProj; noProj++) > > { > > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); > // 136 half fan //2.07 Kidwai // > > } > > > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > GeometryWriterType; > > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > > geometryWriter->SetFilename("D:\\geo.xml"); > > geometryWriter->SetObject(geometry); > > geometryWriter->WriteFile(); > > geometry->Update(); > > #pragma endregion "Geometry" > > > > //Define output image type > > > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef itk::Image OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter PSSFType; > > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > > #endif > > > > //ScatterCorrection > > typedef rtk::BoellaardScatterCorrectionImageFilter > BoellaardScatterCorrectionImageFilterType; > > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > BoellaardScatterCorrectionImageFilterType::New(); > > ScatterCorrection->SetInput(Projections); > > > > //VarianObiRawImageFilter > > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > RawImageFilterType; > > RawImageFilterType::Pointer AttenuationFilter = > RawImageFilterType::New(); > > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > > > //Create the output image > > typedef rtk::ConstantImageSource< OutPutImageType > > ConstantImageSourceType; > > ConstantImageSourceType::PointType origin_p; > > ConstantImageSourceType::SizeType size_p; > > ConstantImageSourceType::SpacingType spacing_p; > > ConstantImageSourceType::Pointer projectionsSource = > ConstantImageSourceType::New(); > > origin_p[0] = -127.5; > > origin_p[1] = -127.5; > > origin_p[2] = -127.5; > > size_p[0] = 512; > > size_p[1] = 512; > > size_p[2] = 512; > > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > > > projectionsSource->SetOrigin(origin_p); > > projectionsSource->SetSpacing(spacing_p); > > projectionsSource->SetSize(size_p); > > projectionsSource->SetConstant(0); > > > > // Short scan image filter > > PSSFType::Pointer pssf = PSSFType::New(); > > pssf->SetInput(AttenuationFilter->GetOutput()); > > pssf->SetGeometry(geometry); > > pssf->InPlaceOff(); > > std::cout << "short scan image filter success" << std::endl; > > > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput(0, projectionsSource->GetOutput()); > > feldkamp->SetInput(1, pssf->GetOutput()); > > feldkamp->SetGeometry(geometry); > > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > feldkamp->SetGPUEnabled(1); > > feldkamp->SetNumberOfThreads(10000); > > > > #pragma region "Write volume" > > > > //Create a raw io for writing > > > > itk::RawImageIO::Pointer io; > > io = itk::RawImageIO::New(); > > > > for (unsigned int i = 0; i < dimension; i++) > > { > > io->SetDimensions(i, size_p[i]); > > io->SetSpacing(i, spacing_p[i]); > > io->SetOrigin(i, origin_p[i]); > > } > > io->SetHeaderSize(0); > > io->SetByteOrderToLittleEndian(); > > io->SetPixelType(itk::ImageIOBase::SCALAR); > > io->SetNumberOfComponents(1); > > io->SetNumberOfDimensions(3); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(feldkamp->GetOutput()); > > > > try > > { > > writer->Update(); > > } > > catch (itk::ExceptionObject & excp) > > { > > std::cerr << "Error while writing the image " << std::endl; > > std::cerr << excp << std::endl; > > getchar(); > > } > > #pragma endregion "WriteVolume" > > delete[] angles; > > return 0; > > } > > > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> I was able to perform a reconstruction from your header and geometry > >> file, using the following command lines: > >> > >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >> --phantomscale "128,128,128" --like Output.mhd > >> > >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >> > >> The first computes projections through a Shepp & Logan phantom, with the > >> same size, spacing, origin, etc... as your projections, using your > >> geometry file geo.xml. > >> > >> The second line performs the FDK reconstruction. I had to use both the > >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >> parts, reconstructs them one by one, then assembles the results. Can you > >> run the same commands and let us know whether you still encounter the > >> crash you mentioned ? If it works, you can use your own projection data > >> in the second command line instead of "simulatedprojections.mha". > >> > >> Best, > >> > >> Cyril > >> > >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >> > >>> Dear Sir, > >>> > >>> Please find the Header file in the attachment. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> We do not need the projections file, at least not for a first stage of > >>>> error tracking. We only need the header. > >>>> Try the following command line: > >>>> > >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>> > >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>> what we need, and it is a very light text file. The "proj.raw" contains > >>>> the pixel values, but at the moment we do not need them. We will create > >>>> our own proj.raw file, filled with zeros, which should be enough to > >>>> track down the error you encounter. > >>>> > >>>> Looking forward to receiving your file, > >>>> Cyril > >>>> > >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Sir, > >>>>> > >>>>> The single raw file of the projections is 1.4 GB and we > are > >> not > >>>> able to send this big file to you. Can you please suggest other > >> alternatives > >>>> for this? > >>>>> Or can you provide us the PC configuration to solve the > >> issue? > >>>>> Let me know if any other clarification is required. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Hello Zahid, > >>>>>> > >>>>>> We will need the header of your projections file, too (It is best if > >> you > >>>>>> have all your projections as a single .mhd and a single .raw file, so > >> it > >>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>> > >>>>>> Regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Cyril Mory, > >>>>>>> > >>>>>>> > >>>>>>> I have only used RTK version 1.3.0. but in the > error > >>>>>> message it is showing RTK version 1.2.0. > >>>>>>> Please find the attachment of the geometry file > of > >> our > >>>>>> projections. > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> Without some more information, it's unlikely that we find the > source > >> of > >>>>>>>> the problem. Here are a few things you can do to help us (and > >> therefore > >>>>>>>> yourself): > >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > >> the > >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >> problem > >>>>>>>> might disappear just by upgrading to the new version > >>>>>>>> - create a small example that reproduces your problem. You can, for > >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>> example). And send us the script > >>>>>>>> - OR send us your geometry file and the header of your projections > >> file > >>>>>>>> (no need to send the projection data itself, we'll create a > >> zero-filled > >>>>>>>> stack of projections), and the command line that crashes > >>>>>>>> > >>>>>>>> Best regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Simon Rit, > >>>>>>>>> > >>>>>>>>> Please find the screen shot in the attachment. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> Senior Design Engineer > >>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>> > >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>> http://www.panaceamedical.com > >>>>>>>>> Bangalore - India. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>> Cc: rtk-users at public.kitware.com > >>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>>>> memory > >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first > >> make > >>>>>>>> sure > >>>>>>>>>> that you use the --lowmem option to stream the projection images. > >> If > >>>> it > >>>>>>>> is > >>>>>>>>>> no sufficient, you can split your volume using the --divisions. > The > >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > of > >>>> RTK > >>>>>> on > >>>>>>>>>> our case studies webpage > >>>>>>>> . > >>>>>>>>>> Simon > >>>>>>>>>> > >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>> > >>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>> > >>>>>>>>>>>> I am unable to do 1024x1024x1024 > >> reconstruction > >>>>>> using > >>>>>>>> RTK > >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >> shoot > >>>> of > >>>>>>>>>>> the > >>>>>>>>>>>> same. > >>>>>>>>>>>> > >>>>>>>>>>>> I am using the following items given below. > >>>>>>>>>>>> > >>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>> application > >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>> > >>>>>>>>>>>> Please provide the solution of this and let > me > >>>> know > >>>>>> if > >>>>>>>>>> any > >>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>> > >>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>> > >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>> ________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 08:27:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 13:27:18 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> References: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Message-ID: <84154ed0-3cb8-abf7-c253-3162d78bf7b7@creatis.insa-lyon.fr> I see two errors: Remove this line writer->SetNumberOfStreamDivisions(4); since only the streaming filter, not the write filter, needs to know about the number of divisions. And change the filename to "D:\\Output.mhd" It will write both the .mhd and the .raw files. I hope it helps, Cyril On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. > > Please check my modified file writer code given below. > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput(feldkamp->GetOutput()); > streamerBP->SetNumberOfStreamDivisions(4); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(streamerBP->GetOutput()); > writer->SetNumberOfStreamDivisions(4); > > > Please let me know if any clarification is required. > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> The --divisions is an option of the command-line application rtkfdk. It >> is not directly an option of the FDKConeBeamReconstructionFilter : >> rather, it is passed to a streaming filter at the end of the pipeline. >> Look for the following bit of code in rtkfdk.cxx : >> >> // Streaming depending on streaming capability of writer >> typedef itk::StreamingImageFilter> CPUOutputImageType> StreamerType; >> StreamerType::Pointer streamerBP = StreamerType::New(); >> streamerBP->SetInput( pfeldkamp ); >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >> >> You can find information on how a streaming filter works on this page: >> >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> >> I hope it helps, >> >> Cyril >> >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have tried but I am not getting where to give >> --division 4 in my code. >>> >>> Please find my code given below and please let me know >> where I need to change in my code to make it work. >>> >>> int _tmain(int argc, _TCHAR* argv[]) >>> { >>> #pragma region "Variable declaration" >>> const double PI = 3.14159265358979323846; >>> float *angles; >>> int nProj = 349; >>> typedef unsigned short pixelType; >>> typedef float OutpixelType; >>> const int dimension = 3; >>> typedef itk::Image imageType; >>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>> imageType::Pointer Projections = imageType::New(); >>> >>> #pragma endregion "Variable declaration" >>> >>> Projections = >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); >>> imageType::SpacingType pSpacing; >>> pSpacing[0] = 0.2960; >>> pSpacing[1] = 0.2960; >>> pSpacing[2] = 0.2960; >>> Projections->SetSpacing(pSpacing); >>> >>> imageType::PointType pOrigin; >>> pOrigin[0] = -212.972; >>> pOrigin[1] = -212.972; >>> pOrigin[2] = -212.972; //-158.50; >>> Projections->SetOrigin(pOrigin); >>> >>> Projections->Update(); >>> >>> //Read angles. >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>> angles = new float[nProj]; >>> angles = readAngles(angles_file, angles); >>> >>> #pragma region"Geometry" >>> // Geometry object >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> GeometryType::Pointer geometry = GeometryType::New(); >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>> { >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); >> // 136 half fan //2.07 Kidwai // >>> } >>> >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> GeometryWriterType; >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>> geometryWriter->SetFilename("D:\\geo.xml"); >>> geometryWriter->SetObject(geometry); >>> geometryWriter->WriteFile(); >>> geometry->Update(); >>> #pragma endregion "Geometry" >>> >>> //Define output image type >>> >>> #ifdef USE_CUDA >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> #else >>> typedef itk::Image OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>> #endif >>> >>> //ScatterCorrection >>> typedef rtk::BoellaardScatterCorrectionImageFilter >> BoellaardScatterCorrectionImageFilterType; >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >> BoellaardScatterCorrectionImageFilterType::New(); >>> ScatterCorrection->SetInput(Projections); >>> >>> //VarianObiRawImageFilter >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> RawImageFilterType; >>> RawImageFilterType::Pointer AttenuationFilter = >> RawImageFilterType::New(); >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>> >>> //Create the output image >>> typedef rtk::ConstantImageSource< OutPutImageType > >> ConstantImageSourceType; >>> ConstantImageSourceType::PointType origin_p; >>> ConstantImageSourceType::SizeType size_p; >>> ConstantImageSourceType::SpacingType spacing_p; >>> ConstantImageSourceType::Pointer projectionsSource = >> ConstantImageSourceType::New(); >>> origin_p[0] = -127.5; >>> origin_p[1] = -127.5; >>> origin_p[2] = -127.5; >>> size_p[0] = 512; >>> size_p[1] = 512; >>> size_p[2] = 512; >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>> >>> projectionsSource->SetOrigin(origin_p); >>> projectionsSource->SetSpacing(spacing_p); >>> projectionsSource->SetSize(size_p); >>> projectionsSource->SetConstant(0); >>> >>> // Short scan image filter >>> PSSFType::Pointer pssf = PSSFType::New(); >>> pssf->SetInput(AttenuationFilter->GetOutput()); >>> pssf->SetGeometry(geometry); >>> pssf->InPlaceOff(); >>> std::cout << "short scan image filter success" << std::endl; >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>> feldkamp->SetInput(1, pssf->GetOutput()); >>> feldkamp->SetGeometry(geometry); >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>> feldkamp->SetGPUEnabled(1); >>> feldkamp->SetNumberOfThreads(10000); >>> >>> #pragma region "Write volume" >>> >>> //Create a raw io for writing >>> >>> itk::RawImageIO::Pointer io; >>> io = itk::RawImageIO::New(); >>> >>> for (unsigned int i = 0; i < dimension; i++) >>> { >>> io->SetDimensions(i, size_p[i]); >>> io->SetSpacing(i, spacing_p[i]); >>> io->SetOrigin(i, origin_p[i]); >>> } >>> io->SetHeaderSize(0); >>> io->SetByteOrderToLittleEndian(); >>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>> io->SetNumberOfComponents(1); >>> io->SetNumberOfDimensions(3); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(feldkamp->GetOutput()); >>> >>> try >>> { >>> writer->Update(); >>> } >>> catch (itk::ExceptionObject & excp) >>> { >>> std::cerr << "Error while writing the image " << std::endl; >>> std::cerr << excp << std::endl; >>> getchar(); >>> } >>> #pragma endregion "WriteVolume" >>> delete[] angles; >>> return 0; >>> } >>> >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> I was able to perform a reconstruction from your header and geometry >>>> file, using the following command lines: >>>> >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>> --phantomscale "128,128,128" --like Output.mhd >>>> >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>> >>>> The first computes projections through a Shepp & Logan phantom, with the >>>> same size, spacing, origin, etc... as your projections, using your >>>> geometry file geo.xml. >>>> >>>> The second line performs the FDK reconstruction. I had to use both the >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>> parts, reconstructs them one by one, then assembles the results. Can you >>>> run the same commands and let us know whether you still encounter the >>>> crash you mentioned ? If it works, you can use your own projection data >>>> in the second command line instead of "simulatedprojections.mha". >>>> >>>> Best, >>>> >>>> Cyril >>>> >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>> >>>>> Dear Sir, >>>>> >>>>> Please find the Header file in the attachment. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> We do not need the projections file, at least not for a first stage of >>>>>> error tracking. We only need the header. >>>>>> Try the following command line: >>>>>> >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>> >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>> what we need, and it is a very light text file. The "proj.raw" contains >>>>>> the pixel values, but at the moment we do not need them. We will create >>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>> track down the error you encounter. >>>>>> >>>>>> Looking forward to receiving your file, >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>> Dear Sir, >>>>>>> >>>>>>> The single raw file of the projections is 1.4 GB and we >> are >>>> not >>>>>> able to send this big file to you. Can you please suggest other >>>> alternatives >>>>>> for this? >>>>>>> Or can you provide us the PC configuration to solve the >>>> issue? >>>>>>> Let me know if any other clarification is required. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Hello Zahid, >>>>>>>> >>>>>>>> We will need the header of your projections file, too (It is best if >>>> you >>>>>>>> have all your projections as a single .mhd and a single .raw file, so >>>> it >>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>> >>>>>>>> Regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Cyril Mory, >>>>>>>>> >>>>>>>>> >>>>>>>>> I have only used RTK version 1.3.0. but in the >> error >>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>> Please find the attachment of the geometry file >> of >>>> our >>>>>>>> projections. >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> >>>>>>>>>> Without some more information, it's unlikely that we find the >> source >>>> of >>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>> therefore >>>>>>>>>> yourself): >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >>>> the >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>> problem >>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>> example). And send us the script >>>>>>>>>> - OR send us your geometry file and the header of your projections >>>> file >>>>>>>>>> (no need to send the projection data itself, we'll create a >>>> zero-filled >>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>> >>>>>>>>>> Best regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>> >>>>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> Senior Design Engineer >>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>> >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>> Bangalore - India. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>>>> memory >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >>>> make >>>>>>>>>> sure >>>>>>>>>>>> that you use the --lowmem option to stream the projection images. >>>> If >>>>>> it >>>>>>>>>> is >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >> The >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >> of >>>>>> RTK >>>>>>>> on >>>>>>>>>>>> our case studies webpage >>>>>>>>>> . >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>> reconstruction >>>>>>>> using >>>>>>>>>> RTK >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>> shoot >>>>>> of >>>>>>>>>>>>> the >>>>>>>>>>>>>> same. >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>>>> >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>> application >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Please provide the solution of this and let >> me >>>>>> know >>>>>>>> if >>>>>>>>>>>> any >>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>> >>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>> >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url >> : >>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>> ________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>> >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>>>> >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 09:37:23 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 13:37:23 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. Please suggest us for further process. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > I see two errors: > > Remove this line > > writer->SetNumberOfStreamDivisions(4); > > since only the streaming filter, not the write filter, needs to know > about the number of divisions. > And change the filename to > > "D:\\Output.mhd" > > It will write both the .mhd and the .raw files. > > I hope it helps, > Cyril > > On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have modified my file writer code and used > StreamingImageFilter. Now its not giving any error message but the final > output is 0 byte for 1024 volume. It working fine for 512 volume. > > > > Please check my modified file writer code given below. > > > > // Streaming depending on streaming capability of writer > > typedef itk::StreamingImageFilter > StreamerType; > > StreamerType::Pointer streamerBP = StreamerType::New(); > > streamerBP->SetInput(feldkamp->GetOutput()); > > streamerBP->SetNumberOfStreamDivisions(4); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(streamerBP->GetOutput()); > > writer->SetNumberOfStreamDivisions(4); > > > > > > Please let me know if any clarification is required. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> The --divisions is an option of the command-line application rtkfdk. It > >> is not directly an option of the FDKConeBeamReconstructionFilter : > >> rather, it is passed to a streaming filter at the end of the pipeline. > >> Look for the following bit of code in rtkfdk.cxx : > >> > >> // Streaming depending on streaming capability of writer > >> typedef itk::StreamingImageFilter >> CPUOutputImageType> StreamerType; > >> StreamerType::Pointer streamerBP = StreamerType::New(); > >> streamerBP->SetInput( pfeldkamp ); > >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >> > >> You can find information on how a streaming filter works on this page: > >> > >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >> > >> I hope it helps, > >> > >> Cyril > >> > >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have tried but I am not getting where to give > >> --division 4 in my code. > >>> > >>> Please find my code given below and please let me know > >> where I need to change in my code to make it work. > >>> > >>> int _tmain(int argc, _TCHAR* argv[]) > >>> { > >>> #pragma region "Variable declaration" > >>> const double PI = 3.14159265358979323846; > >>> float *angles; > >>> int nProj = 349; > >>> typedef unsigned short pixelType; > >>> typedef float OutpixelType; > >>> const int dimension = 3; > >>> typedef itk::Image imageType; > >>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>> imageType::Pointer Projections = imageType::New(); > >>> > >>> #pragma endregion "Variable declaration" > >>> > >>> Projections = > >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > nProj); > >>> imageType::SpacingType pSpacing; > >>> pSpacing[0] = 0.2960; > >>> pSpacing[1] = 0.2960; > >>> pSpacing[2] = 0.2960; > >>> Projections->SetSpacing(pSpacing); > >>> > >>> imageType::PointType pOrigin; > >>> pOrigin[0] = -212.972; > >>> pOrigin[1] = -212.972; > >>> pOrigin[2] = -212.972; //-158.50; > >>> Projections->SetOrigin(pOrigin); > >>> > >>> Projections->Update(); > >>> > >>> //Read angles. > >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>> angles = new float[nProj]; > >>> angles = readAngles(angles_file, angles); > >>> > >>> #pragma region"Geometry" > >>> // Geometry object > >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>> GeometryType::Pointer geometry = GeometryType::New(); > >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>> { > >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > 0); > >> // 136 half fan //2.07 Kidwai // > >>> } > >>> > >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >> GeometryWriterType; > >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > >>> geometryWriter->SetFilename("D:\\geo.xml"); > >>> geometryWriter->SetObject(geometry); > >>> geometryWriter->WriteFile(); > >>> geometry->Update(); > >>> #pragma endregion "Geometry" > >>> > >>> //Define output image type > >>> > >>> #ifdef USE_CUDA > >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>> #else > >>> typedef itk::Image OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; > >>> #endif > >>> > >>> //ScatterCorrection > >>> typedef rtk::BoellaardScatterCorrectionImageFilter > > >> BoellaardScatterCorrectionImageFilterType; > >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > >> BoellaardScatterCorrectionImageFilterType::New(); > >>> ScatterCorrection->SetInput(Projections); > >>> > >>> //VarianObiRawImageFilter > >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >> RawImageFilterType; > >>> RawImageFilterType::Pointer AttenuationFilter = > >> RawImageFilterType::New(); > >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>> > >>> //Create the output image > >>> typedef rtk::ConstantImageSource< OutPutImageType > > >> ConstantImageSourceType; > >>> ConstantImageSourceType::PointType origin_p; > >>> ConstantImageSourceType::SizeType size_p; > >>> ConstantImageSourceType::SpacingType spacing_p; > >>> ConstantImageSourceType::Pointer projectionsSource = > >> ConstantImageSourceType::New(); > >>> origin_p[0] = -127.5; > >>> origin_p[1] = -127.5; > >>> origin_p[2] = -127.5; > >>> size_p[0] = 512; > >>> size_p[1] = 512; > >>> size_p[2] = 512; > >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>> > >>> projectionsSource->SetOrigin(origin_p); > >>> projectionsSource->SetSpacing(spacing_p); > >>> projectionsSource->SetSize(size_p); > >>> projectionsSource->SetConstant(0); > >>> > >>> // Short scan image filter > >>> PSSFType::Pointer pssf = PSSFType::New(); > >>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>> pssf->SetGeometry(geometry); > >>> pssf->InPlaceOff(); > >>> std::cout << "short scan image filter success" << std::endl; > >>> > >>> FDKType::Pointer feldkamp = FDKType::New(); > >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>> feldkamp->SetInput(1, pssf->GetOutput()); > >>> feldkamp->SetGeometry(geometry); > >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>> feldkamp->SetGPUEnabled(1); > >>> feldkamp->SetNumberOfThreads(10000); > >>> > >>> #pragma region "Write volume" > >>> > >>> //Create a raw io for writing > >>> > >>> itk::RawImageIO::Pointer io; > >>> io = itk::RawImageIO::New(); > >>> > >>> for (unsigned int i = 0; i < dimension; i++) > >>> { > >>> io->SetDimensions(i, size_p[i]); > >>> io->SetSpacing(i, spacing_p[i]); > >>> io->SetOrigin(i, origin_p[i]); > >>> } > >>> io->SetHeaderSize(0); > >>> io->SetByteOrderToLittleEndian(); > >>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>> io->SetNumberOfComponents(1); > >>> io->SetNumberOfDimensions(3); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(feldkamp->GetOutput()); > >>> > >>> try > >>> { > >>> writer->Update(); > >>> } > >>> catch (itk::ExceptionObject & excp) > >>> { > >>> std::cerr << "Error while writing the image " << std::endl; > >>> std::cerr << excp << std::endl; > >>> getchar(); > >>> } > >>> #pragma endregion "WriteVolume" > >>> delete[] angles; > >>> return 0; > >>> } > >>> > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> I was able to perform a reconstruction from your header and geometry > >>>> file, using the following command lines: > >>>> > >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>> --phantomscale "128,128,128" --like Output.mhd > >>>> > >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > --hardware > >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>> > >>>> The first computes projections through a Shepp & Logan phantom, with > the > >>>> same size, spacing, origin, etc... as your projections, using your > >>>> geometry file geo.xml. > >>>> > >>>> The second line performs the FDK reconstruction. I had to use both the > >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>> parts, reconstructs them one by one, then assembles the results. Can > you > >>>> run the same commands and let us know whether you still encounter the > >>>> crash you mentioned ? If it works, you can use your own projection data > >>>> in the second command line instead of "simulatedprojections.mha". > >>>> > >>>> Best, > >>>> > >>>> Cyril > >>>> > >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>> > >>>>> Dear Sir, > >>>>> > >>>>> Please find the Header file in the attachment. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> We do not need the projections file, at least not for a first stage > of > >>>>>> error tracking. We only need the header. > >>>>>> Try the following command line: > >>>>>> > >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>> > >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>>>> what we need, and it is a very light text file. The "proj.raw" > contains > >>>>>> the pixel values, but at the moment we do not need them. We will > create > >>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>> track down the error you encounter. > >>>>>> > >>>>>> Looking forward to receiving your file, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> The single raw file of the projections is 1.4 GB and > we > >> are > >>>> not > >>>>>> able to send this big file to you. Can you please suggest other > >>>> alternatives > >>>>>> for this? > >>>>>>> Or can you provide us the PC configuration to solve > the > >>>> issue? > >>>>>>> Let me know if any other clarification is required. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Hello Zahid, > >>>>>>>> > >>>>>>>> We will need the header of your projections file, too (It is best > if > >>>> you > >>>>>>>> have all your projections as a single .mhd and a single .raw file, > so > >>>> it > >>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>> > >>>>>>>> Regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Cyril Mory, > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> I have only used RTK version 1.3.0. but in the > >> error > >>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>> Please find the attachment of the geometry > file > >> of > >>>> our > >>>>>>>> projections. > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> > >>>>>>>>>> Without some more information, it's unlikely that we find the > >> source > >>>> of > >>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>> therefore > >>>>>>>>>> yourself): > >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes > in > >>>> the > >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>> problem > >>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>> - create a small example that reproduces your problem. You can, > for > >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > logan > >>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>>>> example). And send us the script > >>>>>>>>>> - OR send us your geometry file and the header of your > projections > >>>> file > >>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>> zero-filled > >>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>> > >>>>>>>>>> Best regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>> > >>>>>>>>>>> Please find the screen shot in the > attachment. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>> > >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > CUDA > >>>>>>>> memory > >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > first > >>>> make > >>>>>>>>>> sure > >>>>>>>>>>>> that you use the --lowmem option to stream the projection > images. > >>>> If > >>>>>> it > >>>>>>>>>> is > >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. > >> The > >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > >> of > >>>>>> RTK > >>>>>>>> on > >>>>>>>>>>>> our case studies webpage > >>>>>>>>>> . > >>>>>>>>>>>> Simon > >>>>>>>>>>>> > >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>> reconstruction > >>>>>>>> using > >>>>>>>>>> RTK > >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >>>> shoot > >>>>>> of > >>>>>>>>>>>>> the > >>>>>>>>>>>>>> same. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am using the following items given > below. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>>>> application > >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Please provide the solution of this and > let > >> me > >>>>>> know > >>>>>>>> if > >>>>>>>>>>>> any > >>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, > >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > >> : > >>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>> ________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>> > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: RTK_Error.png Type: image/png Size: 57211 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 10:00:50 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 15:00:50 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> References: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Message-ID: <94e0045d-ef88-726d-9b7b-8b5ebf5ac067@creatis.insa-lyon.fr> Dear Zahid, The output looks correct. If the command line solution I suggested in a previous email works, the best way to move forward would be to compare your code and that of rtkfdk.cxx, and where it differs, make sure you have not introduced an error. Cyril On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. > > Please suggest us for further process. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> I see two errors: >> >> Remove this line >> >> writer->SetNumberOfStreamDivisions(4); >> >> since only the streaming filter, not the write filter, needs to know >> about the number of divisions. >> And change the filename to >> >> "D:\\Output.mhd" >> >> It will write both the .mhd and the .raw files. >> >> I hope it helps, >> Cyril >> >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have modified my file writer code and used >> StreamingImageFilter. Now its not giving any error message but the final >> output is 0 byte for 1024 volume. It working fine for 512 volume. >>> Please check my modified file writer code given below. >>> >>> // Streaming depending on streaming capability of writer >>> typedef itk::StreamingImageFilter >> StreamerType; >>> StreamerType::Pointer streamerBP = StreamerType::New(); >>> streamerBP->SetInput(feldkamp->GetOutput()); >>> streamerBP->SetNumberOfStreamDivisions(4); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(streamerBP->GetOutput()); >>> writer->SetNumberOfStreamDivisions(4); >>> >>> >>> Please let me know if any clarification is required. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> The --divisions is an option of the command-line application rtkfdk. It >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >>>> rather, it is passed to a streaming filter at the end of the pipeline. >>>> Look for the following bit of code in rtkfdk.cxx : >>>> >>>> // Streaming depending on streaming capability of writer >>>> typedef itk::StreamingImageFilter>>> CPUOutputImageType> StreamerType; >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >>>> streamerBP->SetInput( pfeldkamp ); >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >>>> >>>> You can find information on how a streaming filter works on this page: >>>> >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >>>> >>>> I hope it helps, >>>> >>>> Cyril >>>> >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>>>> Dear Cyril Mory, >>>>> >>>>> I have tried but I am not getting where to give >>>> --division 4 in my code. >>>>> Please find my code given below and please let me know >>>> where I need to change in my code to make it work. >>>>> int _tmain(int argc, _TCHAR* argv[]) >>>>> { >>>>> #pragma region "Variable declaration" >>>>> const double PI = 3.14159265358979323846; >>>>> float *angles; >>>>> int nProj = 349; >>>>> typedef unsigned short pixelType; >>>>> typedef float OutpixelType; >>>>> const int dimension = 3; >>>>> typedef itk::Image imageType; >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>>>> imageType::Pointer Projections = imageType::New(); >>>>> >>>>> #pragma endregion "Variable declaration" >>>>> >>>>> Projections = >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> nProj); >>>>> imageType::SpacingType pSpacing; >>>>> pSpacing[0] = 0.2960; >>>>> pSpacing[1] = 0.2960; >>>>> pSpacing[2] = 0.2960; >>>>> Projections->SetSpacing(pSpacing); >>>>> >>>>> imageType::PointType pOrigin; >>>>> pOrigin[0] = -212.972; >>>>> pOrigin[1] = -212.972; >>>>> pOrigin[2] = -212.972; //-158.50; >>>>> Projections->SetOrigin(pOrigin); >>>>> >>>>> Projections->Update(); >>>>> >>>>> //Read angles. >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>>>> angles = new float[nProj]; >>>>> angles = readAngles(angles_file, angles); >>>>> >>>>> #pragma region"Geometry" >>>>> // Geometry object >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>>>> { >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, >> 0); >>>> // 136 half fan //2.07 Kidwai // >>>>> } >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >>>> GeometryWriterType; >>>>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >>>>> geometryWriter->SetObject(geometry); >>>>> geometryWriter->WriteFile(); >>>>> geometry->Update(); >>>>> #pragma endregion "Geometry" >>>>> >>>>> //Define output image type >>>>> >>>>> #ifdef USE_CUDA >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> #else >>>>> typedef itk::Image OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>>>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>>>> #endif >>>>> >>>>> //ScatterCorrection >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter>>> BoellaardScatterCorrectionImageFilterType; >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >>>> BoellaardScatterCorrectionImageFilterType::New(); >>>>> ScatterCorrection->SetInput(Projections); >>>>> >>>>> //VarianObiRawImageFilter >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >>>> RawImageFilterType; >>>>> RawImageFilterType::Pointer AttenuationFilter = >>>> RawImageFilterType::New(); >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>>>> >>>>> //Create the output image >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >>>> ConstantImageSourceType; >>>>> ConstantImageSourceType::PointType origin_p; >>>>> ConstantImageSourceType::SizeType size_p; >>>>> ConstantImageSourceType::SpacingType spacing_p; >>>>> ConstantImageSourceType::Pointer projectionsSource = >>>> ConstantImageSourceType::New(); >>>>> origin_p[0] = -127.5; >>>>> origin_p[1] = -127.5; >>>>> origin_p[2] = -127.5; >>>>> size_p[0] = 512; >>>>> size_p[1] = 512; >>>>> size_p[2] = 512; >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>>>> >>>>> projectionsSource->SetOrigin(origin_p); >>>>> projectionsSource->SetSpacing(spacing_p); >>>>> projectionsSource->SetSize(size_p); >>>>> projectionsSource->SetConstant(0); >>>>> >>>>> // Short scan image filter >>>>> PSSFType::Pointer pssf = PSSFType::New(); >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >>>>> pssf->SetGeometry(geometry); >>>>> pssf->InPlaceOff(); >>>>> std::cout << "short scan image filter success" << std::endl; >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >>>>> feldkamp->SetGeometry(geometry); >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>>>> feldkamp->SetGPUEnabled(1); >>>>> feldkamp->SetNumberOfThreads(10000); >>>>> >>>>> #pragma region "Write volume" >>>>> >>>>> //Create a raw io for writing >>>>> >>>>> itk::RawImageIO::Pointer io; >>>>> io = itk::RawImageIO::New(); >>>>> >>>>> for (unsigned int i = 0; i < dimension; i++) >>>>> { >>>>> io->SetDimensions(i, size_p[i]); >>>>> io->SetSpacing(i, spacing_p[i]); >>>>> io->SetOrigin(i, origin_p[i]); >>>>> } >>>>> io->SetHeaderSize(0); >>>>> io->SetByteOrderToLittleEndian(); >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>>>> io->SetNumberOfComponents(1); >>>>> io->SetNumberOfDimensions(3); >>>>> >>>>> //create a writer and write reconstructed file >>>>> itk::ImageFileWriter::Pointer writer; >>>>> writer = itk::ImageFileWriter::New(); >>>>> writer->SetFileName("D:\\Output.raw"); >>>>> writer->SetImageIO(io); >>>>> writer->SetInput(feldkamp->GetOutput()); >>>>> >>>>> try >>>>> { >>>>> writer->Update(); >>>>> } >>>>> catch (itk::ExceptionObject & excp) >>>>> { >>>>> std::cerr << "Error while writing the image " << std::endl; >>>>> std::cerr << excp << std::endl; >>>>> getchar(); >>>>> } >>>>> #pragma endregion "WriteVolume" >>>>> delete[] angles; >>>>> return 0; >>>>> } >>>>> >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> Senior Design Engineer >>>>> Mobile No. +91-9738379729 >>>>> >>>>> Panacea Medical Technologies Pvt. Ltd. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>> http://www.panaceamedical.com >>>>> Bangalore - India. >>>>> >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> I was able to perform a reconstruction from your header and geometry >>>>>> file, using the following command lines: >>>>>> >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>>>> --phantomscale "128,128,128" --like Output.mhd >>>>>> >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> --hardware >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>>>> >>>>>> The first computes projections through a Shepp & Logan phantom, with >> the >>>>>> same size, spacing, origin, etc... as your projections, using your >>>>>> geometry file geo.xml. >>>>>> >>>>>> The second line performs the FDK reconstruction. I had to use both the >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>>>> parts, reconstructs them one by one, then assembles the results. Can >> you >>>>>> run the same commands and let us know whether you still encounter the >>>>>> crash you mentioned ? If it works, you can use your own projection data >>>>>> in the second command line instead of "simulatedprojections.mha". >>>>>> >>>>>> Best, >>>>>> >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>>>> >>>>>>> Dear Sir, >>>>>>> >>>>>>> Please find the Header file in the attachment. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> We do not need the projections file, at least not for a first stage >> of >>>>>>>> error tracking. We only need the header. >>>>>>>> Try the following command line: >>>>>>>> >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>>>> >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> contains >>>>>>>> the pixel values, but at the moment we do not need them. We will >> create >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>>>> track down the error you encounter. >>>>>>>> >>>>>>>> Looking forward to receiving your file, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Sir, >>>>>>>>> >>>>>>>>> The single raw file of the projections is 1.4 GB and >> we >>>> are >>>>>> not >>>>>>>> able to send this big file to you. Can you please suggest other >>>>>> alternatives >>>>>>>> for this? >>>>>>>>> Or can you provide us the PC configuration to solve >> the >>>>>> issue? >>>>>>>>> Let me know if any other clarification is required. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Hello Zahid, >>>>>>>>>> >>>>>>>>>> We will need the header of your projections file, too (It is best >> if >>>>>> you >>>>>>>>>> have all your projections as a single .mhd and a single .raw file, >> so >>>>>> it >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Cyril Mory, >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I have only used RTK version 1.3.0. but in the >>>> error >>>>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>>>> Please find the attachment of the geometry >> file >>>> of >>>>>> our >>>>>>>>>> projections. >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >>>> Simon >>>>>>>> Rit >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> >>>>>>>>>>>> Without some more information, it's unlikely that we find the >>>> source >>>>>> of >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>>>> therefore >>>>>>>>>>>> yourself): >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes >> in >>>>>> the >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>>>> problem >>>>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>>>> - create a small example that reproduces your problem. You can, >> for >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> logan >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>>>> example). And send us the script >>>>>>>>>>>> - OR send us your geometry file and the header of your >> projections >>>>>> file >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >>>>>> zero-filled >>>>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>>>> >>>>>>>>>>>> Best regards, >>>>>>>>>>>> Cyril >>>>>>>>>>>> >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>>>> >>>>>>>>>>>>> Please find the screen shot in the >> attachment. >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>> >>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>> >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a >> CUDA >>>>>>>>>> memory >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> first >>>>>> make >>>>>>>>>>>> sure >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> images. >>>>>> If >>>>>>>> it >>>>>>>>>>>> is >>>>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >>>> The >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >>>> of >>>>>>>> RTK >>>>>>>>>> on >>>>>>>>>>>>>> our case studies webpage >>>>>>>>>>>> . >>>>>>>>>>>>>> Simon >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>>>> reconstruction >>>>>>>>>> using >>>>>>>>>>>> RTK >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>>>> shoot >>>>>>>> of >>>>>>>>>>>>>>> the >>>>>>>>>>>>>>>> same. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am using the following items given >> below. >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>>>> application >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Please provide the solution of this and >> let >>>> me >>>>>>>> know >>>>>>>>>> if >>>>>>>>>>>>>> any >>>>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >>>> : >>>>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>>>> ________________ >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> This email and any files transmitted with it are confidential >>>> and >>>>>>>>>>>> intended >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >>>>>>>>>>>> addressed. >>>>>>>>>>>>>>> If you have received this email in error please notify the >>>> system >>>>>>>>>>>> manager. >>>>>>>>>>>>>>> Please note that any views or opinions presented in this email >>>> are >>>>>>>>>>>> solely >>>>>>>>>>>>>>> those of the author and do not necessarily represent those of >>>> the >>>>>>>>>>>> company. >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >>>> attachments >>>>>>>> for >>>>>>>>>>>> the >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>>>> damage >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>>>> >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >>> >>> >> >> > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Wed Nov 2 22:38:38 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 02:38:38 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Message-ID: <24189134.77160.1478140718379@mail.yahoo.com> Hello Simon and Cyril,Thanks for the reply.You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do.Thanks again for the reply. @Cyril:Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards,Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 02:05:51 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 06:05:51 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103060551.f7bfa0c3@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, Thank you for your help. We are able to reconstruct 1024 volume now. But the reconstruction time is around 4 minutes. Can you please help us to reduce the reconstruction time? We are using NVIDIA TITAN X GPU which has 12 GB memory. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The output looks correct. > > If the command line solution I suggested in a previous email works, the > best way to move forward would be to compare your code and that of > rtkfdk.cxx, and where it differs, make sure you have not introduced an > error. > > Cyril > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have done the same but the Output.mhd file is still 0 > KB for 1024 volume. Please find the attachment of the status of the output > displayed. > > > > Please suggest us for further process. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> I see two errors: > >> > >> Remove this line > >> > >> writer->SetNumberOfStreamDivisions(4); > >> > >> since only the streaming filter, not the write filter, needs to know > >> about the number of divisions. > >> And change the filename to > >> > >> "D:\\Output.mhd" > >> > >> It will write both the .mhd and the .raw files. > >> > >> I hope it helps, > >> Cyril > >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have modified my file writer code and used > >> StreamingImageFilter. Now its not giving any error message but the final > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > >>> Please check my modified file writer code given below. > >>> > >>> // Streaming depending on streaming capability of writer > >>> typedef itk::StreamingImageFilter > >> StreamerType; > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>> streamerBP->SetInput(feldkamp->GetOutput()); > >>> streamerBP->SetNumberOfStreamDivisions(4); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(streamerBP->GetOutput()); > >>> writer->SetNumberOfStreamDivisions(4); > >>> > >>> > >>> Please let me know if any clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> The --divisions is an option of the command-line application rtkfdk. It > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > >>>> rather, it is passed to a streaming filter at the end of the pipeline. > >>>> Look for the following bit of code in rtkfdk.cxx : > >>>> > >>>> // Streaming depending on streaming capability of writer > >>>> typedef itk::StreamingImageFilter >>>> CPUOutputImageType> StreamerType; > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>>> streamerBP->SetInput( pfeldkamp ); > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >>>> > >>>> You can find information on how a streaming filter works on this page: > >>>> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >>>> > >>>> I hope it helps, > >>>> > >>>> Cyril > >>>> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> I have tried but I am not getting where to give > >>>> --division 4 in my code. > >>>>> Please find my code given below and please let me > know > >>>> where I need to change in my code to make it work. > >>>>> int _tmain(int argc, _TCHAR* argv[]) > >>>>> { > >>>>> #pragma region "Variable declaration" > >>>>> const double PI = 3.14159265358979323846; > >>>>> float *angles; > >>>>> int nProj = 349; > >>>>> typedef unsigned short pixelType; > >>>>> typedef float OutpixelType; > >>>>> const int dimension = 3; > >>>>> typedef itk::Image imageType; > >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>>>> imageType::Pointer Projections = imageType::New(); > >>>>> > >>>>> #pragma endregion "Variable declaration" > >>>>> > >>>>> Projections = > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > >> nProj); > >>>>> imageType::SpacingType pSpacing; > >>>>> pSpacing[0] = 0.2960; > >>>>> pSpacing[1] = 0.2960; > >>>>> pSpacing[2] = 0.2960; > >>>>> Projections->SetSpacing(pSpacing); > >>>>> > >>>>> imageType::PointType pOrigin; > >>>>> pOrigin[0] = -212.972; > >>>>> pOrigin[1] = -212.972; > >>>>> pOrigin[2] = -212.972; //-158.50; > >>>>> Projections->SetOrigin(pOrigin); > >>>>> > >>>>> Projections->Update(); > >>>>> > >>>>> //Read angles. > >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>>>> angles = new float[nProj]; > >>>>> angles = readAngles(angles_file, angles); > >>>>> > >>>>> #pragma region"Geometry" > >>>>> // Geometry object > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>>>> { > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > >> 0); > >>>> // 136 half fan //2.07 Kidwai // > >>>>> } > >>>>> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >>>> GeometryWriterType; > >>>>> GeometryWriterType::Pointer geometryWriter = > GeometryWriterType::New(); > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > >>>>> geometryWriter->SetObject(geometry); > >>>>> geometryWriter->WriteFile(); > >>>>> geometry->Update(); > >>>>> #pragma endregion "Geometry" > >>>>> > >>>>> //Define output image type > >>>>> > >>>>> #ifdef USE_CUDA > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>>>> #else > >>>>> typedef itk::Image OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > FDKType; > >>>>> #endif > >>>>> > >>>>> //ScatterCorrection > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter imageType > >>>> BoellaardScatterCorrectionImageFilterType; > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection > = > >>>> BoellaardScatterCorrectionImageFilterType::New(); > >>>>> ScatterCorrection->SetInput(Projections); > >>>>> > >>>>> //VarianObiRawImageFilter > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >>>> RawImageFilterType; > >>>>> RawImageFilterType::Pointer AttenuationFilter = > >>>> RawImageFilterType::New(); > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>>>> > >>>>> //Create the output image > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > >>>> ConstantImageSourceType; > >>>>> ConstantImageSourceType::PointType origin_p; > >>>>> ConstantImageSourceType::SizeType size_p; > >>>>> ConstantImageSourceType::SpacingType spacing_p; > >>>>> ConstantImageSourceType::Pointer projectionsSource = > >>>> ConstantImageSourceType::New(); > >>>>> origin_p[0] = -127.5; > >>>>> origin_p[1] = -127.5; > >>>>> origin_p[2] = -127.5; > >>>>> size_p[0] = 512; > >>>>> size_p[1] = 512; > >>>>> size_p[2] = 512; > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>>>> > >>>>> projectionsSource->SetOrigin(origin_p); > >>>>> projectionsSource->SetSpacing(spacing_p); > >>>>> projectionsSource->SetSize(size_p); > >>>>> projectionsSource->SetConstant(0); > >>>>> > >>>>> // Short scan image filter > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>>>> pssf->SetGeometry(geometry); > >>>>> pssf->InPlaceOff(); > >>>>> std::cout << "short scan image filter success" << std::endl; > >>>>> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > >>>>> feldkamp->SetGeometry(geometry); > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>>>> feldkamp->SetGPUEnabled(1); > >>>>> feldkamp->SetNumberOfThreads(10000); > >>>>> > >>>>> #pragma region "Write volume" > >>>>> > >>>>> //Create a raw io for writing > >>>>> > >>>>> itk::RawImageIO::Pointer io; > >>>>> io = itk::RawImageIO::New(); > >>>>> > >>>>> for (unsigned int i = 0; i < dimension; i++) > >>>>> { > >>>>> io->SetDimensions(i, size_p[i]); > >>>>> io->SetSpacing(i, spacing_p[i]); > >>>>> io->SetOrigin(i, origin_p[i]); > >>>>> } > >>>>> io->SetHeaderSize(0); > >>>>> io->SetByteOrderToLittleEndian(); > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>>>> io->SetNumberOfComponents(1); > >>>>> io->SetNumberOfDimensions(3); > >>>>> > >>>>> //create a writer and write reconstructed file > >>>>> itk::ImageFileWriter::Pointer writer; > >>>>> writer = itk::ImageFileWriter::New(); > >>>>> writer->SetFileName("D:\\Output.raw"); > >>>>> writer->SetImageIO(io); > >>>>> writer->SetInput(feldkamp->GetOutput()); > >>>>> > >>>>> try > >>>>> { > >>>>> writer->Update(); > >>>>> } > >>>>> catch (itk::ExceptionObject & excp) > >>>>> { > >>>>> std::cerr << "Error while writing the image " << std::endl; > >>>>> std::cerr << excp << std::endl; > >>>>> getchar(); > >>>>> } > >>>>> #pragma endregion "WriteVolume" > >>>>> delete[] angles; > >>>>> return 0; > >>>>> } > >>>>> > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> Senior Design Engineer > >>>>> Mobile No. +91-9738379729 > >>>>> > >>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>> http://www.panaceamedical.com > >>>>> Bangalore - India. > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> I was able to perform a reconstruction from your header and geometry > >>>>>> file, using the following command lines: > >>>>>> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>>>> --phantomscale "128,128,128" --like Output.mhd > >>>>>> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > >> --hardware > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>>>> > >>>>>> The first computes projections through a Shepp & Logan phantom, with > >> the > >>>>>> same size, spacing, origin, etc... as your projections, using your > >>>>>> geometry file geo.xml. > >>>>>> > >>>>>> The second line performs the FDK reconstruction. I had to use both > the > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > (3GB, > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > by > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>>>> parts, reconstructs them one by one, then assembles the results. Can > >> you > >>>>>> run the same commands and let us know whether you still encounter the > >>>>>> crash you mentioned ? If it works, you can use your own projection > data > >>>>>> in the second command line instead of "simulatedprojections.mha". > >>>>>> > >>>>>> Best, > >>>>>> > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>>>> > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> Please find the Header file in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> We do not need the projections file, at least not for a first stage > >> of > >>>>>>>> error tracking. We only need the header. > >>>>>>>> Try the following command line: > >>>>>>>> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>>>> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file > is > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > >> contains > >>>>>>>> the pixel values, but at the moment we do not need them. We will > >> create > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>>>> track down the error you encounter. > >>>>>>>> > >>>>>>>> Looking forward to receiving your file, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Sir, > >>>>>>>>> > >>>>>>>>> The single raw file of the projections is 1.4 GB > and > >> we > >>>> are > >>>>>> not > >>>>>>>> able to send this big file to you. Can you please suggest other > >>>>>> alternatives > >>>>>>>> for this? > >>>>>>>>> Or can you provide us the PC configuration to solve > >> the > >>>>>> issue? > >>>>>>>>> Let me know if any other clarification is required. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Hello Zahid, > >>>>>>>>>> > >>>>>>>>>> We will need the header of your projections file, too (It is best > >> if > >>>>>> you > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > file, > >> so > >>>>>> it > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>>>> > >>>>>>>>>> Regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Cyril Mory, > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> I have only used RTK version 1.3.0. but in > the > >>>> error > >>>>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>>>> Please find the attachment of the geometry > >> file > >>>> of > >>>>>> our > >>>>>>>>>> projections. > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >>>> Simon > >>>>>>>> Rit > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > >>>> source > >>>>>> of > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>>>> therefore > >>>>>>>>>>>> yourself): > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > changes > >> in > >>>>>> the > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>>>> problem > >>>>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>>>> - create a small example that reproduces your problem. You can, > >> for > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > >> logan > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > an > >>>>>>>>>>>> example). And send us the script > >>>>>>>>>>>> - OR send us your geometry file and the header of your > >> projections > >>>>>> file > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>>>> zero-filled > >>>>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>>>> > >>>>>>>>>>>> Best regards, > >>>>>>>>>>>> Cyril > >>>>>>>>>>>> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>>>> > >>>>>>>>>>>>> Please find the screen shot in the > >> attachment. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>> > >>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > >> CUDA > >>>>>>>>>> memory > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > >> first > >>>>>> make > >>>>>>>>>>>> sure > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > >> images. > >>>>>> If > >>>>>>>> it > >>>>>>>>>>>> is > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > --divisions. > >>>> The > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > use > >>>> of > >>>>>>>> RTK > >>>>>>>>>> on > >>>>>>>>>>>>>> our case studies webpage > >>>>>>>>>>>> . > >>>>>>>>>>>>>> Simon > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>>>> reconstruction > >>>>>>>>>> using > >>>>>>>>>>>> RTK > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > screen > >>>>>> shoot > >>>>>>>> of > >>>>>>>>>>>>>>> the > >>>>>>>>>>>>>>>> same. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am using the following items given > >> below. > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > console > >>>>>>>> application > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Please provide the solution of this > and > >> let > >>>> me > >>>>>>>> know > >>>>>>>>>> if > >>>>>>>>>>>>>> any > >>>>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > >> Url > >>>> : > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>>>> ________________ > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> This email and any files transmitted with it are > confidential > >>>> and > >>>>>>>>>>>> intended > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they > >> are > >>>>>>>>>>>> addressed. > >>>>>>>>>>>>>>> If you have received this email in error please notify the > >>>> system > >>>>>>>>>>>> manager. > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > email > >>>> are > >>>>>>>>>>>> solely > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > of > >>>> the > >>>>>>>>>>>> company. > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > >>>> attachments > >>>>>>>> for > >>>>>>>>>>>> the > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > >>>>>> damage > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>>>> > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Thu Nov 3 02:23:25 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 3 Nov 2016 07:23:25 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <24189134.77160.1478140718379@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> Message-ID: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): {\begin{aligned}&\mathbf {r} _{0}:=\mathbf {b} -\mathbf {Ax} _{0}\\&\mathbf {p} _{0}:=\mathbf {r} _{0}\\&k:=0\\&{\hbox{repeat}}\\&\qquad \alpha _{k}:={\frac {\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}{\mathbf {p} _{k}^{\mathsf {T}}\mathbf {Ap} _{k}}}\\&\qquad \mathbf {x} _{k+1}:=\mathbf {x} _{k}+\alpha _{k}\mathbf {p} _{k}\\&\qquad \mathbf {r} _{k+1}:=\mathbf {r} _{k}-\alpha _{k}\mathbf {Ap} _{k}\\&\qquad {\hbox{if }}r_{k+1}{\hbox{ is sufficiently small then exit loop}}\\&\qquad \beta _{k}:={\frac {\mathbf {r} _{k+1}^{\mathsf {T}}\mathbf {r} _{k+1}}{\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}}\\&\qquad \mathbf {p} _{k+1}:=\mathbf {r} _{k+1}+\beta _{k}\mathbf {p} _{k}\\&\qquad k:=k+1\\&{\hbox{end repeat}}\\&{\hbox{The result is }}\mathbf {x} _{k+1}\end{aligned}} In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: > Hello Simon and Cyril, > Thanks for the reply. > You are right Simon. I did not notice it too in the literature. The > main problem as you said is the storage. Actually I developed the > conjugate gradient (CG), quasi-Newton and Newton optimization methods > for optical tomography and I intended to apply them to the CT > reconstruction as well. I implemented the Newton's methods > (Gauss-Newton and Levenberg-Marquardt) in a > Jacobian-Free-Newton-Krylov approaches to avoid the matrix > multiplication of Jacobians (sensitivity). It means we only need to > store the Jacobian matrix for the these methods (the matrix R that > Cyril was mentioned), that is still a big matrix for practical > problems in CT reconstruction. For the quasi-Newton I adapted an > L-BFGS algorithm that only need the 3 or 8 last iterations of the > gradient vector to calculate the Hessian matrix. In my case, the > L-BFGS and Newton's methods was much faster than the CG as you know > because of using the second order derivative (hessian matrix). I saw > in your last paper you implement the conjugate gradient method, so I > thought it might be easy to extract the gradient vector from CG > modules and solve the cost function within the quasi-Newton/Newton > methods. I will look at the codes to see what I can do. > Thanks again for the reply. > > @Cyril: > Please correct me if I am wrong. you mean the output of > backProjectionFilter is the gradient of defined cost function? > > Regards, > Vahid > > > On Wednesday, November 2, 2016 2:53 AM, Cyril Mory > wrote: > > > Hi Vahid, > Welcome to RTK :) > Indeed, there are several iterative methods already implemented in > RTK, but none of the filters allows you to easily extract the gradient > of the least squares function there are minimizing. > If you need to minimize the classical non-regularized tomographic cost > function, ie || R f - p ||?, with R the forward projection operator, f > the volume you are looking for, and p the measured projections, my > best advice would be to copy some part of the pipeline of > rtkSARTConeBeamReconstructionFilter to get the job done, ie the > following part (copy-paste this into webgraphviz.com) > > digraph SARTConeBeamReconstructionFilter { > > Input0 [ label="Input 0 (Volume)"]; > Input0 [shape=Mdiamond]; > Input1 [label="Input 1 (Projections)"]; > Input1 [shape=Mdiamond]; > > node [shape=box]; > ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref > rtk::ForwardProjectionImageFilter"]; > Extract [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref > itk::MultiplyImageFilter"]; > AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; > Subtract [ label="itk::SubtractImageFilter" URL="\ref > itk::SubtractImageFilter"]; > MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" > URL="\ref itk::MultiplyImageFilter"]; > Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref > itk::DivideOrZeroOutImageFilter"]; > GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" > URL="\ref itk::MultiplyImageFilter", style=dashed]; > Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref > rtk::DisplacedDetectorImageFilter"]; > ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref > rtk::RayBoxIntersectionImageFilter"]; > ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref > rtk::BackProjectionImageFilter"]; > OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; > OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; > Input0 -> OutofInput0 [arrowhead=none]; > OutofInput0 -> ForwardProject; > ConstantVolume -> BeforeBP [arrowhead=none]; > BeforeBP -> BackProjection; > Extract -> AfterExtract[arrowhead=none]; > AfterExtract -> MultiplyByZero; > AfterExtract -> Subtract; > MultiplyByZero -> ForwardProject; > Input1 -> Extract; > ForwardProject -> Subtract; > Subtract -> MultiplyByLambda; > MultiplyByLambda -> Divide; > Divide -> GatingWeight; > GatingWeight -> Displaced; > ConstantProjectionStack -> ExtractConstantProjection; > ExtractConstantProjection -> RayBox; > RayBox -> Divide; > Displaced -> BackProjection; > BackProjection -> OutofBP [arrowhead=none]; > } > > As you can see, it is a very large part of the SART reconstruction > filter, so yoiu might be better off just copying the whole > SARTConeBeamReconstructionFilter and modifying it. > > Of course, you could also look into ITK's cost function class, and see > if one of the classes inherited from it suits your needs, implement > your cost function this way, and use ITK's off-the-shelf solvers to > minimize it. See the inheritance diagram in > https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if > you want to try this approach. > > Best regards, > Cyril > > On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >> Hello RTK users and developers, >> >> I already implemented the RTK and reconstructed some images with the >> FDK algorithm implemented in RTK. It works well. Thanks to RTK >> developers. >> Now, I am trying to develop a model-based image reconstruction for >> our cone-beam micro-CT. I see already that some iterative algorithms >> like ART and its modifications and conjugate-gradient (CG) method are >> implemented in the RTK. I want to develop a model-based >> reconstruction through the Newton/quasi-Newton optimizations methods. >> I was wondering is it possible to extract the gradient of least >> square function from implemented algorithms like CG module? Any >> recommendation will be appreciated. >> >> Best Regards, >> Vahid >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 10:21:11 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 14:21:11 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. The RTKScatterGlareCorrectionImageFilter code is given below. //rtkLagCorrectionImageFilter typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); LagCorrection->SetInput(Projections); //rtkScatterGlareCorrectionImageFilter typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Cyril Mory, > > > Thank you for your help. We are able to reconstruct 1024 > volume now. > > But the reconstruction time is around 4 minutes. Can you > please help us to reduce the reconstruction time? > > We are using NVIDIA TITAN X GPU which has 12 GB memory. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > Dear Zahid, > > > > The output looks correct. > > > > If the command line solution I suggested in a previous email works, the > > best way to move forward would be to compare your code and that of > > rtkfdk.cxx, and where it differs, make sure you have not introduced an > > error. > > > > Cyril > > > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > > Dear Cyril Mory, > > > > > > I have done the same but the Output.mhd file is still 0 > > KB for 1024 volume. Please find the attachment of the status of the output > > displayed. > > > > > > Please suggest us for further process. > > > > > > > > > Thanks & Regards > > > > > > Zahid Hasan Ansari > > > > > > > > > > > > > > > ----- Original Message ----- > > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > > [mailto:simon.rit at creatis.insa-lyon.fr] > > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > > > > >> I see two errors: > > >> > > >> Remove this line > > >> > > >> writer->SetNumberOfStreamDivisions(4); > > >> > > >> since only the streaming filter, not the write filter, needs to know > > >> about the number of divisions. > > >> And change the filename to > > >> > > >> "D:\\Output.mhd" > > >> > > >> It will write both the .mhd and the .raw files. > > >> > > >> I hope it helps, > > >> Cyril > > >> > > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > >>> Dear Cyril Mory, > > >>> > > >>> I have modified my file writer code and used > > >> StreamingImageFilter. Now its not giving any error message but the > final > > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > > >>> Please check my modified file writer code given > below. > > >>> > > >>> // Streaming depending on streaming capability of writer > > >>> typedef itk::StreamingImageFilter > > >> StreamerType; > > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>> streamerBP->SetInput(feldkamp->GetOutput()); > > >>> streamerBP->SetNumberOfStreamDivisions(4); > > >>> > > >>> //create a writer and write reconstructed file > > >>> itk::ImageFileWriter::Pointer writer; > > >>> writer = itk::ImageFileWriter::New(); > > >>> writer->SetFileName("D:\\Output.raw"); > > >>> writer->SetImageIO(io); > > >>> writer->SetInput(streamerBP->GetOutput()); > > >>> writer->SetNumberOfStreamDivisions(4); > > >>> > > >>> > > >>> Please let me know if any clarification is required. > > >>> > > >>> > > >>> Thanks & Regards > > >>> > > >>> Zahid Hasan Ansari > > >>> Senior Design Engineer > > >>> Mobile No. +91-9738379729 > > >>> > > >>> Panacea Medical Technologies Pvt. Ltd. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >> http://www.panaceamedical.com > > >>> Bangalore - India. > > >>> > > >>> > > >>> > > >>> > > >>> ----- Original Message ----- > > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > > Rit > > >> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>> > > >>> > > >>>> Dear Zahid, > > >>>> > > >>>> The --divisions is an option of the command-line application rtkfdk. > It > > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > > >>>> rather, it is passed to a streaming filter at the end of the > pipeline. > > >>>> Look for the following bit of code in rtkfdk.cxx : > > >>>> > > >>>> // Streaming depending on streaming capability of writer > > >>>> typedef itk::StreamingImageFilter > >>>> CPUOutputImageType> StreamerType; > > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>>> streamerBP->SetInput( pfeldkamp ); > > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg > ); > > >>>> > > >>>> You can find information on how a streaming filter works on this > page: > > >>>> > > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > >>>> > > >>>> I hope it helps, > > >>>> > > >>>> Cyril > > >>>> > > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > >>>>> Dear Cyril Mory, > > >>>>> > > >>>>> I have tried but I am not getting where to give > > >>>> --division 4 in my code. > > >>>>> Please find my code given below and please let me > > know > > >>>> where I need to change in my code to make it work. > > >>>>> int _tmain(int argc, _TCHAR* argv[]) > > >>>>> { > > >>>>> #pragma region "Variable declaration" > > >>>>> const double PI = 3.14159265358979323846; > > >>>>> float *angles; > > >>>>> int nProj = 349; > > >>>>> typedef unsigned short pixelType; > > >>>>> typedef float OutpixelType; > > >>>>> const int dimension = 3; > > >>>>> typedef itk::Image imageType; > > >>>>> typedef itk::ImageRegionConstIterator > ImageIteratorType; > > >>>>> imageType::Pointer Projections = imageType::New(); > > >>>>> > > >>>>> #pragma endregion "Variable declaration" > > >>>>> > > >>>>> Projections = > > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > > >> nProj); > > >>>>> imageType::SpacingType pSpacing; > > >>>>> pSpacing[0] = 0.2960; > > >>>>> pSpacing[1] = 0.2960; > > >>>>> pSpacing[2] = 0.2960; > > >>>>> Projections->SetSpacing(pSpacing); > > >>>>> > > >>>>> imageType::PointType pOrigin; > > >>>>> pOrigin[0] = -212.972; > > >>>>> pOrigin[1] = -212.972; > > >>>>> pOrigin[2] = -212.972; //-158.50; > > >>>>> Projections->SetOrigin(pOrigin); > > >>>>> > > >>>>> Projections->Update(); > > >>>>> > > >>>>> //Read angles. > > >>>>> char *angles_file = > "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > >>>>> angles = new float[nProj]; > > >>>>> angles = readAngles(angles_file, angles); > > >>>>> > > >>>>> #pragma region"Geometry" > > >>>>> // Geometry object > > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > > >>>>> { > > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, > 0, > > >> 0); > > >>>> // 136 half fan //2.07 Kidwai // > > >>>>> } > > >>>>> > > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > > >>>> GeometryWriterType; > > >>>>> GeometryWriterType::Pointer geometryWriter = > > GeometryWriterType::New(); > > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > > >>>>> geometryWriter->SetObject(geometry); > > >>>>> geometryWriter->WriteFile(); > > >>>>> geometry->Update(); > > >>>>> #pragma endregion "Geometry" > > >>>>> > > >>>>> //Define output image type > > >>>>> > > >>>>> #ifdef USE_CUDA > > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > > PSSFType; > > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > >>>>> #else > > >>>>> typedef itk::Image OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter > PSSFType; > > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > > FDKType; > > >>>>> #endif > > >>>>> > > >>>>> //ScatterCorrection > > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter > imageType > > >>>> BoellaardScatterCorrectionImageFilterType; > > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer > ScatterCorrection > > = > > >>>> BoellaardScatterCorrectionImageFilterType::New(); > > >>>>> ScatterCorrection->SetInput(Projections); > > >>>>> > > >>>>> //VarianObiRawImageFilter > > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > > >>>> RawImageFilterType; > > >>>>> RawImageFilterType::Pointer AttenuationFilter = > > >>>> RawImageFilterType::New(); > > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > >>>>> > > >>>>> //Create the output image > > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > > >>>> ConstantImageSourceType; > > >>>>> ConstantImageSourceType::PointType origin_p; > > >>>>> ConstantImageSourceType::SizeType size_p; > > >>>>> ConstantImageSourceType::SpacingType spacing_p; > > >>>>> ConstantImageSourceType::Pointer projectionsSource = > > >>>> ConstantImageSourceType::New(); > > >>>>> origin_p[0] = -127.5; > > >>>>> origin_p[1] = -127.5; > > >>>>> origin_p[2] = -127.5; > > >>>>> size_p[0] = 512; > > >>>>> size_p[1] = 512; > > >>>>> size_p[2] = 512; > > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > >>>>> > > >>>>> projectionsSource->SetOrigin(origin_p); > > >>>>> projectionsSource->SetSpacing(spacing_p); > > >>>>> projectionsSource->SetSize(size_p); > > >>>>> projectionsSource->SetConstant(0); > > >>>>> > > >>>>> // Short scan image filter > > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > > >>>>> pssf->SetGeometry(geometry); > > >>>>> pssf->InPlaceOff(); > > >>>>> std::cout << "short scan image filter success" << std::endl; > > >>>>> > > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > > >>>>> feldkamp->SetGeometry(geometry); > > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > >>>>> feldkamp->SetGPUEnabled(1); > > >>>>> feldkamp->SetNumberOfThreads(10000); > > >>>>> > > >>>>> #pragma region "Write volume" > > >>>>> > > >>>>> //Create a raw io for writing > > >>>>> > > >>>>> itk::RawImageIO::Pointer io; > > >>>>> io = itk::RawImageIO::New(); > > >>>>> > > >>>>> for (unsigned int i = 0; i < dimension; i++) > > >>>>> { > > >>>>> io->SetDimensions(i, size_p[i]); > > >>>>> io->SetSpacing(i, spacing_p[i]); > > >>>>> io->SetOrigin(i, origin_p[i]); > > >>>>> } > > >>>>> io->SetHeaderSize(0); > > >>>>> io->SetByteOrderToLittleEndian(); > > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > > >>>>> io->SetNumberOfComponents(1); > > >>>>> io->SetNumberOfDimensions(3); > > >>>>> > > >>>>> //create a writer and write reconstructed file > > >>>>> itk::ImageFileWriter::Pointer writer; > > >>>>> writer = itk::ImageFileWriter::New(); > > >>>>> writer->SetFileName("D:\\Output.raw"); > > >>>>> writer->SetImageIO(io); > > >>>>> writer->SetInput(feldkamp->GetOutput()); > > >>>>> > > >>>>> try > > >>>>> { > > >>>>> writer->Update(); > > >>>>> } > > >>>>> catch (itk::ExceptionObject & excp) > > >>>>> { > > >>>>> std::cerr << "Error while writing the image " << std::endl; > > >>>>> std::cerr << excp << std::endl; > > >>>>> getchar(); > > >>>>> } > > >>>>> #pragma endregion "WriteVolume" > > >>>>> delete[] angles; > > >>>>> return 0; > > >>>>> } > > >>>>> > > >>>>> > > >>>>> > > >>>>> Thanks & Regards > > >>>>> > > >>>>> Zahid Hasan Ansari > > >>>>> Senior Design Engineer > > >>>>> Mobile No. +91-9738379729 > > >>>>> > > >>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >>>> http://www.panaceamedical.com > > >>>>> Bangalore - India. > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> ----- Original Message ----- > > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > > >> Rit > > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>> > > >>>>> > > >>>>>> Dear Zahid, > > >>>>>> > > >>>>>> I was able to perform a reconstruction from your header and > geometry > > >>>>>> file, using the following command lines: > > >>>>>> > > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > > >>>>>> --phantomscale "128,128,128" --like Output.mhd > > >>>>>> > > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > > >> --hardware > > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > >>>>>> > > >>>>>> The first computes projections through a Shepp & Logan phantom, > with > > >> the > > >>>>>> same size, spacing, origin, etc... as your projections, using your > > >>>>>> geometry file geo.xml. > > >>>>>> > > >>>>>> The second line performs the FDK reconstruction. I had to use both > > the > > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > > (3GB, > > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > > by > > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > > >>>>>> parts, reconstructs them one by one, then assembles the results. > Can > > >> you > > >>>>>> run the same commands and let us know whether you still encounter > the > > >>>>>> crash you mentioned ? If it works, you can use your own projection > > data > > >>>>>> in the second command line instead of "simulatedprojections.mha". > > >>>>>> > > >>>>>> Best, > > >>>>>> > > >>>>>> Cyril > > >>>>>> > > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > >>>>>> > > >>>>>>> Dear Sir, > > >>>>>>> > > >>>>>>> Please find the Header file in the attachment. > > >>>>>>> > > >>>>>>> > > >>>>>>> Thanks & Regards > > >>>>>>> > > >>>>>>> Zahid Hasan Ansari > > >>>>>>> > > >>>>>>> > > >>>>>>> ----- Original Message ----- > > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > Simon > > >>>> Rit > > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>> > > >>>>>>> > > >>>>>>>> Dear Zahid, > > >>>>>>>> > > >>>>>>>> We do not need the projections file, at least not for a first > stage > > >> of > > >>>>>>>> error tracking. We only need the header. > > >>>>>>>> Try the following command line: > > >>>>>>>> > > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > > >>>>>>>> > > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" > file > > is > > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > > >> contains > > >>>>>>>> the pixel values, but at the moment we do not need them. We will > > >> create > > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough > to > > >>>>>>>> track down the error you encounter. > > >>>>>>>> > > >>>>>>>> Looking forward to receiving your file, > > >>>>>>>> Cyril > > >>>>>>>> > > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > > >>>>>>>>> Dear Sir, > > >>>>>>>>> > > >>>>>>>>> The single raw file of the projections is 1.4 GB > > and > > >> we > > >>>> are > > >>>>>> not > > >>>>>>>> able to send this big file to you. Can you please suggest other > > >>>>>> alternatives > > >>>>>>>> for this? > > >>>>>>>>> Or can you provide us the PC configuration to > solve > > >> the > > >>>>>> issue? > > >>>>>>>>> Let me know if any other clarification is > required. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> Thanks & Regards > > >>>>>>>>> > > >>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> ----- Original Message ----- > > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > >> Simon > > >>>>>> Rit > > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>>> Hello Zahid, > > >>>>>>>>>> > > >>>>>>>>>> We will need the header of your projections file, too (It is > best > > >> if > > >>>>>> you > > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > > file, > > >> so > > >>>>>> it > > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > > >>>>>>>>>> > > >>>>>>>>>> Regards, > > >>>>>>>>>> Cyril > > >>>>>>>>>> > > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>> Dear Cyril Mory, > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> I have only used RTK version 1.3.0. but > in > > the > > >>>> error > > >>>>>>>>>> message it is showing RTK version 1.2.0. > > >>>>>>>>>>> Please find the attachment of the > geometry > > >> file > > >>>> of > > >>>>>> our > > >>>>>>>>>> projections. > > >>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>> > > >>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com], > > >>>> Simon > > >>>>>>>> Rit > > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, > saimahesh.m at panaceamedical.com > > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>> > > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > > >>>> source > > >>>>>> of > > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > > >>>>>> therefore > > >>>>>>>>>>>> yourself): > > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > > changes > > >> in > > >>>>>> the > > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so > your > > >>>>>> problem > > >>>>>>>>>>>> might disappear just by upgrading to the new version > > >>>>>>>>>>>> - create a small example that reproduces your problem. You > can, > > >> for > > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > > >> logan > > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look > at > > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > > an > > >>>>>>>>>>>> example). And send us the script > > >>>>>>>>>>>> - OR send us your geometry file and the header of your > > >> projections > > >>>>>> file > > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > > >>>>>> zero-filled > > >>>>>>>>>>>> stack of projections), and the command line that crashes > > >>>>>>>>>>>> > > >>>>>>>>>>>> Best regards, > > >>>>>>>>>>>> Cyril > > >>>>>>>>>>>> > > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>>>> Dear Simon Rit, > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Please find the screen shot in the > > >> attachment. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > > : > > >>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>>>> To: Zahid Hasan Ansari > > [mailto:zahidhasan.a at panaceamedical.com] > > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > > >>>>>>>> [mailto:rtk-users at public.kitware.com], > > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is > a > > >> CUDA > > >>>>>>>>>> memory > > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > > >> first > > >>>>>> make > > >>>>>>>>>>>> sure > > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > > >> images. > > >>>>>> If > > >>>>>>>> it > > >>>>>>>>>>>> is > > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > > --divisions. > > >>>> The > > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > > use > > >>>> of > > >>>>>>>> RTK > > >>>>>>>>>> on > > >>>>>>>>>>>>>> our case studies webpage > > >>>>>>>>>>>> . > > >>>>>>>>>>>>>> Simon > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Dear Sir\Madam, > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > > >>>>>> reconstruction > > >>>>>>>>>> using > > >>>>>>>>>>>> RTK > > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > > screen > > >>>>>> shoot > > >>>>>>>> of > > >>>>>>>>>>>>>>> the > > >>>>>>>>>>>>>>>> same. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am using the following items > given > > >> below. > > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > > console > > >>>>>>>> application > > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > > >>>>>>>>>>>>>>>> 5. CUDA 7. > > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Please provide the solution of this > > and > > >> let > > >>>> me > > >>>>>>>> know > > >>>>>>>>>> if > > >>>>>>>>>>>>>> any > > >>>>>>>>>>>>>>>> other clarification is required. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, > > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 > | > > >> Url > > >>>> : > > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>>>> > ____________________________________________________________ > > >>>>>>>>>>>>>>> ________________ > > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> This email and any files transmitted with it are > > confidential > > >>>> and > > >>>>>>>>>>>> intended > > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom > they > > >> are > > >>>>>>>>>>>> addressed. > > >>>>>>>>>>>>>>> If you have received this email in error please notify the > > >>>> system > > >>>>>>>>>>>> manager. > > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > > email > > >>>> are > > >>>>>>>>>>>> solely > > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > > of > > >>>> the > > >>>>>>>>>>>> company. > > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > > >>>> attachments > > >>>>>>>> for > > >>>>>>>>>>>> the > > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > > any > > >>>>>> damage > > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> This email and any files transmitted with it are > confidential > > >> and > > >>>>>>>>>> intended > > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > > are > > >>>>>>>>>> addressed. > > >>>>>>>>>>>>> If you have received this email in error please notify the > > >> system > > >>>>>>>>>> manager. > > >>>>>>>>>>>>> Please note that any views or opinions presented in this > email > > >> are > > >>>>>>>>>> solely > > >>>>>>>>>>>>> those of the author and do not necessarily represent those > of > > >> the > > >>>>>>>>>> company. > > >>>>>>>>>>>>> Finally, the recipient should check this email and any > > >> attachments > > >>>>>> for > > >>>>>>>>>> the > > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > > >>>> damage > > >>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>> ________________________________________ > > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > Area > > >>>>>> Phase > > >>>>>>>> 1, > > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > Industrial > > >>>>>> Area, > > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>> > > >>>>>>>>>>> This email and any files transmitted with it are confidential > > and > > >>>>>>>> intended > > >>>>>>>>>>> solely for the use of the individual or entity to whom they > are > > >>>>>>>> addressed. > > >>>>>>>>>>> If you have received this email in error please notify the > > system > > >>>>>>>> manager. > > >>>>>>>>>>> Please note that any views or opinions presented in this email > > are > > >>>>>>>> solely > > >>>>>>>>>>> those of the author and do not necessarily represent those of > > the > > >>>>>>>> company. > > >>>>>>>>>>> Finally, the recipient should check this email and any > > attachments > > >>>> for > > >>>>>>>> the > > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > > >> damage > > >>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>> > > >>>>>>>>> ________________________________________ > > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > > >>>> Phase > > >>>>>> 1, > > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > > >>>> Area, > > >>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>> > > >>>>>>>>> This email and any files transmitted with it are confidential > and > > >>>>>> intended > > >>>>>>>>> solely for the use of the individual or entity to whom they are > > >>>>>> addressed. > > >>>>>>>>> If you have received this email in error please notify the > system > > >>>>>> manager. > > >>>>>>>>> Please note that any views or opinions presented in this email > are > > >>>>>> solely > > >>>>>>>>> those of the author and do not necessarily represent those of > the > > >>>>>> company. > > >>>>>>>>> Finally, the recipient should check this email and any > attachments > > >> for > > >>>>>> the > > >>>>>>>>> presence of viruses. The company accepts no liability for any > > damage > > >>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>> ________________________________________ > > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > >> Phase > > >>>> 1, > > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > >> Area, > > >>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>> Fax : + 91 80 42428710 > > >>>>>>> Url : http://www.panaceamedical.com > > >>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>> > > >>>>>>> This email and any files transmitted with it are confidential and > > >>>> intended > > >>>>>>> solely for the use of the individual or entity to whom they are > > >>>> addressed. > > >>>>>>> If you have received this email in error please notify the system > > >>>> manager. > > >>>>>>> Please note that any views or opinions presented in this email are > > >>>> solely > > >>>>>>> those of the author and do not necessarily represent those of the > > >>>> company. > > >>>>>>> Finally, the recipient should check this email and any attachments > > for > > >>>> the > > >>>>>>> presence of viruses. The company accepts no liability for any > damage > > >>>>>>> caused by any virus transmitted by this email. > > >>>>>>> > > >>>>> ________________________________________ > > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>> Fax : + 91 80 42428710 > > >>>>> Url : http://www.panaceamedical.com > > >>>>> > > >> > > > ____________________________________________________________________________ > > >>>>> PMT EMAIL DISCLAIMER: > > >>>>> > > >>>>> This email and any files transmitted with it are confidential and > > >> intended > > >>>>> solely for the use of the individual or entity to whom they are > > >> addressed. > > >>>>> If you have received this email in error please notify the system > > >> manager. > > >>>>> Please note that any views or opinions presented in this email are > > >> solely > > >>>>> those of the author and do not necessarily represent those of the > > >> company. > > >>>>> Finally, the recipient should check this email and any attachments > for > > >> the > > >>>>> presence of viruses. The company accepts no liability for any damage > > >>>>> caused by any virus transmitted by this email. > > >>>>> > > >>>>> > > >>>>> > > >>>> > > >>> ________________________________________ > > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 > > >>> Fax : + 91 80 42428710 > > >>> Url : http://www.panaceamedical.com > > >>> > > >> > > > ____________________________________________________________________________ > > >>> PMT EMAIL DISCLAIMER: > > >>> > > >>> This email and any files transmitted with it are confidential and > > intended > > >>> solely for the use of the individual or entity to whom they are > > addressed. > > >>> If you have received this email in error please notify the system > > manager. > > >>> Please note that any views or opinions presented in this email are > > solely > > >>> those of the author and do not necessarily represent those of the > > company. > > >>> Finally, the recipient should check this email and any attachments for > > the > > >>> presence of viruses. The company accepts no liability for any damage > > >>> caused by any virus transmitted by this email. > > >>> > > >>> > > >>> > > >>> > > >>> > > >> > > >> > > > > > > ________________________________________ > > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > > Malur - 563130. Kolar District. INDIA. > > > > > > Tel : +91 80 4242 8700 / 2845 4785 > > > Fax : + 91 80 42428710 > > > Url : http://www.panaceamedical.com > > > > > > ____________________________________________________________________________ > > > PMT EMAIL DISCLAIMER: > > > > > > This email and any files transmitted with it are confidential and > intended > > > solely for the use of the individual or entity to whom they are > addressed. > > > If you have received this email in error please notify the system > manager. > > > Please note that any views or opinions presented in this email are > solely > > > those of the author and do not necessarily represent those of the > company. > > > Finally, the recipient should check this email and any attachments for > the > > > presence of viruses. The company accepts no liability for any damage > > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: ScatterGlareError.png Type: image/png Size: 121487 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 3 10:28:49 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 3 Nov 2016 15:28:49 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> References: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Message-ID: Hi, I think you should look at the applications before posting a question on the mailing list. There is a rtkscatterglarecorrection tool, look at rtkscatterglarecorrection.cxx. You must init the coefficients. I'll add a check to make the error message more readable but please, take the time to look at all the examples available in applications before posting a question. Thanks, Simon On Thu, Nov 3, 2016 at 3:21 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > > We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. > > The RTKScatterGlareCorrectionImageFilter code is given below. > > //rtkLagCorrectionImageFilter > typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; > LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); > LagCorrection->SetInput(Projections); > > //rtkScatterGlareCorrectionImageFilter > typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; > ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); > ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); > > > > > > Thanks & Regards > > Zahid Hasan Ansari > > > > ----- Original Message ----- > From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Cyril Mory, >> >> >> Thank you for your help. We are able to reconstruct 1024 >> volume now. >> >> But the reconstruction time is around 4 minutes. Can you >> please help us to reduce the reconstruction time? >> >> We are using NVIDIA TITAN X GPU which has 12 GB memory. >> >> >> Thanks & Regards >> >> Zahid Hasan Ansari >> >> >> >> >> ----- Original Message ----- >> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> >> >> > Dear Zahid, >> > >> > The output looks correct. >> > >> > If the command line solution I suggested in a previous email works, the >> > best way to move forward would be to compare your code and that of >> > rtkfdk.cxx, and where it differs, make sure you have not introduced an >> > error. >> > >> > Cyril >> > >> > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: >> > > Dear Cyril Mory, >> > > >> > > I have done the same but the Output.mhd file is still 0 >> > KB for 1024 volume. Please find the attachment of the status of the output >> > displayed. >> > > >> > > Please suggest us for further process. >> > > >> > > >> > > Thanks & Regards >> > > >> > > Zahid Hasan Ansari >> > > >> > > >> > > >> > > >> > > ----- Original Message ----- >> > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >> > [mailto:simon.rit at creatis.insa-lyon.fr] >> > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > > >> > > >> > >> I see two errors: >> > >> >> > >> Remove this line >> > >> >> > >> writer->SetNumberOfStreamDivisions(4); >> > >> >> > >> since only the streaming filter, not the write filter, needs to know >> > >> about the number of divisions. >> > >> And change the filename to >> > >> >> > >> "D:\\Output.mhd" >> > >> >> > >> It will write both the .mhd and the .raw files. >> > >> >> > >> I hope it helps, >> > >> Cyril >> > >> >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >> > >>> Dear Cyril Mory, >> > >>> >> > >>> I have modified my file writer code and used >> > >> StreamingImageFilter. Now its not giving any error message but the >> final >> > >> output is 0 byte for 1024 volume. It working fine for 512 volume. >> > >>> Please check my modified file writer code given >> below. >> > >>> >> > >>> // Streaming depending on streaming capability of writer >> > >>> typedef itk::StreamingImageFilter >> > >> StreamerType; >> > >>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>> streamerBP->SetInput(feldkamp->GetOutput()); >> > >>> streamerBP->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> //create a writer and write reconstructed file >> > >>> itk::ImageFileWriter::Pointer writer; >> > >>> writer = itk::ImageFileWriter::New(); >> > >>> writer->SetFileName("D:\\Output.raw"); >> > >>> writer->SetImageIO(io); >> > >>> writer->SetInput(streamerBP->GetOutput()); >> > >>> writer->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> >> > >>> Please let me know if any clarification is required. >> > >>> >> > >>> >> > >>> Thanks & Regards >> > >>> >> > >>> Zahid Hasan Ansari >> > >>> Senior Design Engineer >> > >>> Mobile No. +91-9738379729 >> > >>> >> > >>> Panacea Medical Technologies Pvt. Ltd. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >> http://www.panaceamedical.com >> > >>> Bangalore - India. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> ----- Original Message ----- >> > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> > Rit >> > >> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>> >> > >>> >> > >>>> Dear Zahid, >> > >>>> >> > >>>> The --divisions is an option of the command-line application rtkfdk. >> It >> > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >> > >>>> rather, it is passed to a streaming filter at the end of the >> pipeline. >> > >>>> Look for the following bit of code in rtkfdk.cxx : >> > >>>> >> > >>>> // Streaming depending on streaming capability of writer >> > >>>> typedef itk::StreamingImageFilter> > >>>> CPUOutputImageType> StreamerType; >> > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>>> streamerBP->SetInput( pfeldkamp ); >> > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg >> ); >> > >>>> >> > >>>> You can find information on how a streaming filter works on this >> page: >> > >>>> >> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> > >>>> >> > >>>> I hope it helps, >> > >>>> >> > >>>> Cyril >> > >>>> >> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >> > >>>>> Dear Cyril Mory, >> > >>>>> >> > >>>>> I have tried but I am not getting where to give >> > >>>> --division 4 in my code. >> > >>>>> Please find my code given below and please let me >> > know >> > >>>> where I need to change in my code to make it work. >> > >>>>> int _tmain(int argc, _TCHAR* argv[]) >> > >>>>> { >> > >>>>> #pragma region "Variable declaration" >> > >>>>> const double PI = 3.14159265358979323846; >> > >>>>> float *angles; >> > >>>>> int nProj = 349; >> > >>>>> typedef unsigned short pixelType; >> > >>>>> typedef float OutpixelType; >> > >>>>> const int dimension = 3; >> > >>>>> typedef itk::Image imageType; >> > >>>>> typedef itk::ImageRegionConstIterator >> ImageIteratorType; >> > >>>>> imageType::Pointer Projections = imageType::New(); >> > >>>>> >> > >>>>> #pragma endregion "Variable declaration" >> > >>>>> >> > >>>>> Projections = >> > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> > >> nProj); >> > >>>>> imageType::SpacingType pSpacing; >> > >>>>> pSpacing[0] = 0.2960; >> > >>>>> pSpacing[1] = 0.2960; >> > >>>>> pSpacing[2] = 0.2960; >> > >>>>> Projections->SetSpacing(pSpacing); >> > >>>>> >> > >>>>> imageType::PointType pOrigin; >> > >>>>> pOrigin[0] = -212.972; >> > >>>>> pOrigin[1] = -212.972; >> > >>>>> pOrigin[2] = -212.972; //-158.50; >> > >>>>> Projections->SetOrigin(pOrigin); >> > >>>>> >> > >>>>> Projections->Update(); >> > >>>>> >> > >>>>> //Read angles. >> > >>>>> char *angles_file = >> "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >> > >>>>> angles = new float[nProj]; >> > >>>>> angles = readAngles(angles_file, angles); >> > >>>>> >> > >>>>> #pragma region"Geometry" >> > >>>>> // Geometry object >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> > >>>>> GeometryType::Pointer geometry = GeometryType::New(); >> > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >> > >>>>> { >> > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, >> 0, >> > >> 0); >> > >>>> // 136 half fan //2.07 Kidwai // >> > >>>>> } >> > >>>>> >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> > >>>> GeometryWriterType; >> > >>>>> GeometryWriterType::Pointer geometryWriter = >> > GeometryWriterType::New(); >> > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >> > >>>>> geometryWriter->SetObject(geometry); >> > >>>>> geometryWriter->WriteFile(); >> > >>>>> geometry->Update(); >> > >>>>> #pragma endregion "Geometry" >> > >>>>> >> > >>>>> //Define output image type >> > >>>>> >> > >>>>> #ifdef USE_CUDA >> > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > >> PSSFType; >> > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> > >>>>> #else >> > >>>>> typedef itk::Image OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter >> PSSFType; >> > >>>>> typedef rtk::FDKConeBeamReconstructionFilter >> > FDKType; >> > >>>>> #endif >> > >>>>> >> > >>>>> //ScatterCorrection >> > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter> > imageType >> > >>>> BoellaardScatterCorrectionImageFilterType; >> > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer >> ScatterCorrection >> > = >> > >>>> BoellaardScatterCorrectionImageFilterType::New(); >> > >>>>> ScatterCorrection->SetInput(Projections); >> > >>>>> >> > >>>>> //VarianObiRawImageFilter >> > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> > >>>> RawImageFilterType; >> > >>>>> RawImageFilterType::Pointer AttenuationFilter = >> > >>>> RawImageFilterType::New(); >> > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >> > >>>>> >> > >>>>> //Create the output image >> > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >> > >>>> ConstantImageSourceType; >> > >>>>> ConstantImageSourceType::PointType origin_p; >> > >>>>> ConstantImageSourceType::SizeType size_p; >> > >>>>> ConstantImageSourceType::SpacingType spacing_p; >> > >>>>> ConstantImageSourceType::Pointer projectionsSource = >> > >>>> ConstantImageSourceType::New(); >> > >>>>> origin_p[0] = -127.5; >> > >>>>> origin_p[1] = -127.5; >> > >>>>> origin_p[2] = -127.5; >> > >>>>> size_p[0] = 512; >> > >>>>> size_p[1] = 512; >> > >>>>> size_p[2] = 512; >> > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >> > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >> > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >> > >>>>> >> > >>>>> projectionsSource->SetOrigin(origin_p); >> > >>>>> projectionsSource->SetSpacing(spacing_p); >> > >>>>> projectionsSource->SetSize(size_p); >> > >>>>> projectionsSource->SetConstant(0); >> > >>>>> >> > >>>>> // Short scan image filter >> > >>>>> PSSFType::Pointer pssf = PSSFType::New(); >> > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >> > >>>>> pssf->SetGeometry(geometry); >> > >>>>> pssf->InPlaceOff(); >> > >>>>> std::cout << "short scan image filter success" << std::endl; >> > >>>>> >> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); >> > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >> > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >> > >>>>> feldkamp->SetGeometry(geometry); >> > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >> > >>>>> feldkamp->SetGPUEnabled(1); >> > >>>>> feldkamp->SetNumberOfThreads(10000); >> > >>>>> >> > >>>>> #pragma region "Write volume" >> > >>>>> >> > >>>>> //Create a raw io for writing >> > >>>>> >> > >>>>> itk::RawImageIO::Pointer io; >> > >>>>> io = itk::RawImageIO::New(); >> > >>>>> >> > >>>>> for (unsigned int i = 0; i < dimension; i++) >> > >>>>> { >> > >>>>> io->SetDimensions(i, size_p[i]); >> > >>>>> io->SetSpacing(i, spacing_p[i]); >> > >>>>> io->SetOrigin(i, origin_p[i]); >> > >>>>> } >> > >>>>> io->SetHeaderSize(0); >> > >>>>> io->SetByteOrderToLittleEndian(); >> > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >> > >>>>> io->SetNumberOfComponents(1); >> > >>>>> io->SetNumberOfDimensions(3); >> > >>>>> >> > >>>>> //create a writer and write reconstructed file >> > >>>>> itk::ImageFileWriter::Pointer writer; >> > >>>>> writer = itk::ImageFileWriter::New(); >> > >>>>> writer->SetFileName("D:\\Output.raw"); >> > >>>>> writer->SetImageIO(io); >> > >>>>> writer->SetInput(feldkamp->GetOutput()); >> > >>>>> >> > >>>>> try >> > >>>>> { >> > >>>>> writer->Update(); >> > >>>>> } >> > >>>>> catch (itk::ExceptionObject & excp) >> > >>>>> { >> > >>>>> std::cerr << "Error while writing the image " << std::endl; >> > >>>>> std::cerr << excp << std::endl; >> > >>>>> getchar(); >> > >>>>> } >> > >>>>> #pragma endregion "WriteVolume" >> > >>>>> delete[] angles; >> > >>>>> return 0; >> > >>>>> } >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> Thanks & Regards >> > >>>>> >> > >>>>> Zahid Hasan Ansari >> > >>>>> Senior Design Engineer >> > >>>>> Mobile No. +91-9738379729 >> > >>>>> >> > >>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >>>> http://www.panaceamedical.com >> > >>>>> Bangalore - India. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> ----- Original Message ----- >> > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >> > >> Rit >> > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>> >> > >>>>> >> > >>>>>> Dear Zahid, >> > >>>>>> >> > >>>>>> I was able to perform a reconstruction from your header and >> geometry >> > >>>>>> file, using the following command lines: >> > >>>>>> >> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> > >>>>>> --phantomscale "128,128,128" --like Output.mhd >> > >>>>>> >> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> > >> --hardware >> > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> > >>>>>> >> > >>>>>> The first computes projections through a Shepp & Logan phantom, >> with >> > >> the >> > >>>>>> same size, spacing, origin, etc... as your projections, using your >> > >>>>>> geometry file geo.xml. >> > >>>>>> >> > >>>>>> The second line performs the FDK reconstruction. I had to use both >> > the >> > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory >> > (3GB, >> > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory >> > by >> > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> > >>>>>> parts, reconstructs them one by one, then assembles the results. >> Can >> > >> you >> > >>>>>> run the same commands and let us know whether you still encounter >> the >> > >>>>>> crash you mentioned ? If it works, you can use your own projection >> > data >> > >>>>>> in the second command line instead of "simulatedprojections.mha". >> > >>>>>> >> > >>>>>> Best, >> > >>>>>> >> > >>>>>> Cyril >> > >>>>>> >> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> > >>>>>> >> > >>>>>>> Dear Sir, >> > >>>>>>> >> > >>>>>>> Please find the Header file in the attachment. >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> Thanks & Regards >> > >>>>>>> >> > >>>>>>> Zahid Hasan Ansari >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> ----- Original Message ----- >> > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > Simon >> > >>>> Rit >> > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>> >> > >>>>>>> >> > >>>>>>>> Dear Zahid, >> > >>>>>>>> >> > >>>>>>>> We do not need the projections file, at least not for a first >> stage >> > >> of >> > >>>>>>>> error tracking. We only need the header. >> > >>>>>>>> Try the following command line: >> > >>>>>>>> >> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >> > >>>>>>>> >> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" >> file >> > is >> > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> > >> contains >> > >>>>>>>> the pixel values, but at the moment we do not need them. We will >> > >> create >> > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough >> to >> > >>>>>>>> track down the error you encounter. >> > >>>>>>>> >> > >>>>>>>> Looking forward to receiving your file, >> > >>>>>>>> Cyril >> > >>>>>>>> >> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >> > >>>>>>>>> Dear Sir, >> > >>>>>>>>> >> > >>>>>>>>> The single raw file of the projections is 1.4 GB >> > and >> > >> we >> > >>>> are >> > >>>>>> not >> > >>>>>>>> able to send this big file to you. Can you please suggest other >> > >>>>>> alternatives >> > >>>>>>>> for this? >> > >>>>>>>>> Or can you provide us the PC configuration to >> solve >> > >> the >> > >>>>>> issue? >> > >>>>>>>>> Let me know if any other clarification is >> required. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> Thanks & Regards >> > >>>>>>>>> >> > >>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> ----- Original Message ----- >> > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > >> Simon >> > >>>>>> Rit >> > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>>> Hello Zahid, >> > >>>>>>>>>> >> > >>>>>>>>>> We will need the header of your projections file, too (It is >> best >> > >> if >> > >>>>>> you >> > >>>>>>>>>> have all your projections as a single .mhd and a single .raw >> > file, >> > >> so >> > >>>>>> it >> > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >> > >>>>>>>>>> >> > >>>>>>>>>> Regards, >> > >>>>>>>>>> Cyril >> > >>>>>>>>>> >> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>> Dear Cyril Mory, >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> I have only used RTK version 1.3.0. but >> in >> > the >> > >>>> error >> > >>>>>>>>>> message it is showing RTK version 1.2.0. >> > >>>>>>>>>>> Please find the attachment of the >> geometry >> > >> file >> > >>>> of >> > >>>>>> our >> > >>>>>>>>>> projections. >> > >>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>> >> > >>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>>>> To: Zahid Hasan Ansari >> [mailto:zahidhasan.a at panaceamedical.com], >> > >>>> Simon >> > >>>>>>>> Rit >> > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, >> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the >> > >>>> source >> > >>>>>> of >> > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >> > >>>>>> therefore >> > >>>>>>>>>>>> yourself): >> > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable >> > changes >> > >> in >> > >>>>>> the >> > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so >> your >> > >>>>>> problem >> > >>>>>>>>>>>> might disappear just by upgrading to the new version >> > >>>>>>>>>>>> - create a small example that reproduces your problem. You >> can, >> > >> for >> > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> > >> logan >> > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look >> at >> > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need >> > an >> > >>>>>>>>>>>> example). And send us the script >> > >>>>>>>>>>>> - OR send us your geometry file and the header of your >> > >> projections >> > >>>>>> file >> > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >> > >>>>>> zero-filled >> > >>>>>>>>>>>> stack of projections), and the command line that crashes >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Best regards, >> > >>>>>>>>>>>> Cyril >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>>>> Dear Simon Rit, >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Please find the screen shot in the >> > >> attachment. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >> > : >> > >>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>>>> To: Zahid Hasan Ansari >> > [mailto:zahidhasan.a at panaceamedical.com] >> > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >> > >>>>>>>> [mailto:rtk-users at public.kitware.com], >> > >>>>>>>>>>>> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is >> a >> > >> CUDA >> > >>>>>>>>>> memory >> > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> > >> first >> > >>>>>> make >> > >>>>>>>>>>>> sure >> > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> > >> images. >> > >>>>>> If >> > >>>>>>>> it >> > >>>>>>>>>>>> is >> > >>>>>>>>>>>>>> no sufficient, you can split your volume using the >> > --divisions. >> > >>>> The >> > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >> > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the >> > use >> > >>>> of >> > >>>>>>>> RTK >> > >>>>>>>>>> on >> > >>>>>>>>>>>>>> our case studies webpage >> > >>>>>>>>>>>> . >> > >>>>>>>>>>>>>> Simon >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >> > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Dear Sir\Madam, >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >> > >>>>>> reconstruction >> > >>>>>>>>>> using >> > >>>>>>>>>>>> RTK >> > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the >> > screen >> > >>>>>> shoot >> > >>>>>>>> of >> > >>>>>>>>>>>>>>> the >> > >>>>>>>>>>>>>>>> same. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am using the following items >> given >> > >> below. >> > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >> > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >> > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit >> > console >> > >>>>>>>> application >> > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >> > >>>>>>>>>>>>>>>> 5. CUDA 7. >> > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >> > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Please provide the solution of this >> > and >> > >> let >> > >>>> me >> > >>>>>>>> know >> > >>>>>>>>>> if >> > >>>>>>>>>>>>>> any >> > >>>>>>>>>>>>>>>> other clarification is required. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> > EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, >> > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 >> | >> > >> Url >> > >>>> : >> > >>>>>>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>>>> >> ____________________________________________________________ >> > >>>>>>>>>>>>>>> ________________ >> > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> This email and any files transmitted with it are >> > confidential >> > >>>> and >> > >>>>>>>>>>>> intended >> > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom >> they >> > >> are >> > >>>>>>>>>>>> addressed. >> > >>>>>>>>>>>>>>> If you have received this email in error please notify the >> > >>>> system >> > >>>>>>>>>>>> manager. >> > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this >> > email >> > >>>> are >> > >>>>>>>>>>>> solely >> > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those >> > of >> > >>>> the >> > >>>>>>>>>>>> company. >> > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >>>> attachments >> > >>>>>>>> for >> > >>>>>>>>>>>> the >> > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> > any >> > >>>>>> damage >> > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> This email and any files transmitted with it are >> confidential >> > >> and >> > >>>>>>>>>> intended >> > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> > are >> > >>>>>>>>>> addressed. >> > >>>>>>>>>>>>> If you have received this email in error please notify the >> > >> system >> > >>>>>>>>>> manager. >> > >>>>>>>>>>>>> Please note that any views or opinions presented in this >> email >> > >> are >> > >>>>>>>>>> solely >> > >>>>>>>>>>>>> those of the author and do not necessarily represent those >> of >> > >> the >> > >>>>>>>>>> company. >> > >>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >> attachments >> > >>>>>> for >> > >>>>>>>>>> the >> > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> any >> > >>>> damage >> > >>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > Area >> > >>>>>> Phase >> > >>>>>>>> 1, >> > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > Industrial >> > >>>>>> Area, >> > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>> >> > >>>>>>>>>>> This email and any files transmitted with it are confidential >> > and >> > >>>>>>>> intended >> > >>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >> > >>>>>>>> addressed. >> > >>>>>>>>>>> If you have received this email in error please notify the >> > system >> > >>>>>>>> manager. >> > >>>>>>>>>>> Please note that any views or opinions presented in this email >> > are >> > >>>>>>>> solely >> > >>>>>>>>>>> those of the author and do not necessarily represent those of >> > the >> > >>>>>>>> company. >> > >>>>>>>>>>> Finally, the recipient should check this email and any >> > attachments >> > >>>> for >> > >>>>>>>> the >> > >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> > >> damage >> > >>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>> >> > >>>>>>>>> ________________________________________ >> > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >> > >>>> Phase >> > >>>>>> 1, >> > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >> > >>>> Area, >> > >>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>> >> > >>>>>>>>> This email and any files transmitted with it are confidential >> and >> > >>>>>> intended >> > >>>>>>>>> solely for the use of the individual or entity to whom they are >> > >>>>>> addressed. >> > >>>>>>>>> If you have received this email in error please notify the >> system >> > >>>>>> manager. >> > >>>>>>>>> Please note that any views or opinions presented in this email >> are >> > >>>>>> solely >> > >>>>>>>>> those of the author and do not necessarily represent those of >> the >> > >>>>>> company. >> > >>>>>>>>> Finally, the recipient should check this email and any >> attachments >> > >> for >> > >>>>>> the >> > >>>>>>>>> presence of viruses. The company accepts no liability for any >> > damage >> > >>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>> ________________________________________ >> > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > >> Phase >> > >>>> 1, >> > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > >> Area, >> > >>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>> Fax : + 91 80 42428710 >> > >>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>> >> > >>>>>>> This email and any files transmitted with it are confidential and >> > >>>> intended >> > >>>>>>> solely for the use of the individual or entity to whom they are >> > >>>> addressed. >> > >>>>>>> If you have received this email in error please notify the system >> > >>>> manager. >> > >>>>>>> Please note that any views or opinions presented in this email are >> > >>>> solely >> > >>>>>>> those of the author and do not necessarily represent those of the >> > >>>> company. >> > >>>>>>> Finally, the recipient should check this email and any attachments >> > for >> > >>>> the >> > >>>>>>> presence of viruses. The company accepts no liability for any >> damage >> > >>>>>>> caused by any virus transmitted by this email. >> > >>>>>>> >> > >>>>> ________________________________________ >> > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>> Fax : + 91 80 42428710 >> > >>>>> Url : http://www.panaceamedical.com >> > >>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>> PMT EMAIL DISCLAIMER: >> > >>>>> >> > >>>>> This email and any files transmitted with it are confidential and >> > >> intended >> > >>>>> solely for the use of the individual or entity to whom they are >> > >> addressed. >> > >>>>> If you have received this email in error please notify the system >> > >> manager. >> > >>>>> Please note that any views or opinions presented in this email are >> > >> solely >> > >>>>> those of the author and do not necessarily represent those of the >> > >> company. >> > >>>>> Finally, the recipient should check this email and any attachments >> for >> > >> the >> > >>>>> presence of viruses. The company accepts no liability for any damage >> > >>>>> caused by any virus transmitted by this email. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>> >> > >>> ________________________________________ >> > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>> Fax : + 91 80 42428710 >> > >>> Url : http://www.panaceamedical.com >> > >>> >> > >> >> > >> ____________________________________________________________________________ >> > >>> PMT EMAIL DISCLAIMER: >> > >>> >> > >>> This email and any files transmitted with it are confidential and >> > intended >> > >>> solely for the use of the individual or entity to whom they are >> > addressed. >> > >>> If you have received this email in error please notify the system >> > manager. >> > >>> Please note that any views or opinions presented in this email are >> > solely >> > >>> those of the author and do not necessarily represent those of the >> > company. >> > >>> Finally, the recipient should check this email and any attachments for >> > the >> > >>> presence of viruses. The company accepts no liability for any damage >> > >>> caused by any virus transmitted by this email. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > >> >> > >> >> > > >> > > ________________________________________ >> > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >> > Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> > Malur - 563130. Kolar District. INDIA. >> > > >> > > Tel : +91 80 4242 8700 / 2845 4785 >> > > Fax : + 91 80 42428710 >> > > Url : http://www.panaceamedical.com >> > > >> > >> ____________________________________________________________________________ >> > > PMT EMAIL DISCLAIMER: >> > > >> > > This email and any files transmitted with it are confidential and >> intended >> > > solely for the use of the individual or entity to whom they are >> addressed. >> > > If you have received this email in error please notify the system >> manager. >> > > Please note that any views or opinions presented in this email are >> solely >> > > those of the author and do not necessarily represent those of the >> company. >> > > Finally, the recipient should check this email and any attachments for >> the >> > > presence of viruses. The company accepts no liability for any damage >> > > caused by any virus transmitted by this email. >> > > >> > >> > >> > > > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Thu Nov 3 16:10:31 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 20:10:31 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Message-ID: <1775591917.651990.1478203831679@mail.yahoo.com> OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right?About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question:I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards,Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Fri Nov 4 02:31:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 4 Nov 2016 07:31:18 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1775591917.651990.1478203831679@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> Message-ID: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: > OK. good. Thank Cyril to clarify it to me. To implement the Newton's > methods instead of multiplication of R with R^T, we need the > multiplication of Jacobian/Sensitivity (R here) matrix with vector > variable (here x) and the gradient vector (here multiplication of R > with -r). I think it is possible to implement the Newton optimization > methods with the current modules as I think we could extract the R and > f dot product and R and r dot product. Am I right? > About the displayed algorithms, I think the gradient vector is dot > product of matrix A (Jacobian) with the minus residual vector (-r). > > One more question: > I already developed my codes in python. Do you think it is easy to > wrap your modules in python? I don't have experience in these subject. > > Regards, > Vahid > > > On Thursday, November 3, 2016 2:23 AM, Cyril Mory > wrote: > > > Hello Vahid, > Thank you for this insight on Newton's methods. Yes, the output of the > backprojection filter, in SART, is the gradient of the cost function. > You may have noticed that the pipeline performs a division of the > forward projection by something coming from > "RayBoxIntersectionFilter". This is to normalize the forward > projection, so that R^T R f ~= blurry f. If you don't do it, you'll > have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, > and your algorithm will quickly diverge. > You could try to extract the gradient from the conjugate gradient > filter as well, but it is significantly more tricky: first, the CG > filter was implemented from the following algorithm, taken from > wikipedia (which embeds the normalization I was mentioning earlier): > In this algorithm, it is not clear to me what exactly is the gradient > of the cost function. I would say it is something like "- r_k", but > I'm not sure. Second, as you see, the CG filter needs an operator A, > which may differ from one problem to another, so this operator is > implemented in a separate filter, which in your case would be > rtkReconstructionConjugateGradientOperator, with the laplacian > regularization parameter gamma set to 0. > Note that we never actually store the system matrix R. Instead, the > interpolation coefficient it contains are re-computed on the fly > everytime we forward project. And the same holds for backprojection, > i.e the matrix R^T. > Best, > Cyril > > On 11/03/2016 03:38 AM, vahid ettehadi wrote: >> Hello Simon and Cyril, >> Thanks for the reply. >> You are right Simon. I did not notice it too in the literature. The >> main problem as you said is the storage. Actually I developed the >> conjugate gradient (CG), quasi-Newton and Newton optimization methods >> for optical tomography and I intended to apply them to the CT >> reconstruction as well. I implemented the Newton's methods >> (Gauss-Newton and Levenberg-Marquardt) in a >> Jacobian-Free-Newton-Krylov approaches to avoid the matrix >> multiplication of Jacobians (sensitivity). It means we only need to >> store the Jacobian matrix for the these methods (the matrix R that >> Cyril was mentioned), that is still a big matrix for practical >> problems in CT reconstruction. For the quasi-Newton I adapted an >> L-BFGS algorithm that only need the 3 or 8 last iterations of the >> gradient vector to calculate the Hessian matrix. In my case, the >> L-BFGS and Newton's methods was much faster than the CG as you know >> because of using the second order derivative (hessian matrix). I saw >> in your last paper you implement the conjugate gradient method, so I >> thought it might be easy to extract the gradient vector from CG >> modules and solve the cost function within the quasi-Newton/Newton >> methods. I will look at the codes to see what I can do. >> Thanks again for the reply. >> >> @Cyril: >> Please correct me if I am wrong. you mean the output of >> backProjectionFilter is the gradient of defined cost function? >> >> Regards, >> Vahid >> >> >> On Wednesday, November 2, 2016 2:53 AM, Cyril Mory >> >> wrote: >> >> >> Hi Vahid, >> Welcome to RTK :) >> Indeed, there are several iterative methods already implemented in >> RTK, but none of the filters allows you to easily extract the >> gradient of the least squares function there are minimizing. >> If you need to minimize the classical non-regularized tomographic >> cost function, ie || R f - p ||?, with R the forward projection >> operator, f the volume you are looking for, and p the measured >> projections, my best advice would be to copy some part of the >> pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, >> ie the following part (copy-paste this into webgraphviz.com) >> >> digraph SARTConeBeamReconstructionFilter { >> >> Input0 [ label="Input 0 (Volume)"]; >> Input0 [shape=Mdiamond]; >> Input1 [label="Input 1 (Projections)"]; >> Input1 [shape=Mdiamond]; >> >> node [shape=box]; >> ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref >> rtk::ForwardProjectionImageFilter"]; >> Extract [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref >> itk::MultiplyImageFilter"]; >> AfterExtract [label="", fixedsize="false", width=0, height=0, >> shape=none]; >> Subtract [ label="itk::SubtractImageFilter" URL="\ref >> itk::SubtractImageFilter"]; >> MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" >> URL="\ref itk::MultiplyImageFilter"]; >> Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref >> itk::DivideOrZeroOutImageFilter"]; >> GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" >> URL="\ref itk::MultiplyImageFilter", style=dashed]; >> Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref >> rtk::DisplacedDetectorImageFilter"]; >> ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref >> rtk::RayBoxIntersectionImageFilter"]; >> ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref >> rtk::BackProjectionImageFilter"]; >> OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; >> OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; >> Input0 -> OutofInput0 [arrowhead=none]; >> OutofInput0 -> ForwardProject; >> ConstantVolume -> BeforeBP [arrowhead=none]; >> BeforeBP -> BackProjection; >> Extract -> AfterExtract[arrowhead=none]; >> AfterExtract -> MultiplyByZero; >> AfterExtract -> Subtract; >> MultiplyByZero -> ForwardProject; >> Input1 -> Extract; >> ForwardProject -> Subtract; >> Subtract -> MultiplyByLambda; >> MultiplyByLambda -> Divide; >> Divide -> GatingWeight; >> GatingWeight -> Displaced; >> ConstantProjectionStack -> ExtractConstantProjection; >> ExtractConstantProjection -> RayBox; >> RayBox -> Divide; >> Displaced -> BackProjection; >> BackProjection -> OutofBP [arrowhead=none]; >> } >> >> As you can see, it is a very large part of the SART reconstruction >> filter, so yoiu might be better off just copying the whole >> SARTConeBeamReconstructionFilter and modifying it. >> >> Of course, you could also look into ITK's cost function class, and >> see if one of the classes inherited from it suits your needs, >> implement your cost function this way, and use ITK's off-the-shelf >> solvers to minimize it. See the inheritance diagram in >> https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if >> you want to try this approach. >> >> Best regards, >> Cyril >> >> On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >>> Hello RTK users and developers, >>> >>> I already implemented the RTK and reconstructed some images with the >>> FDK algorithm implemented in RTK. It works well. Thanks to RTK >>> developers. >>> Now, I am trying to develop a model-based image reconstruction for >>> our cone-beam micro-CT. I see already that some iterative algorithms >>> like ART and its modifications and conjugate-gradient (CG) method >>> are implemented in the RTK. I want to develop a model-based >>> reconstruction through the Newton/quasi-Newton optimizations >>> methods. I was wondering is it possible to extract the gradient of >>> least square function from implemented algorithms like CG module? >>> Any recommendation will be appreciated. >>> >>> Best Regards, >>> Vahid >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Fri Nov 4 16:42:08 2016 From: julien.jomier at kitware.com (Julien Jomier) Date: Fri, 4 Nov 2016 21:42:08 +0100 Subject: [Rtk-users] SimpleRTK + Matlab In-Reply-To: References: <06d4327e-9fd4-bf08-565d-5304f577b521@creatis.insa-lyon.fr> Message-ID: <89255846-9a06-a625-45f1-88d140c0013d@kitware.com> Hi Arvid, Sorry for the late reply. We successfully build the latest RTK with ITK 4.11.0 on Visual Studio 2013 with static libraries (BUILD_SHARED_LIBS set to OFF). I have just pushed a fix to SimpleRTK to build as shared libraries. Note that you would need to have ITK built as shared libraries as well. Let us know if you still have any issues, Julien On 23/09/2016 10:29, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi again. > > I've been spending some more time with this, and feel I learned a little > bit more. I have now tested this on several machines with several > compiler versions (more or less all of them) and serveral cmake versions > - all with Windows 7. > > I can actually reproduce the successful build you linked to, but this > can only be done if you do not include any of the language wrappings, > like in the build you linked to. Enable any of them, and the build will > break. (see attachment) > > I suspect it must have been working in the past, but since none of them > are included in your test there have been a breaking change, and none of > them work anymore. > > I am still trying to tweak then projects manually to build SimpleRTK > with some sort of language support, but still without any luck. > > best > > Arvid > > On Tue, Sep 20, 2016 at 4:19 PM, Simon Rit > > > wrote: > > Hi, > Sorry, I won't be able to help but I'd advise to tick on WRAP_PYTHON > only at first in cmake, not the other languages (i.e., tick off > WRAP_LUA). > I can't solve your problem but Kitware is going to look into an > upgrade of SimpleRTK in the coming days, I'll ask them if they know > what is the issue. If you look here: > http://my.cdash.org/viewNotes.php?buildid=1052065 > > this is a nightly build of SimpleRTK on Windows and it seems to > work. I don't see why it wouldn't work for you. > Simon > > On Tue, Sep 20, 2016 at 2:17 PM, Arvid Piehl Lauritsen B?ttiger > > wrote: > > Hi again. > > I understand, but could you please help me get in contact with > the person who knows something about the windows build (if any), > I think there is something wrong. > > I have been investigating the build problems I had and found > that in the sub folder "SimpleRTK-build" there is a solutions > file with SimpleRTK. I opened it up and found the projects which > I had problems building: "SimpleRTKCommon", > "SimpleRTKBasicFilters0", "SimpleRTKBasicFilters1" etc. > > When I then tried to build SimpleRTKCommon manually it just > compiled without any problems. However, when I followed up by > building "SimpleRTKBasicFilters0" it gave me an error which > stated that it couldn't find "SimpleRTKCommon-0.9.lib" - which I > just build. > > After some more investigation I realized that the > SimpleRTKCommon is set to build a dynamic linked library (DLL), > and SimpleRTKBasicFilters0 expects it to be a static linked > library (LIB). After changing SimpleRTKCommon to be build as a > static library - and changing the output location - I could > build SimpleRTKBasicFilters0. > > However, SimpleRTKBasicFilters0 is also build as an DLL, but > changing that to a LIB as well I could build > SimpleRTKBasicFilters1, then SimpleRTKBasicFilters2 and then > SimpleRTKBasicFilters3. You get the point. > > I'm unsure if the intention is to build them as static or > dynamic libraries, but in any case the current build > configuration doesn't work - on my setup at least. > > However, I should note than for some reason the "lua5" project > did build successfully out of the box. Whatever it does > differently works. > > best > > Arvid > > > > On Tue, Sep 20, 2016 at 7:33 AM, Simon Rit > > wrote: > > I'm not an msvc specialist but your first line suggests that > you have pasted only part of the log: > > 20> Done Building Project > "C:\Users\aplb\Work\RTK\RTK1.2-bin-vs13\SimpleRTK-build\ALL_BUILD.vcxproj" > (default targets) -- FAILED. > > What you need to find out is why this build failed. If the > build fails, the linking cannot work. > Cheers, > Simon > > > On 19/09/2016 19:44, Arvid Piehl Lauritsen B?ttiger wrote: >> I did a complete rebuild, and here is the end of the >> output: http://pastebin.com/hvQ33WWg >> >> I have to admit I'm not sure what to make of it. I should >> note that I'm trying to compile the version I just pulled >> from git earlier today, since the other version I normally >> work with is really old. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 6:50 PM, Simon Rit >> > > wrote: >> >> SimpleRTKCommon is a library generated when compiling. >> Don't you have another error before that which >> explains why it did not compile? >> Simon >> >> On Mon, Sep 19, 2016 at 2:30 PM, Arvid Piehl Lauritsen >> B?ttiger > > wrote: >> >> Hi again. >> >> I've been trying to get it working. However, I did >> run into some problems compiling SimpleRTK. The >> main issue seems to be that it depends on >> SimpleRTKCommon - which I do not have. >> >> Here is the last few lines from VS2013 >> >> > 5>LINK : fatal error LNK1181: cannot open input >> file '..\..\..\lib\Debug\SimpleRTKCommon-0.9.lib' >> [C:\Users\aplb\Work\RTK\RTK1.2- >> > >> bin-vs13\SimpleRTK-build\Code\IO\src\SimpleRTKIO.vcxproj] >> > 5> >> > 5> 0 Warning(s) >> > 5> 2 Error(s) >> > 5> >> > 5> Time Elapsed 00:00:25.26 >> > ========== Build: 4 succeeded, 1 failed, 0 >> up-to-date, 0 skipped ========== >> >> I'm not quite sure what is going on, because the >> only reference I can find to SimpleRTKCommon is >> the CMakeLists.txt on github: >> https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/CMakeLists.txt >> >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:19 AM, Simon Rit >> > > wrote: >> >> The latest MacOS. It's nice if you can test it >> on other platforms, I'll try to run it on >> Linux but I have to upgrade matlab first (I >> think python calls are available starting with >> Matlab 2014). >> Simon >> >> On Mon, Sep 19, 2016 at 11:14 AM, Arvid Piehl >> Lauritsen B?ttiger > > wrote: >> >> Dear Simon >> >> This look very interesting! Which platform >> did you successfully execute this on? >> I will give it a try at once (on windows) >> and let you know if I run into any problems. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:05 AM, Simon >> Rit > > >> wrote: >> >> Dear RTK users, >> I have quickly tested calling the >> SimpleRTK python lib from Matlab and >> it seems to work well: >> http://wiki.openrtk.org/index.php/SimpleRTK#Matlab >> >> Therefore, I don't think we have to >> work on Matlab wrappings but let us >> know if you think otherwise. >> Future works include a simple >> installation mechanism for >> pre-compiled SimpleRTK libraries. >> We'll keep you posted! >> Simon >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> >> >> >> >> > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From w_ettehadi at yahoo.com Mon Nov 7 16:53:54 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Mon, 7 Nov 2016 21:53:54 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Message-ID: <1477848112.17731.1478555634307@mail.yahoo.com> Thanks Cyril for your time and advises. Vahid On Friday, November 4, 2016 2:31 AM, Cyril Mory wrote: Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right? About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question: I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards, Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Philipp.Freislederer at med.uni-muenchen.de Thu Nov 17 05:08:09 2016 From: Philipp.Freislederer at med.uni-muenchen.de (Freislederer, Philipp) Date: Thu, 17 Nov 2016 10:08:09 +0000 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac Message-ID: Dear all, I currently have some issues in generating off-plane projections where I think rtk might be helpful. I am trying to generate projections from an Brainlab ExacTrac geometry. What I am getting is a projection matrix generated by the system itself. Using only this information I am able to project any voxel value in a CT onto a panel. Now, in order to speed everything up a little and not re-implement everything that has been done sufficiently already I am hoping to use 'rtkforwardprojections'. The problem is I am not able to reproduce the Brainlab geometry using 'rtksimulatedgeometry' from the projection matrix directly. I could calculate the room angle of the source to the panel from the projection matrix but I am getting weird results when applying these on something like plastimatch, so I think I have an error in there. Is there a way of creating a geometry simply from the projection matrix or do I have to work around and calculate every parameter needed specifically? Maybe someone has some experience with this type of issue. Thanks in advance! Philipp -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 17 05:27:14 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 17 Nov 2016 11:27:14 +0100 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac In-Reply-To: References: Message-ID: Hi, Yes ! I have actually added that functionality recently from Thibault Notargiacomo's code see bool rtk::ThreeDCircularProjectionGeometry::AddProjection ( const HomogeneousProjectionMatrixType & pMat) Note that the projection matrix must be for a 3D position in mm to a 2D position in mm. You can add pre-/post-matrices to go from mm to voxel. There is no command line tool to do it but you can easily create your command line tool to do it. This is tested in testing/rtkgeometryfrommatrixtest.cxx. Let me know if you need more info, Simon On Thu, Nov 17, 2016 at 11:08 AM, Freislederer, Philipp < Philipp.Freislederer at med.uni-muenchen.de> wrote: > Dear all, > > > > I currently have some issues in generating off-plane projections where I > think rtk might be helpful. > > I am trying to generate projections from an Brainlab ExacTrac geometry. > > What I am getting is a projection matrix generated by the system itself. > Using only this information I am able to project any voxel value in a CT > onto a panel. > > Now, in order to speed everything up a little and not re-implement > everything that has been done sufficiently already I am hoping to use > ?rtkforwardprojections?. > > The problem is I am not able to reproduce the Brainlab geometry using > ?rtksimulatedgeometry? from the projection matrix directly. > > I could calculate the room angle of the source to the panel from the > projection matrix but I am getting weird results when applying these on > something like plastimatch, so I think I have an error in there. > > > > Is there a way of creating a geometry simply from the projection matrix or > do I have to work around and calculate every parameter needed specifically? > > Maybe someone has some experience with this type of issue. > > > > Thanks in advance! > > > > Philipp > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Sat Nov 19 14:51:24 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Sat, 19 Nov 2016 19:51:24 +0000 Subject: [Rtk-users] Geometric calibration Message-ID: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ From simon.rit at creatis.insa-lyon.fr Tue Nov 22 02:01:19 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 22 Nov 2016 08:01:19 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: Message-ID: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper ). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > Hi RTK users, > > I'm interested in reconstructing images acquired by a fluoroscopy system > rotating around a knee phantom. Unfortunately, I've been unsuccessful so > far. I recognize some of the phantom in the reconstructed image, but it > contains double contours and the shape is deformed. > > I think the issue might be incorrect geometry specification. I have images > also including a phantom containing markers for which we know the > coordinates, which should allow us to calibrate the system. On the wiki on > image quality, I saw that some users had developed scripts to do the > calibration? Would someone be willing to share it? > > Kind regards, > Sepp > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: after.pdf Type: application/pdf Size: 5974 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: before.pdf Type: application/pdf Size: 5678 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: calib.py Type: text/x-python Size: 2488 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 23 12:44:11 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 23 Nov 2016 18:44:11 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Andreas, Today we had the RTK training and some users were looking for a XIM file reader. I pointed to your contributions but any chance to have it put in RTK soon? Thanks in advance, Simon On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit wrote: > Hi, > Thanks for sharing. There still seems to be some streak artefacts, do you > see the same in the Varian reconstruction? > I'm looking forward to the pull-request, I think we should try to make the > bzip2 optional. > Simon > > On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < > andreasg at phys.au.dk> wrote: > >> Thanks for the fast response Simon! >> >> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >> right all along! >> I just didn't get why it makes a difference. I think I do now, as the >> resulting image was flipped upside down and not left/right as I expected. >> [attached] >> >> The reconstruction is significantly better, I'll look into what should be >> included in the reader and what I should keep in my program to keep >> conformity with the other readers. Then I'll create a pull request. >> >> Just for the purpose of others hitting the same or a similar bug, I also >> attempted: >> I did the SART reconstruction with 10 iterations, lambda=0.3, and Joseph >> back/forward projection, *but with no* significant improvement [attached] >> >> And: >> If you want you can download the data set from: [Dropbox link to 460MB >> zip (I'll >> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >> is used along with the Scan.xml (Calibrations folder may be used in the >> future in my program, but I'm not sure if you can rely on the existence of >> the content). >> >> A MatLab XimReader is available: link >> (also >> available from Varian bitbucket along a with a python version and a >> C#->matlab plugin >> ). >> Otherwise my fork with the RTK-style reader is available from the same >> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >> so bzip2 is a new dependancy). >> >> Best regards >> Andreas >> >> >> __________________________________ >> >> Andreas Gravgaard Andersen >> >> Department of Oncology, >> >> Aarhus University Hospital >> >> N?rrebrogade 44, >> >> 8000, Aarhus C >> >> Mail: andreasg at phys.au.dk >> >> Cell: +45 3165 8140 >> >> >> >> 2016-09-16 16:13 GMT+02:00 Simon Rit : >> >>> Hi, >>> You can try any iterative reconstruction, they can also handle short >>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>> However, the nature of the artifacts indicate more a problem in the >>> geometry in my opinion. I have seen such errors when, for example, rotating >>> in the wrong direction. I can have a look if you share the dataset. >>> Cheers, >>> Simon >>> >>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>> andreasg at phys.au.dk> wrote: >>> >>>> Thanks for the suggestions, Simon and Cyril! >>>> >>>> I have been carefully looking though the geometry and from what I >>>> understand of the transformations matrices, the geometry looks correct/(as >>>> expected). >>>> >>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>> were because had used half-fan scans (full-arc). >>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>> artifacts occurs! >>>> >>>> Are there other (built-in) means of improving half-arc scans, than the >>>> parker short scan filter? >>>> >>>> Parker short scan does a decent job, but the result is still far from >>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>> >>>> Best regards >>>> Andreas >>>> >>>> >>>> __________________________________ >>>> >>>> Andreas Gravgaard Andersen >>>> >>>> Department of Oncology, >>>> >>>> Aarhus University Hospital >>>> >>>> N?rrebrogade 44, >>>> >>>> 8000, Aarhus C >>>> >>>> Mail: andreasg at phys.au.dk >>>> >>>> Cell: +45 3165 8140 >>>> >>>> >>>> >>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory : >>>> >>>>> One suggestion since it works with the Hnd projections: >>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>> Xim projections) and output two projection stack files and two geometry >>>>> files, then compare the projection stack files by subtracting one to the >>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>> are identical, then I do not see any reason why the reconstructions should >>>>> be different, so my guess is that you will find differences. >>>>> >>>>> >>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>> >>>>>> Hi, >>>>>> I have almost never worked with Varian data but it looks like a >>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>> projections which results in assigning a bad geometry to each >>>>>> projection. How did you name your projections? Maybe check that the >>>>>> order matches that of the RTK geometry file. Otherwise, there might be >>>>>> an issue in the creation of the geometry file itself. >>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>> code when you feel it's ready. >>>>>> Simon >>>>>> >>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>> wrote: >>>>>> >>>>>>> Dear RTK experts, >>>>>>> >>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>> format. I >>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>> available with RTK. >>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>> >>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>> in UI), >>>>>>> however when reconstructing with a regular FDK I get a reconstructed >>>>>>> image >>>>>>> that is smeared out around the high and low density areas [see >>>>>>> attached >>>>>>> image] >>>>>>> >>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>> Scripps >>>>>>> (~520 projections). Fixed detector and source (offset=0) with SID=2m, >>>>>>> SDD=3m. >>>>>>> >>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>> algorithm). >>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>> software works >>>>>>> perfectly. >>>>>>> >>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>> creates >>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>> If the first few projections are excluded, the following projection >>>>>>> will act >>>>>>> the same way. >>>>>>> >>>>>>> The projections are corrected for beam hardening and all the >>>>>>> projections >>>>>>> have the expected attenuation. >>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>> reconstruction >>>>>>> makes the same artifacts. >>>>>>> >>>>>>> Setting the value of the first and last projection to zero has the >>>>>>> same >>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>> not the >>>>>>> artifacts. >>>>>>> >>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>> >>>>>>> Best regards >>>>>>> Andreas >>>>>>> >>>>>>> __________________________________ >>>>>>> >>>>>>> Andreas Gravgaard Andersen >>>>>>> >>>>>>> Department of Oncology, >>>>>>> >>>>>>> Aarhus University Hospital >>>>>>> >>>>>>> N?rrebrogade 44, >>>>>>> >>>>>>> 8000, Aarhus C >>>>>>> >>>>>>> Mail: andreasg at phys.au.dk >>>>>>> >>>>>>> Cell: +45 3165 8140 >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Thu Nov 24 01:34:58 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Thu, 24 Nov 2016 06:34:58 +0000 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: , Message-ID: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Hi Simon, Thanks for the script. I was wondering if you could also share the csv or a dummy file? I'm unsure of what the second column contains. An offset distance to the rotation axis? Or the height? Which distance was known in your example? From the code it looks like the distance to the rotation axis? Sepp On 22 Nov 2016, at 08.01, Simon Rit > wrote: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt > wrote: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 24 01:44:42 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 24 Nov 2016 07:44:42 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> References: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Message-ID: Hi, Enclosed. Column 1 is platform angle, 2 is bb height, 3 is the u coordinate (in pixel) and 4 is the v coordinate (in pixel too). I had approximately measured the source-to-detector (270) and source-to-isocenter (210) distances but they were still optimized to have a better assessment. Simon On Thu, Nov 24, 2016 at 7:34 AM, Sepp de Raedt wrote: > Hi Simon, > > Thanks for the script. I was wondering if you could also share the csv or > a dummy file? I'm unsure of what the second column contains. An offset > distance to the rotation axis? Or the height? > > Which distance was known in your example? From the code it looks like the > distance to the rotation axis? > > Sepp > > On 22 Nov 2016, at 08.01, Simon Rit > wrote: > > Hi Sepp, > I did do a calibration script on a micro CT platform. The idea was that I > had a bb taken from 4 different view points at 4 different heights with a > known distance. Their projected position was segmented beforehand on the > projections and I tried to match the projections by optimizing the > calibration (which we see in before.pdf and after.pdf). I don't think it's > a good script, e.g., because I tried to find 8 parameters when 7 are > sufficient for my system (see, e.g., this paper > ). > But this gives you a starting point to develop your own script which will > hopefully be better. Please share if you do something from it! > Thanks, > Simon > > On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > >> Hi RTK users, >> >> I'm interested in reconstructing images acquired by a fluoroscopy system >> rotating around a knee phantom. Unfortunately, I've been unsuccessful so >> far. I recognize some of the phantom in the reconstructed image, but it >> contains double contours and the shape is deformed. >> >> I think the issue might be incorrect geometry specification. I have >> images also including a phantom containing markers for which we know the >> coordinates, which should allow us to calibrate the system. On the wiki on >> image quality, I saw that some users had developed scripts to do the >> calibration? Would someone be willing to share it? >> >> Kind regards, >> Sepp >> >> ______________________________________________________________________ >> This email has been scanned by the Symantec Email Security.cloud service. >> For more information please visit http://www.symanteccloud.com >> ______________________________________________________________________ >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > > > > > > > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CentroidPositions_H5_to_H25_90degstep.csv Type: text/csv Size: 321 bytes Desc: not available URL: From andreasg at phys.au.dk Fri Nov 25 10:25:55 2016 From: andreasg at phys.au.dk (Andreas Gravgaard Andersen) Date: Fri, 25 Nov 2016 16:25:55 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Simon, I have created a pull-request with the XIM file reader. I'm sorry for being late with the promised pull-request (there were a lot of merge conflicts, so it got postponed). I have cleaned it up, but it is still not flawless as mentioned in the pull-request-message. I have tried to keep the RTK coding-style by creating it as a modified HND file reader, but I have only a year of experience with C++, so I apologize if I've left some ugly code in there.. Best regards Andreas __________________________________ Andreas Gravgaard Andersen Department of Oncology, Aarhus University Hospital N?rrebrogade 44, 8000, Aarhus C Mail: andreasg at phys.au.dk Cell: +45 3165 8140 2016-11-23 18:44 GMT+01:00 Simon Rit : > Dear Andreas, > Today we had the RTK training and some users were looking for a XIM file > reader. I pointed to your contributions but any chance to have it put in > RTK soon? > Thanks in advance, > Simon > > On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit > wrote: > >> Hi, >> Thanks for sharing. There still seems to be some streak artefacts, do you >> see the same in the Varian reconstruction? >> I'm looking forward to the pull-request, I think we should try to make >> the bzip2 optional. >> Simon >> >> On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < >> andreasg at phys.au.dk> wrote: >> >>> Thanks for the fast response Simon! >>> >>> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >>> right all along! >>> I just didn't get why it makes a difference. I think I do now, as the >>> resulting image was flipped upside down and not left/right as I expected. >>> [attached] >>> >>> The reconstruction is significantly better, I'll look into what should >>> be included in the reader and what I should keep in my program to keep >>> conformity with the other readers. Then I'll create a pull request. >>> >>> Just for the purpose of others hitting the same or a similar bug, I also >>> attempted: >>> I did the SART reconstruction with 10 iterations, lambda=0.3, and >>> Joseph back/forward projection, *but with no* significant improvement >>> [attached] >>> >>> And: >>> If you want you can download the data set from: [Dropbox link to 460MB >>> zip (I'll >>> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >>> is used along with the Scan.xml (Calibrations folder may be used in the >>> future in my program, but I'm not sure if you can rely on the existence of >>> the content). >>> >>> A MatLab XimReader is available: link >>> (also >>> available from Varian bitbucket along a with a python version and a >>> C#->matlab plugin >>> ). >>> Otherwise my fork with the RTK-style reader is available from the same >>> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >>> so bzip2 is a new dependancy). >>> >>> Best regards >>> Andreas >>> >>> >>> __________________________________ >>> >>> Andreas Gravgaard Andersen >>> >>> Department of Oncology, >>> >>> Aarhus University Hospital >>> >>> N?rrebrogade 44, >>> >>> 8000, Aarhus C >>> >>> Mail: andreasg at phys.au.dk >>> >>> Cell: +45 3165 8140 >>> >>> >>> >>> 2016-09-16 16:13 GMT+02:00 Simon Rit : >>> >>>> Hi, >>>> You can try any iterative reconstruction, they can also handle short >>>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>>> However, the nature of the artifacts indicate more a problem in the >>>> geometry in my opinion. I have seen such errors when, for example, rotating >>>> in the wrong direction. I can have a look if you share the dataset. >>>> Cheers, >>>> Simon >>>> >>>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>>> andreasg at phys.au.dk> wrote: >>>> >>>>> Thanks for the suggestions, Simon and Cyril! >>>>> >>>>> I have been carefully looking though the geometry and from what I >>>>> understand of the transformations matrices, the geometry looks correct/(as >>>>> expected). >>>>> >>>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>>> were because had used half-fan scans (full-arc). >>>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>>> artifacts occurs! >>>>> >>>>> Are there other (built-in) means of improving half-arc scans, than the >>>>> parker short scan filter? >>>>> >>>>> Parker short scan does a decent job, but the result is still far from >>>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>>> >>>>> Best regards >>>>> Andreas >>>>> >>>>> >>>>> __________________________________ >>>>> >>>>> Andreas Gravgaard Andersen >>>>> >>>>> Department of Oncology, >>>>> >>>>> Aarhus University Hospital >>>>> >>>>> N?rrebrogade 44, >>>>> >>>>> 8000, Aarhus C >>>>> >>>>> Mail: andreasg at phys.au.dk >>>>> >>>>> Cell: +45 3165 8140 >>>>> >>>>> >>>>> >>>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory >>>>> : >>>>> >>>>>> One suggestion since it works with the Hnd projections: >>>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>>> Xim projections) and output two projection stack files and two geometry >>>>>> files, then compare the projection stack files by subtracting one to the >>>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>>> are identical, then I do not see any reason why the reconstructions should >>>>>> be different, so my guess is that you will find differences. >>>>>> >>>>>> >>>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>>> >>>>>>> Hi, >>>>>>> I have almost never worked with Varian data but it looks like a >>>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>>> projections which results in assigning a bad geometry to each >>>>>>> projection. How did you name your projections? Maybe check that the >>>>>>> order matches that of the RTK geometry file. Otherwise, there might >>>>>>> be >>>>>>> an issue in the creation of the geometry file itself. >>>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>>> code when you feel it's ready. >>>>>>> Simon >>>>>>> >>>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>>> wrote: >>>>>>> >>>>>>>> Dear RTK experts, >>>>>>>> >>>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>>> format. I >>>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>>> available with RTK. >>>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>>> >>>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>>> in UI), >>>>>>>> however when reconstructing with a regular FDK I get a >>>>>>>> reconstructed image >>>>>>>> that is smeared out around the high and low density areas [see >>>>>>>> attached >>>>>>>> image] >>>>>>>> >>>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>>> Scripps >>>>>>>> (~520 projections). Fixed detector and source (offset=0) with >>>>>>>> SID=2m, >>>>>>>> SDD=3m. >>>>>>>> >>>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>>> algorithm). >>>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>>> software works >>>>>>>> perfectly. >>>>>>>> >>>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>>> creates >>>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>>> If the first few projections are excluded, the following projection >>>>>>>> will act >>>>>>>> the same way. >>>>>>>> >>>>>>>> The projections are corrected for beam hardening and all the >>>>>>>> projections >>>>>>>> have the expected attenuation. >>>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>>> reconstruction >>>>>>>> makes the same artifacts. >>>>>>>> >>>>>>>> Setting the value of the first and last projection to zero has the >>>>>>>> same >>>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>>> not the >>>>>>>> artifacts. >>>>>>>> >>>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>>> >>>>>>>> Best regards >>>>>>>> Andreas >>>>>>>> >>>>>>>> __________________________________ >>>>>>>> >>>>>>>> Andreas Gravgaard Andersen >>>>>>>> >>>>>>>> Department of Oncology, >>>>>>>> >>>>>>>> Aarhus University Hospital >>>>>>>> >>>>>>>> N?rrebrogade 44, >>>>>>>> >>>>>>>> 8000, Aarhus C >>>>>>>> >>>>>>>> Mail: andreasg at phys.au.dk >>>>>>>> >>>>>>>> Cell: +45 3165 8140 >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rtk-users mailing list >>>>>>>> Rtk-users at public.kitware.com >>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From w_ettehadi at yahoo.com Tue Nov 1 12:50:12 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Tue, 1 Nov 2016 16:50:12 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> Message-ID: <1400014065.1872614.1478019012480@mail.yahoo.com> Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards,Vahid -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 02:53:39 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 07:53:39 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1400014065.1872614.1478019012480@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> Message-ID: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: > Hello RTK users and developers, > > I already implemented the RTK and reconstructed some images with the > FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. > Now, I am trying to develop a model-based image reconstruction for our > cone-beam micro-CT. I see already that some iterative algorithms like > ART and its modifications and conjugate-gradient (CG) method are > implemented in the RTK. I want to develop a model-based reconstruction > through the Newton/quasi-Newton optimizations methods. I was wondering > is it possible to extract the gradient of least square function from > implemented algorithms like CG module? Any recommendation will be > appreciated. > > Best Regards, > Vahid > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Wed Nov 2 04:01:30 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 08:01:30 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have tried but I am not getting where to give --division 4 in my code. Please find my code given below and please let me know where I need to change in my code to make it work. int _tmain(int argc, _TCHAR* argv[]) { #pragma region "Variable declaration" const double PI = 3.14159265358979323846; float *angles; int nProj = 349; typedef unsigned short pixelType; typedef float OutpixelType; const int dimension = 3; typedef itk::Image imageType; typedef itk::ImageRegionConstIterator ImageIteratorType; imageType::Pointer Projections = imageType::New(); #pragma endregion "Variable declaration" Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); imageType::SpacingType pSpacing; pSpacing[0] = 0.2960; pSpacing[1] = 0.2960; pSpacing[2] = 0.2960; Projections->SetSpacing(pSpacing); imageType::PointType pOrigin; pOrigin[0] = -212.972; pOrigin[1] = -212.972; pOrigin[2] = -212.972; //-158.50; Projections->SetOrigin(pOrigin); Projections->Update(); //Read angles. char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; angles = new float[nProj]; angles = readAngles(angles_file, angles); #pragma region"Geometry" // Geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); for (unsigned int noProj = 0; noProj < nProj; noProj++) { geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // } typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); geometryWriter->SetFilename("D:\\geo.xml"); geometryWriter->SetObject(geometry); geometryWriter->WriteFile(); geometry->Update(); #pragma endregion "Geometry" //Define output image type #ifdef USE_CUDA typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #else typedef itk::Image OutPutImageType; typedef rtk::ParkerShortScanImageFilter PSSFType; typedef rtk::FDKConeBeamReconstructionFilter FDKType; #endif //ScatterCorrection typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); ScatterCorrection->SetInput(Projections); //VarianObiRawImageFilter typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); //Create the output image typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; ConstantImageSourceType::PointType origin_p; ConstantImageSourceType::SizeType size_p; ConstantImageSourceType::SpacingType spacing_p; ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); origin_p[0] = -127.5; origin_p[1] = -127.5; origin_p[2] = -127.5; size_p[0] = 512; size_p[1] = 512; size_p[2] = 512; spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); projectionsSource->SetOrigin(origin_p); projectionsSource->SetSpacing(spacing_p); projectionsSource->SetSize(size_p); projectionsSource->SetConstant(0); // Short scan image filter PSSFType::Pointer pssf = PSSFType::New(); pssf->SetInput(AttenuationFilter->GetOutput()); pssf->SetGeometry(geometry); pssf->InPlaceOff(); std::cout << "short scan image filter success" << std::endl; FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput(0, projectionsSource->GetOutput()); feldkamp->SetInput(1, pssf->GetOutput()); feldkamp->SetGeometry(geometry); feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); feldkamp->GetRampFilter()->SetHammingFrequency(5.0); feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); feldkamp->SetGPUEnabled(1); feldkamp->SetNumberOfThreads(10000); #pragma region "Write volume" //Create a raw io for writing itk::RawImageIO::Pointer io; io = itk::RawImageIO::New(); for (unsigned int i = 0; i < dimension; i++) { io->SetDimensions(i, size_p[i]); io->SetSpacing(i, spacing_p[i]); io->SetOrigin(i, origin_p[i]); } io->SetHeaderSize(0); io->SetByteOrderToLittleEndian(); io->SetPixelType(itk::ImageIOBase::SCALAR); io->SetNumberOfComponents(1); io->SetNumberOfDimensions(3); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(feldkamp->GetOutput()); try { writer->Update(); } catch (itk::ExceptionObject & excp) { std::cerr << "Error while writing the image " << std::endl; std::cerr << excp << std::endl; getchar(); } #pragma endregion "WriteVolume" delete[] angles; return 0; } Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > I was able to perform a reconstruction from your header and geometry > file, using the following command lines: > > rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > --phantomscale "128,128,128" --like Output.mhd > > rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > The first computes projections through a Shepp & Logan phantom, with the > same size, spacing, origin, etc... as your projections, using your > geometry file geo.xml. > > The second line performs the FDK reconstruction. I had to use both the > "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > on a Geforce GTX 780). "--lowmem" loads the projections into memory by > subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > parts, reconstructs them one by one, then assembles the results. Can you > run the same commands and let us know whether you still encounter the > crash you mentioned ? If it works, you can use your own projection data > in the second command line instead of "simulatedprojections.mha". > > Best, > > Cyril > > On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > > Dear Sir, > > > > Please find the Header file in the attachment. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> We do not need the projections file, at least not for a first stage of > >> error tracking. We only need the header. > >> Try the following command line: > >> > >> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >> > >> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >> what we need, and it is a very light text file. The "proj.raw" contains > >> the pixel values, but at the moment we do not need them. We will create > >> our own proj.raw file, filled with zeros, which should be enough to > >> track down the error you encounter. > >> > >> Looking forward to receiving your file, > >> Cyril > >> > >> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>> Dear Sir, > >>> > >>> The single raw file of the projections is 1.4 GB and we are > not > >> able to send this big file to you. Can you please suggest other > alternatives > >> for this? > >>> Or can you provide us the PC configuration to solve the > issue? > >>> > >>> Let me know if any other clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Hello Zahid, > >>>> > >>>> We will need the header of your projections file, too (It is best if > you > >>>> have all your projections as a single .mhd and a single .raw file, so > it > >>>> should be 3-D image, and you send only the .mhd file). > >>>> > >>>> Regards, > >>>> Cyril > >>>> > >>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> > >>>>> I have only used RTK version 1.3.0. but in the error > >>>> message it is showing RTK version 1.2.0. > >>>>> Please find the attachment of the geometry file of > our > >>>> projections. > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> Without some more information, it's unlikely that we find the source > of > >>>>>> the problem. Here are a few things you can do to help us (and > therefore > >>>>>> yourself): > >>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > the > >>>>>> Cuda forward and back projection filters since v1.2.0, so your > problem > >>>>>> might disappear just by upgrading to the new version > >>>>>> - create a small example that reproduces your problem. You can, for > >>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>> example). And send us the script > >>>>>> - OR send us your geometry file and the header of your projections > file > >>>>>> (no need to send the projection data itself, we'll create a > zero-filled > >>>>>> stack of projections), and the command line that crashes > >>>>>> > >>>>>> Best regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Simon Rit, > >>>>>>> > >>>>>>> Please find the screen shot in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> Senior Design Engineer > >>>>>>> Mobile No. +91-9738379729 > >>>>>>> > >>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>> http://www.panaceamedical.com > >>>>>>> Bangalore - India. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>> Cc: rtk-users at public.kitware.com > >> [mailto:rtk-users at public.kitware.com], > >>>>>> saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>> memory > >>>>>>>> error. If you use the command line tool rtkfdk, you should first > make > >>>>>> sure > >>>>>>>> that you use the --lowmem option to stream the projection images. > If > >> it > >>>>>> is > >>>>>>>> no sufficient, you can split your volume using the --divisions. The > >>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of > >> RTK > >>>> on > >>>>>>>> our case studies webpage > >>>>>> . > >>>>>>>> Simon > >>>>>>>> > >>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>> > >>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>> > >>>>>>>>>> I am unable to do 1024x1024x1024 > reconstruction > >>>> using > >>>>>> RTK > >>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > shoot > >> of > >>>>>>>>> the > >>>>>>>>>> same. > >>>>>>>>>> > >>>>>>>>>> I am using the following items given below. > >>>>>>>>>> > >>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >> application > >>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>> 5. CUDA 7. > >>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>> > >>>>>>>>>> Please provide the solution of this and let me > >> know > >>>> if > >>>>>>>> any > >>>>>>>>>> other clarification is required. > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> Thanks & Regards > >>>>>>>>>> > >>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>> Senior Design Engineer > >>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>> > >>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>> Bangalore - India. > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> ____________________________________________________________ > >>>>>>>>> ________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> Rtk-users mailing list > >>>>>>> Rtk-users at public.kitware.com > >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 04:33:32 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 09:33:32 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> References: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Message-ID: <398170fb-a69e-9781-73d5-2a419542d06d@creatis.insa-lyon.fr> Dear Zahid, The --divisions is an option of the command-line application rtkfdk. It is not directly an option of the FDKConeBeamReconstructionFilter : rather, it is passed to a streaming filter at the end of the pipeline. Look for the following bit of code in rtkfdk.cxx : // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput( pfeldkamp ); streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); You can find information on how a streaming filter works on this page: https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html I hope it helps, Cyril On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have tried but I am not getting where to give --division 4 in my code. > > > Please find my code given below and please let me know where I need to change in my code to make it work. > > > int _tmain(int argc, _TCHAR* argv[]) > { > #pragma region "Variable declaration" > const double PI = 3.14159265358979323846; > float *angles; > int nProj = 349; > typedef unsigned short pixelType; > typedef float OutpixelType; > const int dimension = 3; > typedef itk::Image imageType; > typedef itk::ImageRegionConstIterator ImageIteratorType; > imageType::Pointer Projections = imageType::New(); > > #pragma endregion "Variable declaration" > > Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > imageType::SpacingType pSpacing; > pSpacing[0] = 0.2960; > pSpacing[1] = 0.2960; > pSpacing[2] = 0.2960; > Projections->SetSpacing(pSpacing); > > imageType::PointType pOrigin; > pOrigin[0] = -212.972; > pOrigin[1] = -212.972; > pOrigin[2] = -212.972; //-158.50; > Projections->SetOrigin(pOrigin); > > Projections->Update(); > > //Read angles. > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > angles = new float[nProj]; > angles = readAngles(angles_file, angles); > > #pragma region"Geometry" > // Geometry object > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > GeometryType::Pointer geometry = GeometryType::New(); > for (unsigned int noProj = 0; noProj < nProj; noProj++) > { > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // > } > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > geometryWriter->SetFilename("D:\\geo.xml"); > geometryWriter->SetObject(geometry); > geometryWriter->WriteFile(); > geometry->Update(); > #pragma endregion "Geometry" > > //Define output image type > > #ifdef USE_CUDA > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > #else > typedef itk::Image OutPutImageType; > typedef rtk::ParkerShortScanImageFilter PSSFType; > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > #endif > > //ScatterCorrection > typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); > ScatterCorrection->SetInput(Projections); > > //VarianObiRawImageFilter > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; > RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > //Create the output image > typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; > ConstantImageSourceType::PointType origin_p; > ConstantImageSourceType::SizeType size_p; > ConstantImageSourceType::SpacingType spacing_p; > ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); > origin_p[0] = -127.5; > origin_p[1] = -127.5; > origin_p[2] = -127.5; > size_p[0] = 512; > size_p[1] = 512; > size_p[2] = 512; > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > projectionsSource->SetOrigin(origin_p); > projectionsSource->SetSpacing(spacing_p); > projectionsSource->SetSize(size_p); > projectionsSource->SetConstant(0); > > // Short scan image filter > PSSFType::Pointer pssf = PSSFType::New(); > pssf->SetInput(AttenuationFilter->GetOutput()); > pssf->SetGeometry(geometry); > pssf->InPlaceOff(); > std::cout << "short scan image filter success" << std::endl; > > FDKType::Pointer feldkamp = FDKType::New(); > feldkamp->SetInput(0, projectionsSource->GetOutput()); > feldkamp->SetInput(1, pssf->GetOutput()); > feldkamp->SetGeometry(geometry); > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > feldkamp->SetGPUEnabled(1); > feldkamp->SetNumberOfThreads(10000); > > #pragma region "Write volume" > > //Create a raw io for writing > > itk::RawImageIO::Pointer io; > io = itk::RawImageIO::New(); > > for (unsigned int i = 0; i < dimension; i++) > { > io->SetDimensions(i, size_p[i]); > io->SetSpacing(i, spacing_p[i]); > io->SetOrigin(i, origin_p[i]); > } > io->SetHeaderSize(0); > io->SetByteOrderToLittleEndian(); > io->SetPixelType(itk::ImageIOBase::SCALAR); > io->SetNumberOfComponents(1); > io->SetNumberOfDimensions(3); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(feldkamp->GetOutput()); > > try > { > writer->Update(); > } > catch (itk::ExceptionObject & excp) > { > std::cerr << "Error while writing the image " << std::endl; > std::cerr << excp << std::endl; > getchar(); > } > #pragma endregion "WriteVolume" > delete[] angles; > return 0; > } > > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> I was able to perform a reconstruction from your header and geometry >> file, using the following command lines: >> >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> --phantomscale "128,128,128" --like Output.mhd >> >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> >> The first computes projections through a Shepp & Logan phantom, with the >> same size, spacing, origin, etc... as your projections, using your >> geometry file geo.xml. >> >> The second line performs the FDK reconstruction. I had to use both the >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> parts, reconstructs them one by one, then assembles the results. Can you >> run the same commands and let us know whether you still encounter the >> crash you mentioned ? If it works, you can use your own projection data >> in the second command line instead of "simulatedprojections.mha". >> >> Best, >> >> Cyril >> >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> >>> Dear Sir, >>> >>> Please find the Header file in the attachment. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> We do not need the projections file, at least not for a first stage of >>>> error tracking. We only need the header. >>>> Try the following command line: >>>> >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>> >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>> what we need, and it is a very light text file. The "proj.raw" contains >>>> the pixel values, but at the moment we do not need them. We will create >>>> our own proj.raw file, filled with zeros, which should be enough to >>>> track down the error you encounter. >>>> >>>> Looking forward to receiving your file, >>>> Cyril >>>> >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>> Dear Sir, >>>>> >>>>> The single raw file of the projections is 1.4 GB and we are >> not >>>> able to send this big file to you. Can you please suggest other >> alternatives >>>> for this? >>>>> Or can you provide us the PC configuration to solve the >> issue? >>>>> Let me know if any other clarification is required. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Hello Zahid, >>>>>> >>>>>> We will need the header of your projections file, too (It is best if >> you >>>>>> have all your projections as a single .mhd and a single .raw file, so >> it >>>>>> should be 3-D image, and you send only the .mhd file). >>>>>> >>>>>> Regards, >>>>>> Cyril >>>>>> >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>> Dear Cyril Mory, >>>>>>> >>>>>>> >>>>>>> I have only used RTK version 1.3.0. but in the error >>>>>> message it is showing RTK version 1.2.0. >>>>>>> Please find the attachment of the geometry file of >> our >>>>>> projections. >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> Without some more information, it's unlikely that we find the source >> of >>>>>>>> the problem. Here are a few things you can do to help us (and >> therefore >>>>>>>> yourself): >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >> the >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >> problem >>>>>>>> might disappear just by upgrading to the new version >>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>> example). And send us the script >>>>>>>> - OR send us your geometry file and the header of your projections >> file >>>>>>>> (no need to send the projection data itself, we'll create a >> zero-filled >>>>>>>> stack of projections), and the command line that crashes >>>>>>>> >>>>>>>> Best regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Simon Rit, >>>>>>>>> >>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> Senior Design Engineer >>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>> >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>> http://www.panaceamedical.com >>>>>>>>> Bangalore - India. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>> Cc: rtk-users at public.kitware.com >>>> [mailto:rtk-users at public.kitware.com], >>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>> memory >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >> make >>>>>>>> sure >>>>>>>>>> that you use the --lowmem option to stream the projection images. >> If >>>> it >>>>>>>> is >>>>>>>>>> no sufficient, you can split your volume using the --divisions. The >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of >>>> RTK >>>>>> on >>>>>>>>>> our case studies webpage >>>>>>>> . >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>> >>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>> >>>>>>>>>>>> I am unable to do 1024x1024x1024 >> reconstruction >>>>>> using >>>>>>>> RTK >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >> shoot >>>> of >>>>>>>>>>> the >>>>>>>>>>>> same. >>>>>>>>>>>> >>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>> >>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>> application >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>> >>>>>>>>>>>> Please provide the solution of this and let me >>>> know >>>>>> if >>>>>>>>>> any >>>>>>>>>>>> other clarification is required. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>> >>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>> >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>> Bangalore - India. >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>> ________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rtk-users mailing list >>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 06:57:15 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 10:57:15 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. Please check my modified file writer code given below. // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput(feldkamp->GetOutput()); streamerBP->SetNumberOfStreamDivisions(4); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(streamerBP->GetOutput()); writer->SetNumberOfStreamDivisions(4); Please let me know if any clarification is required. Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The --divisions is an option of the command-line application rtkfdk. It > is not directly an option of the FDKConeBeamReconstructionFilter : > rather, it is passed to a streaming filter at the end of the pipeline. > Look for the following bit of code in rtkfdk.cxx : > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter CPUOutputImageType> StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput( pfeldkamp ); > streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > > You can find information on how a streaming filter works on this page: > > https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > I hope it helps, > > Cyril > > On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have tried but I am not getting where to give > --division 4 in my code. > > > > > > Please find my code given below and please let me know > where I need to change in my code to make it work. > > > > > > int _tmain(int argc, _TCHAR* argv[]) > > { > > #pragma region "Variable declaration" > > const double PI = 3.14159265358979323846; > > float *angles; > > int nProj = 349; > > typedef unsigned short pixelType; > > typedef float OutpixelType; > > const int dimension = 3; > > typedef itk::Image imageType; > > typedef itk::ImageRegionConstIterator ImageIteratorType; > > imageType::Pointer Projections = imageType::New(); > > > > #pragma endregion "Variable declaration" > > > > Projections = > ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > > imageType::SpacingType pSpacing; > > pSpacing[0] = 0.2960; > > pSpacing[1] = 0.2960; > > pSpacing[2] = 0.2960; > > Projections->SetSpacing(pSpacing); > > > > imageType::PointType pOrigin; > > pOrigin[0] = -212.972; > > pOrigin[1] = -212.972; > > pOrigin[2] = -212.972; //-158.50; > > Projections->SetOrigin(pOrigin); > > > > Projections->Update(); > > > > //Read angles. > > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > angles = new float[nProj]; > > angles = readAngles(angles_file, angles); > > > > #pragma region"Geometry" > > // Geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > for (unsigned int noProj = 0; noProj < nProj; noProj++) > > { > > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); > // 136 half fan //2.07 Kidwai // > > } > > > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > GeometryWriterType; > > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > > geometryWriter->SetFilename("D:\\geo.xml"); > > geometryWriter->SetObject(geometry); > > geometryWriter->WriteFile(); > > geometry->Update(); > > #pragma endregion "Geometry" > > > > //Define output image type > > > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef itk::Image OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter PSSFType; > > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > > #endif > > > > //ScatterCorrection > > typedef rtk::BoellaardScatterCorrectionImageFilter > BoellaardScatterCorrectionImageFilterType; > > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > BoellaardScatterCorrectionImageFilterType::New(); > > ScatterCorrection->SetInput(Projections); > > > > //VarianObiRawImageFilter > > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > RawImageFilterType; > > RawImageFilterType::Pointer AttenuationFilter = > RawImageFilterType::New(); > > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > > > //Create the output image > > typedef rtk::ConstantImageSource< OutPutImageType > > ConstantImageSourceType; > > ConstantImageSourceType::PointType origin_p; > > ConstantImageSourceType::SizeType size_p; > > ConstantImageSourceType::SpacingType spacing_p; > > ConstantImageSourceType::Pointer projectionsSource = > ConstantImageSourceType::New(); > > origin_p[0] = -127.5; > > origin_p[1] = -127.5; > > origin_p[2] = -127.5; > > size_p[0] = 512; > > size_p[1] = 512; > > size_p[2] = 512; > > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > > > projectionsSource->SetOrigin(origin_p); > > projectionsSource->SetSpacing(spacing_p); > > projectionsSource->SetSize(size_p); > > projectionsSource->SetConstant(0); > > > > // Short scan image filter > > PSSFType::Pointer pssf = PSSFType::New(); > > pssf->SetInput(AttenuationFilter->GetOutput()); > > pssf->SetGeometry(geometry); > > pssf->InPlaceOff(); > > std::cout << "short scan image filter success" << std::endl; > > > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput(0, projectionsSource->GetOutput()); > > feldkamp->SetInput(1, pssf->GetOutput()); > > feldkamp->SetGeometry(geometry); > > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > feldkamp->SetGPUEnabled(1); > > feldkamp->SetNumberOfThreads(10000); > > > > #pragma region "Write volume" > > > > //Create a raw io for writing > > > > itk::RawImageIO::Pointer io; > > io = itk::RawImageIO::New(); > > > > for (unsigned int i = 0; i < dimension; i++) > > { > > io->SetDimensions(i, size_p[i]); > > io->SetSpacing(i, spacing_p[i]); > > io->SetOrigin(i, origin_p[i]); > > } > > io->SetHeaderSize(0); > > io->SetByteOrderToLittleEndian(); > > io->SetPixelType(itk::ImageIOBase::SCALAR); > > io->SetNumberOfComponents(1); > > io->SetNumberOfDimensions(3); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(feldkamp->GetOutput()); > > > > try > > { > > writer->Update(); > > } > > catch (itk::ExceptionObject & excp) > > { > > std::cerr << "Error while writing the image " << std::endl; > > std::cerr << excp << std::endl; > > getchar(); > > } > > #pragma endregion "WriteVolume" > > delete[] angles; > > return 0; > > } > > > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> I was able to perform a reconstruction from your header and geometry > >> file, using the following command lines: > >> > >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >> --phantomscale "128,128,128" --like Output.mhd > >> > >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >> > >> The first computes projections through a Shepp & Logan phantom, with the > >> same size, spacing, origin, etc... as your projections, using your > >> geometry file geo.xml. > >> > >> The second line performs the FDK reconstruction. I had to use both the > >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >> parts, reconstructs them one by one, then assembles the results. Can you > >> run the same commands and let us know whether you still encounter the > >> crash you mentioned ? If it works, you can use your own projection data > >> in the second command line instead of "simulatedprojections.mha". > >> > >> Best, > >> > >> Cyril > >> > >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >> > >>> Dear Sir, > >>> > >>> Please find the Header file in the attachment. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> We do not need the projections file, at least not for a first stage of > >>>> error tracking. We only need the header. > >>>> Try the following command line: > >>>> > >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>> > >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>> what we need, and it is a very light text file. The "proj.raw" contains > >>>> the pixel values, but at the moment we do not need them. We will create > >>>> our own proj.raw file, filled with zeros, which should be enough to > >>>> track down the error you encounter. > >>>> > >>>> Looking forward to receiving your file, > >>>> Cyril > >>>> > >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Sir, > >>>>> > >>>>> The single raw file of the projections is 1.4 GB and we > are > >> not > >>>> able to send this big file to you. Can you please suggest other > >> alternatives > >>>> for this? > >>>>> Or can you provide us the PC configuration to solve the > >> issue? > >>>>> Let me know if any other clarification is required. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Hello Zahid, > >>>>>> > >>>>>> We will need the header of your projections file, too (It is best if > >> you > >>>>>> have all your projections as a single .mhd and a single .raw file, so > >> it > >>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>> > >>>>>> Regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Cyril Mory, > >>>>>>> > >>>>>>> > >>>>>>> I have only used RTK version 1.3.0. but in the > error > >>>>>> message it is showing RTK version 1.2.0. > >>>>>>> Please find the attachment of the geometry file > of > >> our > >>>>>> projections. > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> Without some more information, it's unlikely that we find the > source > >> of > >>>>>>>> the problem. Here are a few things you can do to help us (and > >> therefore > >>>>>>>> yourself): > >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > >> the > >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >> problem > >>>>>>>> might disappear just by upgrading to the new version > >>>>>>>> - create a small example that reproduces your problem. You can, for > >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>> example). And send us the script > >>>>>>>> - OR send us your geometry file and the header of your projections > >> file > >>>>>>>> (no need to send the projection data itself, we'll create a > >> zero-filled > >>>>>>>> stack of projections), and the command line that crashes > >>>>>>>> > >>>>>>>> Best regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Simon Rit, > >>>>>>>>> > >>>>>>>>> Please find the screen shot in the attachment. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> Senior Design Engineer > >>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>> > >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>> http://www.panaceamedical.com > >>>>>>>>> Bangalore - India. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>> Cc: rtk-users at public.kitware.com > >>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>>>> memory > >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first > >> make > >>>>>>>> sure > >>>>>>>>>> that you use the --lowmem option to stream the projection images. > >> If > >>>> it > >>>>>>>> is > >>>>>>>>>> no sufficient, you can split your volume using the --divisions. > The > >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > of > >>>> RTK > >>>>>> on > >>>>>>>>>> our case studies webpage > >>>>>>>> . > >>>>>>>>>> Simon > >>>>>>>>>> > >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>> > >>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>> > >>>>>>>>>>>> I am unable to do 1024x1024x1024 > >> reconstruction > >>>>>> using > >>>>>>>> RTK > >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >> shoot > >>>> of > >>>>>>>>>>> the > >>>>>>>>>>>> same. > >>>>>>>>>>>> > >>>>>>>>>>>> I am using the following items given below. > >>>>>>>>>>>> > >>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>> application > >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>> > >>>>>>>>>>>> Please provide the solution of this and let > me > >>>> know > >>>>>> if > >>>>>>>>>> any > >>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>> > >>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>> > >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>> ________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 08:27:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 13:27:18 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> References: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Message-ID: <84154ed0-3cb8-abf7-c253-3162d78bf7b7@creatis.insa-lyon.fr> I see two errors: Remove this line writer->SetNumberOfStreamDivisions(4); since only the streaming filter, not the write filter, needs to know about the number of divisions. And change the filename to "D:\\Output.mhd" It will write both the .mhd and the .raw files. I hope it helps, Cyril On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. > > Please check my modified file writer code given below. > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput(feldkamp->GetOutput()); > streamerBP->SetNumberOfStreamDivisions(4); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(streamerBP->GetOutput()); > writer->SetNumberOfStreamDivisions(4); > > > Please let me know if any clarification is required. > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> The --divisions is an option of the command-line application rtkfdk. It >> is not directly an option of the FDKConeBeamReconstructionFilter : >> rather, it is passed to a streaming filter at the end of the pipeline. >> Look for the following bit of code in rtkfdk.cxx : >> >> // Streaming depending on streaming capability of writer >> typedef itk::StreamingImageFilter> CPUOutputImageType> StreamerType; >> StreamerType::Pointer streamerBP = StreamerType::New(); >> streamerBP->SetInput( pfeldkamp ); >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >> >> You can find information on how a streaming filter works on this page: >> >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> >> I hope it helps, >> >> Cyril >> >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have tried but I am not getting where to give >> --division 4 in my code. >>> >>> Please find my code given below and please let me know >> where I need to change in my code to make it work. >>> >>> int _tmain(int argc, _TCHAR* argv[]) >>> { >>> #pragma region "Variable declaration" >>> const double PI = 3.14159265358979323846; >>> float *angles; >>> int nProj = 349; >>> typedef unsigned short pixelType; >>> typedef float OutpixelType; >>> const int dimension = 3; >>> typedef itk::Image imageType; >>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>> imageType::Pointer Projections = imageType::New(); >>> >>> #pragma endregion "Variable declaration" >>> >>> Projections = >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); >>> imageType::SpacingType pSpacing; >>> pSpacing[0] = 0.2960; >>> pSpacing[1] = 0.2960; >>> pSpacing[2] = 0.2960; >>> Projections->SetSpacing(pSpacing); >>> >>> imageType::PointType pOrigin; >>> pOrigin[0] = -212.972; >>> pOrigin[1] = -212.972; >>> pOrigin[2] = -212.972; //-158.50; >>> Projections->SetOrigin(pOrigin); >>> >>> Projections->Update(); >>> >>> //Read angles. >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>> angles = new float[nProj]; >>> angles = readAngles(angles_file, angles); >>> >>> #pragma region"Geometry" >>> // Geometry object >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> GeometryType::Pointer geometry = GeometryType::New(); >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>> { >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); >> // 136 half fan //2.07 Kidwai // >>> } >>> >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> GeometryWriterType; >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>> geometryWriter->SetFilename("D:\\geo.xml"); >>> geometryWriter->SetObject(geometry); >>> geometryWriter->WriteFile(); >>> geometry->Update(); >>> #pragma endregion "Geometry" >>> >>> //Define output image type >>> >>> #ifdef USE_CUDA >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> #else >>> typedef itk::Image OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>> #endif >>> >>> //ScatterCorrection >>> typedef rtk::BoellaardScatterCorrectionImageFilter >> BoellaardScatterCorrectionImageFilterType; >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >> BoellaardScatterCorrectionImageFilterType::New(); >>> ScatterCorrection->SetInput(Projections); >>> >>> //VarianObiRawImageFilter >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> RawImageFilterType; >>> RawImageFilterType::Pointer AttenuationFilter = >> RawImageFilterType::New(); >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>> >>> //Create the output image >>> typedef rtk::ConstantImageSource< OutPutImageType > >> ConstantImageSourceType; >>> ConstantImageSourceType::PointType origin_p; >>> ConstantImageSourceType::SizeType size_p; >>> ConstantImageSourceType::SpacingType spacing_p; >>> ConstantImageSourceType::Pointer projectionsSource = >> ConstantImageSourceType::New(); >>> origin_p[0] = -127.5; >>> origin_p[1] = -127.5; >>> origin_p[2] = -127.5; >>> size_p[0] = 512; >>> size_p[1] = 512; >>> size_p[2] = 512; >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>> >>> projectionsSource->SetOrigin(origin_p); >>> projectionsSource->SetSpacing(spacing_p); >>> projectionsSource->SetSize(size_p); >>> projectionsSource->SetConstant(0); >>> >>> // Short scan image filter >>> PSSFType::Pointer pssf = PSSFType::New(); >>> pssf->SetInput(AttenuationFilter->GetOutput()); >>> pssf->SetGeometry(geometry); >>> pssf->InPlaceOff(); >>> std::cout << "short scan image filter success" << std::endl; >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>> feldkamp->SetInput(1, pssf->GetOutput()); >>> feldkamp->SetGeometry(geometry); >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>> feldkamp->SetGPUEnabled(1); >>> feldkamp->SetNumberOfThreads(10000); >>> >>> #pragma region "Write volume" >>> >>> //Create a raw io for writing >>> >>> itk::RawImageIO::Pointer io; >>> io = itk::RawImageIO::New(); >>> >>> for (unsigned int i = 0; i < dimension; i++) >>> { >>> io->SetDimensions(i, size_p[i]); >>> io->SetSpacing(i, spacing_p[i]); >>> io->SetOrigin(i, origin_p[i]); >>> } >>> io->SetHeaderSize(0); >>> io->SetByteOrderToLittleEndian(); >>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>> io->SetNumberOfComponents(1); >>> io->SetNumberOfDimensions(3); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(feldkamp->GetOutput()); >>> >>> try >>> { >>> writer->Update(); >>> } >>> catch (itk::ExceptionObject & excp) >>> { >>> std::cerr << "Error while writing the image " << std::endl; >>> std::cerr << excp << std::endl; >>> getchar(); >>> } >>> #pragma endregion "WriteVolume" >>> delete[] angles; >>> return 0; >>> } >>> >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> I was able to perform a reconstruction from your header and geometry >>>> file, using the following command lines: >>>> >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>> --phantomscale "128,128,128" --like Output.mhd >>>> >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>> >>>> The first computes projections through a Shepp & Logan phantom, with the >>>> same size, spacing, origin, etc... as your projections, using your >>>> geometry file geo.xml. >>>> >>>> The second line performs the FDK reconstruction. I had to use both the >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>> parts, reconstructs them one by one, then assembles the results. Can you >>>> run the same commands and let us know whether you still encounter the >>>> crash you mentioned ? If it works, you can use your own projection data >>>> in the second command line instead of "simulatedprojections.mha". >>>> >>>> Best, >>>> >>>> Cyril >>>> >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>> >>>>> Dear Sir, >>>>> >>>>> Please find the Header file in the attachment. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> We do not need the projections file, at least not for a first stage of >>>>>> error tracking. We only need the header. >>>>>> Try the following command line: >>>>>> >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>> >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>> what we need, and it is a very light text file. The "proj.raw" contains >>>>>> the pixel values, but at the moment we do not need them. We will create >>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>> track down the error you encounter. >>>>>> >>>>>> Looking forward to receiving your file, >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>> Dear Sir, >>>>>>> >>>>>>> The single raw file of the projections is 1.4 GB and we >> are >>>> not >>>>>> able to send this big file to you. Can you please suggest other >>>> alternatives >>>>>> for this? >>>>>>> Or can you provide us the PC configuration to solve the >>>> issue? >>>>>>> Let me know if any other clarification is required. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Hello Zahid, >>>>>>>> >>>>>>>> We will need the header of your projections file, too (It is best if >>>> you >>>>>>>> have all your projections as a single .mhd and a single .raw file, so >>>> it >>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>> >>>>>>>> Regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Cyril Mory, >>>>>>>>> >>>>>>>>> >>>>>>>>> I have only used RTK version 1.3.0. but in the >> error >>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>> Please find the attachment of the geometry file >> of >>>> our >>>>>>>> projections. >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> >>>>>>>>>> Without some more information, it's unlikely that we find the >> source >>>> of >>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>> therefore >>>>>>>>>> yourself): >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >>>> the >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>> problem >>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>> example). And send us the script >>>>>>>>>> - OR send us your geometry file and the header of your projections >>>> file >>>>>>>>>> (no need to send the projection data itself, we'll create a >>>> zero-filled >>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>> >>>>>>>>>> Best regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>> >>>>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> Senior Design Engineer >>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>> >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>> Bangalore - India. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>>>> memory >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >>>> make >>>>>>>>>> sure >>>>>>>>>>>> that you use the --lowmem option to stream the projection images. >>>> If >>>>>> it >>>>>>>>>> is >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >> The >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >> of >>>>>> RTK >>>>>>>> on >>>>>>>>>>>> our case studies webpage >>>>>>>>>> . >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>> reconstruction >>>>>>>> using >>>>>>>>>> RTK >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>> shoot >>>>>> of >>>>>>>>>>>>> the >>>>>>>>>>>>>> same. >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>>>> >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>> application >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Please provide the solution of this and let >> me >>>>>> know >>>>>>>> if >>>>>>>>>>>> any >>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>> >>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>> >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url >> : >>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>> ________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>> >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>>>> >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 09:37:23 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 13:37:23 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. Please suggest us for further process. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > I see two errors: > > Remove this line > > writer->SetNumberOfStreamDivisions(4); > > since only the streaming filter, not the write filter, needs to know > about the number of divisions. > And change the filename to > > "D:\\Output.mhd" > > It will write both the .mhd and the .raw files. > > I hope it helps, > Cyril > > On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have modified my file writer code and used > StreamingImageFilter. Now its not giving any error message but the final > output is 0 byte for 1024 volume. It working fine for 512 volume. > > > > Please check my modified file writer code given below. > > > > // Streaming depending on streaming capability of writer > > typedef itk::StreamingImageFilter > StreamerType; > > StreamerType::Pointer streamerBP = StreamerType::New(); > > streamerBP->SetInput(feldkamp->GetOutput()); > > streamerBP->SetNumberOfStreamDivisions(4); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(streamerBP->GetOutput()); > > writer->SetNumberOfStreamDivisions(4); > > > > > > Please let me know if any clarification is required. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> The --divisions is an option of the command-line application rtkfdk. It > >> is not directly an option of the FDKConeBeamReconstructionFilter : > >> rather, it is passed to a streaming filter at the end of the pipeline. > >> Look for the following bit of code in rtkfdk.cxx : > >> > >> // Streaming depending on streaming capability of writer > >> typedef itk::StreamingImageFilter >> CPUOutputImageType> StreamerType; > >> StreamerType::Pointer streamerBP = StreamerType::New(); > >> streamerBP->SetInput( pfeldkamp ); > >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >> > >> You can find information on how a streaming filter works on this page: > >> > >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >> > >> I hope it helps, > >> > >> Cyril > >> > >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have tried but I am not getting where to give > >> --division 4 in my code. > >>> > >>> Please find my code given below and please let me know > >> where I need to change in my code to make it work. > >>> > >>> int _tmain(int argc, _TCHAR* argv[]) > >>> { > >>> #pragma region "Variable declaration" > >>> const double PI = 3.14159265358979323846; > >>> float *angles; > >>> int nProj = 349; > >>> typedef unsigned short pixelType; > >>> typedef float OutpixelType; > >>> const int dimension = 3; > >>> typedef itk::Image imageType; > >>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>> imageType::Pointer Projections = imageType::New(); > >>> > >>> #pragma endregion "Variable declaration" > >>> > >>> Projections = > >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > nProj); > >>> imageType::SpacingType pSpacing; > >>> pSpacing[0] = 0.2960; > >>> pSpacing[1] = 0.2960; > >>> pSpacing[2] = 0.2960; > >>> Projections->SetSpacing(pSpacing); > >>> > >>> imageType::PointType pOrigin; > >>> pOrigin[0] = -212.972; > >>> pOrigin[1] = -212.972; > >>> pOrigin[2] = -212.972; //-158.50; > >>> Projections->SetOrigin(pOrigin); > >>> > >>> Projections->Update(); > >>> > >>> //Read angles. > >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>> angles = new float[nProj]; > >>> angles = readAngles(angles_file, angles); > >>> > >>> #pragma region"Geometry" > >>> // Geometry object > >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>> GeometryType::Pointer geometry = GeometryType::New(); > >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>> { > >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > 0); > >> // 136 half fan //2.07 Kidwai // > >>> } > >>> > >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >> GeometryWriterType; > >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > >>> geometryWriter->SetFilename("D:\\geo.xml"); > >>> geometryWriter->SetObject(geometry); > >>> geometryWriter->WriteFile(); > >>> geometry->Update(); > >>> #pragma endregion "Geometry" > >>> > >>> //Define output image type > >>> > >>> #ifdef USE_CUDA > >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>> #else > >>> typedef itk::Image OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; > >>> #endif > >>> > >>> //ScatterCorrection > >>> typedef rtk::BoellaardScatterCorrectionImageFilter > > >> BoellaardScatterCorrectionImageFilterType; > >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > >> BoellaardScatterCorrectionImageFilterType::New(); > >>> ScatterCorrection->SetInput(Projections); > >>> > >>> //VarianObiRawImageFilter > >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >> RawImageFilterType; > >>> RawImageFilterType::Pointer AttenuationFilter = > >> RawImageFilterType::New(); > >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>> > >>> //Create the output image > >>> typedef rtk::ConstantImageSource< OutPutImageType > > >> ConstantImageSourceType; > >>> ConstantImageSourceType::PointType origin_p; > >>> ConstantImageSourceType::SizeType size_p; > >>> ConstantImageSourceType::SpacingType spacing_p; > >>> ConstantImageSourceType::Pointer projectionsSource = > >> ConstantImageSourceType::New(); > >>> origin_p[0] = -127.5; > >>> origin_p[1] = -127.5; > >>> origin_p[2] = -127.5; > >>> size_p[0] = 512; > >>> size_p[1] = 512; > >>> size_p[2] = 512; > >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>> > >>> projectionsSource->SetOrigin(origin_p); > >>> projectionsSource->SetSpacing(spacing_p); > >>> projectionsSource->SetSize(size_p); > >>> projectionsSource->SetConstant(0); > >>> > >>> // Short scan image filter > >>> PSSFType::Pointer pssf = PSSFType::New(); > >>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>> pssf->SetGeometry(geometry); > >>> pssf->InPlaceOff(); > >>> std::cout << "short scan image filter success" << std::endl; > >>> > >>> FDKType::Pointer feldkamp = FDKType::New(); > >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>> feldkamp->SetInput(1, pssf->GetOutput()); > >>> feldkamp->SetGeometry(geometry); > >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>> feldkamp->SetGPUEnabled(1); > >>> feldkamp->SetNumberOfThreads(10000); > >>> > >>> #pragma region "Write volume" > >>> > >>> //Create a raw io for writing > >>> > >>> itk::RawImageIO::Pointer io; > >>> io = itk::RawImageIO::New(); > >>> > >>> for (unsigned int i = 0; i < dimension; i++) > >>> { > >>> io->SetDimensions(i, size_p[i]); > >>> io->SetSpacing(i, spacing_p[i]); > >>> io->SetOrigin(i, origin_p[i]); > >>> } > >>> io->SetHeaderSize(0); > >>> io->SetByteOrderToLittleEndian(); > >>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>> io->SetNumberOfComponents(1); > >>> io->SetNumberOfDimensions(3); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(feldkamp->GetOutput()); > >>> > >>> try > >>> { > >>> writer->Update(); > >>> } > >>> catch (itk::ExceptionObject & excp) > >>> { > >>> std::cerr << "Error while writing the image " << std::endl; > >>> std::cerr << excp << std::endl; > >>> getchar(); > >>> } > >>> #pragma endregion "WriteVolume" > >>> delete[] angles; > >>> return 0; > >>> } > >>> > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> I was able to perform a reconstruction from your header and geometry > >>>> file, using the following command lines: > >>>> > >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>> --phantomscale "128,128,128" --like Output.mhd > >>>> > >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > --hardware > >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>> > >>>> The first computes projections through a Shepp & Logan phantom, with > the > >>>> same size, spacing, origin, etc... as your projections, using your > >>>> geometry file geo.xml. > >>>> > >>>> The second line performs the FDK reconstruction. I had to use both the > >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>> parts, reconstructs them one by one, then assembles the results. Can > you > >>>> run the same commands and let us know whether you still encounter the > >>>> crash you mentioned ? If it works, you can use your own projection data > >>>> in the second command line instead of "simulatedprojections.mha". > >>>> > >>>> Best, > >>>> > >>>> Cyril > >>>> > >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>> > >>>>> Dear Sir, > >>>>> > >>>>> Please find the Header file in the attachment. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> We do not need the projections file, at least not for a first stage > of > >>>>>> error tracking. We only need the header. > >>>>>> Try the following command line: > >>>>>> > >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>> > >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>>>> what we need, and it is a very light text file. The "proj.raw" > contains > >>>>>> the pixel values, but at the moment we do not need them. We will > create > >>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>> track down the error you encounter. > >>>>>> > >>>>>> Looking forward to receiving your file, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> The single raw file of the projections is 1.4 GB and > we > >> are > >>>> not > >>>>>> able to send this big file to you. Can you please suggest other > >>>> alternatives > >>>>>> for this? > >>>>>>> Or can you provide us the PC configuration to solve > the > >>>> issue? > >>>>>>> Let me know if any other clarification is required. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Hello Zahid, > >>>>>>>> > >>>>>>>> We will need the header of your projections file, too (It is best > if > >>>> you > >>>>>>>> have all your projections as a single .mhd and a single .raw file, > so > >>>> it > >>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>> > >>>>>>>> Regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Cyril Mory, > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> I have only used RTK version 1.3.0. but in the > >> error > >>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>> Please find the attachment of the geometry > file > >> of > >>>> our > >>>>>>>> projections. > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> > >>>>>>>>>> Without some more information, it's unlikely that we find the > >> source > >>>> of > >>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>> therefore > >>>>>>>>>> yourself): > >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes > in > >>>> the > >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>> problem > >>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>> - create a small example that reproduces your problem. You can, > for > >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > logan > >>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>>>> example). And send us the script > >>>>>>>>>> - OR send us your geometry file and the header of your > projections > >>>> file > >>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>> zero-filled > >>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>> > >>>>>>>>>> Best regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>> > >>>>>>>>>>> Please find the screen shot in the > attachment. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>> > >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > CUDA > >>>>>>>> memory > >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > first > >>>> make > >>>>>>>>>> sure > >>>>>>>>>>>> that you use the --lowmem option to stream the projection > images. > >>>> If > >>>>>> it > >>>>>>>>>> is > >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. > >> The > >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > >> of > >>>>>> RTK > >>>>>>>> on > >>>>>>>>>>>> our case studies webpage > >>>>>>>>>> . > >>>>>>>>>>>> Simon > >>>>>>>>>>>> > >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>> reconstruction > >>>>>>>> using > >>>>>>>>>> RTK > >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >>>> shoot > >>>>>> of > >>>>>>>>>>>>> the > >>>>>>>>>>>>>> same. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am using the following items given > below. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>>>> application > >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Please provide the solution of this and > let > >> me > >>>>>> know > >>>>>>>> if > >>>>>>>>>>>> any > >>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, > >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > >> : > >>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>> ________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>> > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: RTK_Error.png Type: image/png Size: 57211 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 10:00:50 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 15:00:50 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> References: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Message-ID: <94e0045d-ef88-726d-9b7b-8b5ebf5ac067@creatis.insa-lyon.fr> Dear Zahid, The output looks correct. If the command line solution I suggested in a previous email works, the best way to move forward would be to compare your code and that of rtkfdk.cxx, and where it differs, make sure you have not introduced an error. Cyril On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. > > Please suggest us for further process. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> I see two errors: >> >> Remove this line >> >> writer->SetNumberOfStreamDivisions(4); >> >> since only the streaming filter, not the write filter, needs to know >> about the number of divisions. >> And change the filename to >> >> "D:\\Output.mhd" >> >> It will write both the .mhd and the .raw files. >> >> I hope it helps, >> Cyril >> >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have modified my file writer code and used >> StreamingImageFilter. Now its not giving any error message but the final >> output is 0 byte for 1024 volume. It working fine for 512 volume. >>> Please check my modified file writer code given below. >>> >>> // Streaming depending on streaming capability of writer >>> typedef itk::StreamingImageFilter >> StreamerType; >>> StreamerType::Pointer streamerBP = StreamerType::New(); >>> streamerBP->SetInput(feldkamp->GetOutput()); >>> streamerBP->SetNumberOfStreamDivisions(4); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(streamerBP->GetOutput()); >>> writer->SetNumberOfStreamDivisions(4); >>> >>> >>> Please let me know if any clarification is required. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> The --divisions is an option of the command-line application rtkfdk. It >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >>>> rather, it is passed to a streaming filter at the end of the pipeline. >>>> Look for the following bit of code in rtkfdk.cxx : >>>> >>>> // Streaming depending on streaming capability of writer >>>> typedef itk::StreamingImageFilter>>> CPUOutputImageType> StreamerType; >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >>>> streamerBP->SetInput( pfeldkamp ); >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >>>> >>>> You can find information on how a streaming filter works on this page: >>>> >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >>>> >>>> I hope it helps, >>>> >>>> Cyril >>>> >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>>>> Dear Cyril Mory, >>>>> >>>>> I have tried but I am not getting where to give >>>> --division 4 in my code. >>>>> Please find my code given below and please let me know >>>> where I need to change in my code to make it work. >>>>> int _tmain(int argc, _TCHAR* argv[]) >>>>> { >>>>> #pragma region "Variable declaration" >>>>> const double PI = 3.14159265358979323846; >>>>> float *angles; >>>>> int nProj = 349; >>>>> typedef unsigned short pixelType; >>>>> typedef float OutpixelType; >>>>> const int dimension = 3; >>>>> typedef itk::Image imageType; >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>>>> imageType::Pointer Projections = imageType::New(); >>>>> >>>>> #pragma endregion "Variable declaration" >>>>> >>>>> Projections = >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> nProj); >>>>> imageType::SpacingType pSpacing; >>>>> pSpacing[0] = 0.2960; >>>>> pSpacing[1] = 0.2960; >>>>> pSpacing[2] = 0.2960; >>>>> Projections->SetSpacing(pSpacing); >>>>> >>>>> imageType::PointType pOrigin; >>>>> pOrigin[0] = -212.972; >>>>> pOrigin[1] = -212.972; >>>>> pOrigin[2] = -212.972; //-158.50; >>>>> Projections->SetOrigin(pOrigin); >>>>> >>>>> Projections->Update(); >>>>> >>>>> //Read angles. >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>>>> angles = new float[nProj]; >>>>> angles = readAngles(angles_file, angles); >>>>> >>>>> #pragma region"Geometry" >>>>> // Geometry object >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>>>> { >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, >> 0); >>>> // 136 half fan //2.07 Kidwai // >>>>> } >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >>>> GeometryWriterType; >>>>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >>>>> geometryWriter->SetObject(geometry); >>>>> geometryWriter->WriteFile(); >>>>> geometry->Update(); >>>>> #pragma endregion "Geometry" >>>>> >>>>> //Define output image type >>>>> >>>>> #ifdef USE_CUDA >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> #else >>>>> typedef itk::Image OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>>>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>>>> #endif >>>>> >>>>> //ScatterCorrection >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter>>> BoellaardScatterCorrectionImageFilterType; >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >>>> BoellaardScatterCorrectionImageFilterType::New(); >>>>> ScatterCorrection->SetInput(Projections); >>>>> >>>>> //VarianObiRawImageFilter >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >>>> RawImageFilterType; >>>>> RawImageFilterType::Pointer AttenuationFilter = >>>> RawImageFilterType::New(); >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>>>> >>>>> //Create the output image >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >>>> ConstantImageSourceType; >>>>> ConstantImageSourceType::PointType origin_p; >>>>> ConstantImageSourceType::SizeType size_p; >>>>> ConstantImageSourceType::SpacingType spacing_p; >>>>> ConstantImageSourceType::Pointer projectionsSource = >>>> ConstantImageSourceType::New(); >>>>> origin_p[0] = -127.5; >>>>> origin_p[1] = -127.5; >>>>> origin_p[2] = -127.5; >>>>> size_p[0] = 512; >>>>> size_p[1] = 512; >>>>> size_p[2] = 512; >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>>>> >>>>> projectionsSource->SetOrigin(origin_p); >>>>> projectionsSource->SetSpacing(spacing_p); >>>>> projectionsSource->SetSize(size_p); >>>>> projectionsSource->SetConstant(0); >>>>> >>>>> // Short scan image filter >>>>> PSSFType::Pointer pssf = PSSFType::New(); >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >>>>> pssf->SetGeometry(geometry); >>>>> pssf->InPlaceOff(); >>>>> std::cout << "short scan image filter success" << std::endl; >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >>>>> feldkamp->SetGeometry(geometry); >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>>>> feldkamp->SetGPUEnabled(1); >>>>> feldkamp->SetNumberOfThreads(10000); >>>>> >>>>> #pragma region "Write volume" >>>>> >>>>> //Create a raw io for writing >>>>> >>>>> itk::RawImageIO::Pointer io; >>>>> io = itk::RawImageIO::New(); >>>>> >>>>> for (unsigned int i = 0; i < dimension; i++) >>>>> { >>>>> io->SetDimensions(i, size_p[i]); >>>>> io->SetSpacing(i, spacing_p[i]); >>>>> io->SetOrigin(i, origin_p[i]); >>>>> } >>>>> io->SetHeaderSize(0); >>>>> io->SetByteOrderToLittleEndian(); >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>>>> io->SetNumberOfComponents(1); >>>>> io->SetNumberOfDimensions(3); >>>>> >>>>> //create a writer and write reconstructed file >>>>> itk::ImageFileWriter::Pointer writer; >>>>> writer = itk::ImageFileWriter::New(); >>>>> writer->SetFileName("D:\\Output.raw"); >>>>> writer->SetImageIO(io); >>>>> writer->SetInput(feldkamp->GetOutput()); >>>>> >>>>> try >>>>> { >>>>> writer->Update(); >>>>> } >>>>> catch (itk::ExceptionObject & excp) >>>>> { >>>>> std::cerr << "Error while writing the image " << std::endl; >>>>> std::cerr << excp << std::endl; >>>>> getchar(); >>>>> } >>>>> #pragma endregion "WriteVolume" >>>>> delete[] angles; >>>>> return 0; >>>>> } >>>>> >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> Senior Design Engineer >>>>> Mobile No. +91-9738379729 >>>>> >>>>> Panacea Medical Technologies Pvt. Ltd. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>> http://www.panaceamedical.com >>>>> Bangalore - India. >>>>> >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> I was able to perform a reconstruction from your header and geometry >>>>>> file, using the following command lines: >>>>>> >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>>>> --phantomscale "128,128,128" --like Output.mhd >>>>>> >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> --hardware >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>>>> >>>>>> The first computes projections through a Shepp & Logan phantom, with >> the >>>>>> same size, spacing, origin, etc... as your projections, using your >>>>>> geometry file geo.xml. >>>>>> >>>>>> The second line performs the FDK reconstruction. I had to use both the >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>>>> parts, reconstructs them one by one, then assembles the results. Can >> you >>>>>> run the same commands and let us know whether you still encounter the >>>>>> crash you mentioned ? If it works, you can use your own projection data >>>>>> in the second command line instead of "simulatedprojections.mha". >>>>>> >>>>>> Best, >>>>>> >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>>>> >>>>>>> Dear Sir, >>>>>>> >>>>>>> Please find the Header file in the attachment. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> We do not need the projections file, at least not for a first stage >> of >>>>>>>> error tracking. We only need the header. >>>>>>>> Try the following command line: >>>>>>>> >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>>>> >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> contains >>>>>>>> the pixel values, but at the moment we do not need them. We will >> create >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>>>> track down the error you encounter. >>>>>>>> >>>>>>>> Looking forward to receiving your file, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Sir, >>>>>>>>> >>>>>>>>> The single raw file of the projections is 1.4 GB and >> we >>>> are >>>>>> not >>>>>>>> able to send this big file to you. Can you please suggest other >>>>>> alternatives >>>>>>>> for this? >>>>>>>>> Or can you provide us the PC configuration to solve >> the >>>>>> issue? >>>>>>>>> Let me know if any other clarification is required. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Hello Zahid, >>>>>>>>>> >>>>>>>>>> We will need the header of your projections file, too (It is best >> if >>>>>> you >>>>>>>>>> have all your projections as a single .mhd and a single .raw file, >> so >>>>>> it >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Cyril Mory, >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I have only used RTK version 1.3.0. but in the >>>> error >>>>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>>>> Please find the attachment of the geometry >> file >>>> of >>>>>> our >>>>>>>>>> projections. >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >>>> Simon >>>>>>>> Rit >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> >>>>>>>>>>>> Without some more information, it's unlikely that we find the >>>> source >>>>>> of >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>>>> therefore >>>>>>>>>>>> yourself): >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes >> in >>>>>> the >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>>>> problem >>>>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>>>> - create a small example that reproduces your problem. You can, >> for >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> logan >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>>>> example). And send us the script >>>>>>>>>>>> - OR send us your geometry file and the header of your >> projections >>>>>> file >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >>>>>> zero-filled >>>>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>>>> >>>>>>>>>>>> Best regards, >>>>>>>>>>>> Cyril >>>>>>>>>>>> >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>>>> >>>>>>>>>>>>> Please find the screen shot in the >> attachment. >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>> >>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>> >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a >> CUDA >>>>>>>>>> memory >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> first >>>>>> make >>>>>>>>>>>> sure >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> images. >>>>>> If >>>>>>>> it >>>>>>>>>>>> is >>>>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >>>> The >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >>>> of >>>>>>>> RTK >>>>>>>>>> on >>>>>>>>>>>>>> our case studies webpage >>>>>>>>>>>> . >>>>>>>>>>>>>> Simon >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>>>> reconstruction >>>>>>>>>> using >>>>>>>>>>>> RTK >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>>>> shoot >>>>>>>> of >>>>>>>>>>>>>>> the >>>>>>>>>>>>>>>> same. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am using the following items given >> below. >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>>>> application >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Please provide the solution of this and >> let >>>> me >>>>>>>> know >>>>>>>>>> if >>>>>>>>>>>>>> any >>>>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >>>> : >>>>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>>>> ________________ >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> This email and any files transmitted with it are confidential >>>> and >>>>>>>>>>>> intended >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >>>>>>>>>>>> addressed. >>>>>>>>>>>>>>> If you have received this email in error please notify the >>>> system >>>>>>>>>>>> manager. >>>>>>>>>>>>>>> Please note that any views or opinions presented in this email >>>> are >>>>>>>>>>>> solely >>>>>>>>>>>>>>> those of the author and do not necessarily represent those of >>>> the >>>>>>>>>>>> company. >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >>>> attachments >>>>>>>> for >>>>>>>>>>>> the >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>>>> damage >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>>>> >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >>> >>> >> >> > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Wed Nov 2 22:38:38 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 02:38:38 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Message-ID: <24189134.77160.1478140718379@mail.yahoo.com> Hello Simon and Cyril,Thanks for the reply.You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do.Thanks again for the reply. @Cyril:Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards,Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 02:05:51 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 06:05:51 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103060551.f7bfa0c3@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, Thank you for your help. We are able to reconstruct 1024 volume now. But the reconstruction time is around 4 minutes. Can you please help us to reduce the reconstruction time? We are using NVIDIA TITAN X GPU which has 12 GB memory. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The output looks correct. > > If the command line solution I suggested in a previous email works, the > best way to move forward would be to compare your code and that of > rtkfdk.cxx, and where it differs, make sure you have not introduced an > error. > > Cyril > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have done the same but the Output.mhd file is still 0 > KB for 1024 volume. Please find the attachment of the status of the output > displayed. > > > > Please suggest us for further process. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> I see two errors: > >> > >> Remove this line > >> > >> writer->SetNumberOfStreamDivisions(4); > >> > >> since only the streaming filter, not the write filter, needs to know > >> about the number of divisions. > >> And change the filename to > >> > >> "D:\\Output.mhd" > >> > >> It will write both the .mhd and the .raw files. > >> > >> I hope it helps, > >> Cyril > >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have modified my file writer code and used > >> StreamingImageFilter. Now its not giving any error message but the final > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > >>> Please check my modified file writer code given below. > >>> > >>> // Streaming depending on streaming capability of writer > >>> typedef itk::StreamingImageFilter > >> StreamerType; > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>> streamerBP->SetInput(feldkamp->GetOutput()); > >>> streamerBP->SetNumberOfStreamDivisions(4); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(streamerBP->GetOutput()); > >>> writer->SetNumberOfStreamDivisions(4); > >>> > >>> > >>> Please let me know if any clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> The --divisions is an option of the command-line application rtkfdk. It > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > >>>> rather, it is passed to a streaming filter at the end of the pipeline. > >>>> Look for the following bit of code in rtkfdk.cxx : > >>>> > >>>> // Streaming depending on streaming capability of writer > >>>> typedef itk::StreamingImageFilter >>>> CPUOutputImageType> StreamerType; > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>>> streamerBP->SetInput( pfeldkamp ); > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >>>> > >>>> You can find information on how a streaming filter works on this page: > >>>> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >>>> > >>>> I hope it helps, > >>>> > >>>> Cyril > >>>> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> I have tried but I am not getting where to give > >>>> --division 4 in my code. > >>>>> Please find my code given below and please let me > know > >>>> where I need to change in my code to make it work. > >>>>> int _tmain(int argc, _TCHAR* argv[]) > >>>>> { > >>>>> #pragma region "Variable declaration" > >>>>> const double PI = 3.14159265358979323846; > >>>>> float *angles; > >>>>> int nProj = 349; > >>>>> typedef unsigned short pixelType; > >>>>> typedef float OutpixelType; > >>>>> const int dimension = 3; > >>>>> typedef itk::Image imageType; > >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>>>> imageType::Pointer Projections = imageType::New(); > >>>>> > >>>>> #pragma endregion "Variable declaration" > >>>>> > >>>>> Projections = > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > >> nProj); > >>>>> imageType::SpacingType pSpacing; > >>>>> pSpacing[0] = 0.2960; > >>>>> pSpacing[1] = 0.2960; > >>>>> pSpacing[2] = 0.2960; > >>>>> Projections->SetSpacing(pSpacing); > >>>>> > >>>>> imageType::PointType pOrigin; > >>>>> pOrigin[0] = -212.972; > >>>>> pOrigin[1] = -212.972; > >>>>> pOrigin[2] = -212.972; //-158.50; > >>>>> Projections->SetOrigin(pOrigin); > >>>>> > >>>>> Projections->Update(); > >>>>> > >>>>> //Read angles. > >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>>>> angles = new float[nProj]; > >>>>> angles = readAngles(angles_file, angles); > >>>>> > >>>>> #pragma region"Geometry" > >>>>> // Geometry object > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>>>> { > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > >> 0); > >>>> // 136 half fan //2.07 Kidwai // > >>>>> } > >>>>> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >>>> GeometryWriterType; > >>>>> GeometryWriterType::Pointer geometryWriter = > GeometryWriterType::New(); > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > >>>>> geometryWriter->SetObject(geometry); > >>>>> geometryWriter->WriteFile(); > >>>>> geometry->Update(); > >>>>> #pragma endregion "Geometry" > >>>>> > >>>>> //Define output image type > >>>>> > >>>>> #ifdef USE_CUDA > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>>>> #else > >>>>> typedef itk::Image OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > FDKType; > >>>>> #endif > >>>>> > >>>>> //ScatterCorrection > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter imageType > >>>> BoellaardScatterCorrectionImageFilterType; > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection > = > >>>> BoellaardScatterCorrectionImageFilterType::New(); > >>>>> ScatterCorrection->SetInput(Projections); > >>>>> > >>>>> //VarianObiRawImageFilter > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >>>> RawImageFilterType; > >>>>> RawImageFilterType::Pointer AttenuationFilter = > >>>> RawImageFilterType::New(); > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>>>> > >>>>> //Create the output image > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > >>>> ConstantImageSourceType; > >>>>> ConstantImageSourceType::PointType origin_p; > >>>>> ConstantImageSourceType::SizeType size_p; > >>>>> ConstantImageSourceType::SpacingType spacing_p; > >>>>> ConstantImageSourceType::Pointer projectionsSource = > >>>> ConstantImageSourceType::New(); > >>>>> origin_p[0] = -127.5; > >>>>> origin_p[1] = -127.5; > >>>>> origin_p[2] = -127.5; > >>>>> size_p[0] = 512; > >>>>> size_p[1] = 512; > >>>>> size_p[2] = 512; > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>>>> > >>>>> projectionsSource->SetOrigin(origin_p); > >>>>> projectionsSource->SetSpacing(spacing_p); > >>>>> projectionsSource->SetSize(size_p); > >>>>> projectionsSource->SetConstant(0); > >>>>> > >>>>> // Short scan image filter > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>>>> pssf->SetGeometry(geometry); > >>>>> pssf->InPlaceOff(); > >>>>> std::cout << "short scan image filter success" << std::endl; > >>>>> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > >>>>> feldkamp->SetGeometry(geometry); > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>>>> feldkamp->SetGPUEnabled(1); > >>>>> feldkamp->SetNumberOfThreads(10000); > >>>>> > >>>>> #pragma region "Write volume" > >>>>> > >>>>> //Create a raw io for writing > >>>>> > >>>>> itk::RawImageIO::Pointer io; > >>>>> io = itk::RawImageIO::New(); > >>>>> > >>>>> for (unsigned int i = 0; i < dimension; i++) > >>>>> { > >>>>> io->SetDimensions(i, size_p[i]); > >>>>> io->SetSpacing(i, spacing_p[i]); > >>>>> io->SetOrigin(i, origin_p[i]); > >>>>> } > >>>>> io->SetHeaderSize(0); > >>>>> io->SetByteOrderToLittleEndian(); > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>>>> io->SetNumberOfComponents(1); > >>>>> io->SetNumberOfDimensions(3); > >>>>> > >>>>> //create a writer and write reconstructed file > >>>>> itk::ImageFileWriter::Pointer writer; > >>>>> writer = itk::ImageFileWriter::New(); > >>>>> writer->SetFileName("D:\\Output.raw"); > >>>>> writer->SetImageIO(io); > >>>>> writer->SetInput(feldkamp->GetOutput()); > >>>>> > >>>>> try > >>>>> { > >>>>> writer->Update(); > >>>>> } > >>>>> catch (itk::ExceptionObject & excp) > >>>>> { > >>>>> std::cerr << "Error while writing the image " << std::endl; > >>>>> std::cerr << excp << std::endl; > >>>>> getchar(); > >>>>> } > >>>>> #pragma endregion "WriteVolume" > >>>>> delete[] angles; > >>>>> return 0; > >>>>> } > >>>>> > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> Senior Design Engineer > >>>>> Mobile No. +91-9738379729 > >>>>> > >>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>> http://www.panaceamedical.com > >>>>> Bangalore - India. > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> I was able to perform a reconstruction from your header and geometry > >>>>>> file, using the following command lines: > >>>>>> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>>>> --phantomscale "128,128,128" --like Output.mhd > >>>>>> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > >> --hardware > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>>>> > >>>>>> The first computes projections through a Shepp & Logan phantom, with > >> the > >>>>>> same size, spacing, origin, etc... as your projections, using your > >>>>>> geometry file geo.xml. > >>>>>> > >>>>>> The second line performs the FDK reconstruction. I had to use both > the > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > (3GB, > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > by > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>>>> parts, reconstructs them one by one, then assembles the results. Can > >> you > >>>>>> run the same commands and let us know whether you still encounter the > >>>>>> crash you mentioned ? If it works, you can use your own projection > data > >>>>>> in the second command line instead of "simulatedprojections.mha". > >>>>>> > >>>>>> Best, > >>>>>> > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>>>> > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> Please find the Header file in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> We do not need the projections file, at least not for a first stage > >> of > >>>>>>>> error tracking. We only need the header. > >>>>>>>> Try the following command line: > >>>>>>>> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>>>> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file > is > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > >> contains > >>>>>>>> the pixel values, but at the moment we do not need them. We will > >> create > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>>>> track down the error you encounter. > >>>>>>>> > >>>>>>>> Looking forward to receiving your file, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Sir, > >>>>>>>>> > >>>>>>>>> The single raw file of the projections is 1.4 GB > and > >> we > >>>> are > >>>>>> not > >>>>>>>> able to send this big file to you. Can you please suggest other > >>>>>> alternatives > >>>>>>>> for this? > >>>>>>>>> Or can you provide us the PC configuration to solve > >> the > >>>>>> issue? > >>>>>>>>> Let me know if any other clarification is required. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Hello Zahid, > >>>>>>>>>> > >>>>>>>>>> We will need the header of your projections file, too (It is best > >> if > >>>>>> you > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > file, > >> so > >>>>>> it > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>>>> > >>>>>>>>>> Regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Cyril Mory, > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> I have only used RTK version 1.3.0. but in > the > >>>> error > >>>>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>>>> Please find the attachment of the geometry > >> file > >>>> of > >>>>>> our > >>>>>>>>>> projections. > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >>>> Simon > >>>>>>>> Rit > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > >>>> source > >>>>>> of > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>>>> therefore > >>>>>>>>>>>> yourself): > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > changes > >> in > >>>>>> the > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>>>> problem > >>>>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>>>> - create a small example that reproduces your problem. You can, > >> for > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > >> logan > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > an > >>>>>>>>>>>> example). And send us the script > >>>>>>>>>>>> - OR send us your geometry file and the header of your > >> projections > >>>>>> file > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>>>> zero-filled > >>>>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>>>> > >>>>>>>>>>>> Best regards, > >>>>>>>>>>>> Cyril > >>>>>>>>>>>> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>>>> > >>>>>>>>>>>>> Please find the screen shot in the > >> attachment. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>> > >>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > >> CUDA > >>>>>>>>>> memory > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > >> first > >>>>>> make > >>>>>>>>>>>> sure > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > >> images. > >>>>>> If > >>>>>>>> it > >>>>>>>>>>>> is > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > --divisions. > >>>> The > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > use > >>>> of > >>>>>>>> RTK > >>>>>>>>>> on > >>>>>>>>>>>>>> our case studies webpage > >>>>>>>>>>>> . > >>>>>>>>>>>>>> Simon > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>>>> reconstruction > >>>>>>>>>> using > >>>>>>>>>>>> RTK > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > screen > >>>>>> shoot > >>>>>>>> of > >>>>>>>>>>>>>>> the > >>>>>>>>>>>>>>>> same. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am using the following items given > >> below. > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > console > >>>>>>>> application > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Please provide the solution of this > and > >> let > >>>> me > >>>>>>>> know > >>>>>>>>>> if > >>>>>>>>>>>>>> any > >>>>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > >> Url > >>>> : > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>>>> ________________ > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> This email and any files transmitted with it are > confidential > >>>> and > >>>>>>>>>>>> intended > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they > >> are > >>>>>>>>>>>> addressed. > >>>>>>>>>>>>>>> If you have received this email in error please notify the > >>>> system > >>>>>>>>>>>> manager. > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > email > >>>> are > >>>>>>>>>>>> solely > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > of > >>>> the > >>>>>>>>>>>> company. > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > >>>> attachments > >>>>>>>> for > >>>>>>>>>>>> the > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > >>>>>> damage > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>>>> > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Thu Nov 3 02:23:25 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 3 Nov 2016 07:23:25 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <24189134.77160.1478140718379@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> Message-ID: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): {\begin{aligned}&\mathbf {r} _{0}:=\mathbf {b} -\mathbf {Ax} _{0}\\&\mathbf {p} _{0}:=\mathbf {r} _{0}\\&k:=0\\&{\hbox{repeat}}\\&\qquad \alpha _{k}:={\frac {\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}{\mathbf {p} _{k}^{\mathsf {T}}\mathbf {Ap} _{k}}}\\&\qquad \mathbf {x} _{k+1}:=\mathbf {x} _{k}+\alpha _{k}\mathbf {p} _{k}\\&\qquad \mathbf {r} _{k+1}:=\mathbf {r} _{k}-\alpha _{k}\mathbf {Ap} _{k}\\&\qquad {\hbox{if }}r_{k+1}{\hbox{ is sufficiently small then exit loop}}\\&\qquad \beta _{k}:={\frac {\mathbf {r} _{k+1}^{\mathsf {T}}\mathbf {r} _{k+1}}{\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}}\\&\qquad \mathbf {p} _{k+1}:=\mathbf {r} _{k+1}+\beta _{k}\mathbf {p} _{k}\\&\qquad k:=k+1\\&{\hbox{end repeat}}\\&{\hbox{The result is }}\mathbf {x} _{k+1}\end{aligned}} In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: > Hello Simon and Cyril, > Thanks for the reply. > You are right Simon. I did not notice it too in the literature. The > main problem as you said is the storage. Actually I developed the > conjugate gradient (CG), quasi-Newton and Newton optimization methods > for optical tomography and I intended to apply them to the CT > reconstruction as well. I implemented the Newton's methods > (Gauss-Newton and Levenberg-Marquardt) in a > Jacobian-Free-Newton-Krylov approaches to avoid the matrix > multiplication of Jacobians (sensitivity). It means we only need to > store the Jacobian matrix for the these methods (the matrix R that > Cyril was mentioned), that is still a big matrix for practical > problems in CT reconstruction. For the quasi-Newton I adapted an > L-BFGS algorithm that only need the 3 or 8 last iterations of the > gradient vector to calculate the Hessian matrix. In my case, the > L-BFGS and Newton's methods was much faster than the CG as you know > because of using the second order derivative (hessian matrix). I saw > in your last paper you implement the conjugate gradient method, so I > thought it might be easy to extract the gradient vector from CG > modules and solve the cost function within the quasi-Newton/Newton > methods. I will look at the codes to see what I can do. > Thanks again for the reply. > > @Cyril: > Please correct me if I am wrong. you mean the output of > backProjectionFilter is the gradient of defined cost function? > > Regards, > Vahid > > > On Wednesday, November 2, 2016 2:53 AM, Cyril Mory > wrote: > > > Hi Vahid, > Welcome to RTK :) > Indeed, there are several iterative methods already implemented in > RTK, but none of the filters allows you to easily extract the gradient > of the least squares function there are minimizing. > If you need to minimize the classical non-regularized tomographic cost > function, ie || R f - p ||?, with R the forward projection operator, f > the volume you are looking for, and p the measured projections, my > best advice would be to copy some part of the pipeline of > rtkSARTConeBeamReconstructionFilter to get the job done, ie the > following part (copy-paste this into webgraphviz.com) > > digraph SARTConeBeamReconstructionFilter { > > Input0 [ label="Input 0 (Volume)"]; > Input0 [shape=Mdiamond]; > Input1 [label="Input 1 (Projections)"]; > Input1 [shape=Mdiamond]; > > node [shape=box]; > ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref > rtk::ForwardProjectionImageFilter"]; > Extract [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref > itk::MultiplyImageFilter"]; > AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; > Subtract [ label="itk::SubtractImageFilter" URL="\ref > itk::SubtractImageFilter"]; > MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" > URL="\ref itk::MultiplyImageFilter"]; > Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref > itk::DivideOrZeroOutImageFilter"]; > GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" > URL="\ref itk::MultiplyImageFilter", style=dashed]; > Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref > rtk::DisplacedDetectorImageFilter"]; > ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref > rtk::RayBoxIntersectionImageFilter"]; > ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref > rtk::BackProjectionImageFilter"]; > OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; > OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; > Input0 -> OutofInput0 [arrowhead=none]; > OutofInput0 -> ForwardProject; > ConstantVolume -> BeforeBP [arrowhead=none]; > BeforeBP -> BackProjection; > Extract -> AfterExtract[arrowhead=none]; > AfterExtract -> MultiplyByZero; > AfterExtract -> Subtract; > MultiplyByZero -> ForwardProject; > Input1 -> Extract; > ForwardProject -> Subtract; > Subtract -> MultiplyByLambda; > MultiplyByLambda -> Divide; > Divide -> GatingWeight; > GatingWeight -> Displaced; > ConstantProjectionStack -> ExtractConstantProjection; > ExtractConstantProjection -> RayBox; > RayBox -> Divide; > Displaced -> BackProjection; > BackProjection -> OutofBP [arrowhead=none]; > } > > As you can see, it is a very large part of the SART reconstruction > filter, so yoiu might be better off just copying the whole > SARTConeBeamReconstructionFilter and modifying it. > > Of course, you could also look into ITK's cost function class, and see > if one of the classes inherited from it suits your needs, implement > your cost function this way, and use ITK's off-the-shelf solvers to > minimize it. See the inheritance diagram in > https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if > you want to try this approach. > > Best regards, > Cyril > > On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >> Hello RTK users and developers, >> >> I already implemented the RTK and reconstructed some images with the >> FDK algorithm implemented in RTK. It works well. Thanks to RTK >> developers. >> Now, I am trying to develop a model-based image reconstruction for >> our cone-beam micro-CT. I see already that some iterative algorithms >> like ART and its modifications and conjugate-gradient (CG) method are >> implemented in the RTK. I want to develop a model-based >> reconstruction through the Newton/quasi-Newton optimizations methods. >> I was wondering is it possible to extract the gradient of least >> square function from implemented algorithms like CG module? Any >> recommendation will be appreciated. >> >> Best Regards, >> Vahid >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 10:21:11 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 14:21:11 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. The RTKScatterGlareCorrectionImageFilter code is given below. //rtkLagCorrectionImageFilter typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); LagCorrection->SetInput(Projections); //rtkScatterGlareCorrectionImageFilter typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Cyril Mory, > > > Thank you for your help. We are able to reconstruct 1024 > volume now. > > But the reconstruction time is around 4 minutes. Can you > please help us to reduce the reconstruction time? > > We are using NVIDIA TITAN X GPU which has 12 GB memory. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > Dear Zahid, > > > > The output looks correct. > > > > If the command line solution I suggested in a previous email works, the > > best way to move forward would be to compare your code and that of > > rtkfdk.cxx, and where it differs, make sure you have not introduced an > > error. > > > > Cyril > > > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > > Dear Cyril Mory, > > > > > > I have done the same but the Output.mhd file is still 0 > > KB for 1024 volume. Please find the attachment of the status of the output > > displayed. > > > > > > Please suggest us for further process. > > > > > > > > > Thanks & Regards > > > > > > Zahid Hasan Ansari > > > > > > > > > > > > > > > ----- Original Message ----- > > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > > [mailto:simon.rit at creatis.insa-lyon.fr] > > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > > > > >> I see two errors: > > >> > > >> Remove this line > > >> > > >> writer->SetNumberOfStreamDivisions(4); > > >> > > >> since only the streaming filter, not the write filter, needs to know > > >> about the number of divisions. > > >> And change the filename to > > >> > > >> "D:\\Output.mhd" > > >> > > >> It will write both the .mhd and the .raw files. > > >> > > >> I hope it helps, > > >> Cyril > > >> > > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > >>> Dear Cyril Mory, > > >>> > > >>> I have modified my file writer code and used > > >> StreamingImageFilter. Now its not giving any error message but the > final > > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > > >>> Please check my modified file writer code given > below. > > >>> > > >>> // Streaming depending on streaming capability of writer > > >>> typedef itk::StreamingImageFilter > > >> StreamerType; > > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>> streamerBP->SetInput(feldkamp->GetOutput()); > > >>> streamerBP->SetNumberOfStreamDivisions(4); > > >>> > > >>> //create a writer and write reconstructed file > > >>> itk::ImageFileWriter::Pointer writer; > > >>> writer = itk::ImageFileWriter::New(); > > >>> writer->SetFileName("D:\\Output.raw"); > > >>> writer->SetImageIO(io); > > >>> writer->SetInput(streamerBP->GetOutput()); > > >>> writer->SetNumberOfStreamDivisions(4); > > >>> > > >>> > > >>> Please let me know if any clarification is required. > > >>> > > >>> > > >>> Thanks & Regards > > >>> > > >>> Zahid Hasan Ansari > > >>> Senior Design Engineer > > >>> Mobile No. +91-9738379729 > > >>> > > >>> Panacea Medical Technologies Pvt. Ltd. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >> http://www.panaceamedical.com > > >>> Bangalore - India. > > >>> > > >>> > > >>> > > >>> > > >>> ----- Original Message ----- > > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > > Rit > > >> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>> > > >>> > > >>>> Dear Zahid, > > >>>> > > >>>> The --divisions is an option of the command-line application rtkfdk. > It > > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > > >>>> rather, it is passed to a streaming filter at the end of the > pipeline. > > >>>> Look for the following bit of code in rtkfdk.cxx : > > >>>> > > >>>> // Streaming depending on streaming capability of writer > > >>>> typedef itk::StreamingImageFilter > >>>> CPUOutputImageType> StreamerType; > > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>>> streamerBP->SetInput( pfeldkamp ); > > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg > ); > > >>>> > > >>>> You can find information on how a streaming filter works on this > page: > > >>>> > > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > >>>> > > >>>> I hope it helps, > > >>>> > > >>>> Cyril > > >>>> > > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > >>>>> Dear Cyril Mory, > > >>>>> > > >>>>> I have tried but I am not getting where to give > > >>>> --division 4 in my code. > > >>>>> Please find my code given below and please let me > > know > > >>>> where I need to change in my code to make it work. > > >>>>> int _tmain(int argc, _TCHAR* argv[]) > > >>>>> { > > >>>>> #pragma region "Variable declaration" > > >>>>> const double PI = 3.14159265358979323846; > > >>>>> float *angles; > > >>>>> int nProj = 349; > > >>>>> typedef unsigned short pixelType; > > >>>>> typedef float OutpixelType; > > >>>>> const int dimension = 3; > > >>>>> typedef itk::Image imageType; > > >>>>> typedef itk::ImageRegionConstIterator > ImageIteratorType; > > >>>>> imageType::Pointer Projections = imageType::New(); > > >>>>> > > >>>>> #pragma endregion "Variable declaration" > > >>>>> > > >>>>> Projections = > > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > > >> nProj); > > >>>>> imageType::SpacingType pSpacing; > > >>>>> pSpacing[0] = 0.2960; > > >>>>> pSpacing[1] = 0.2960; > > >>>>> pSpacing[2] = 0.2960; > > >>>>> Projections->SetSpacing(pSpacing); > > >>>>> > > >>>>> imageType::PointType pOrigin; > > >>>>> pOrigin[0] = -212.972; > > >>>>> pOrigin[1] = -212.972; > > >>>>> pOrigin[2] = -212.972; //-158.50; > > >>>>> Projections->SetOrigin(pOrigin); > > >>>>> > > >>>>> Projections->Update(); > > >>>>> > > >>>>> //Read angles. > > >>>>> char *angles_file = > "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > >>>>> angles = new float[nProj]; > > >>>>> angles = readAngles(angles_file, angles); > > >>>>> > > >>>>> #pragma region"Geometry" > > >>>>> // Geometry object > > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > > >>>>> { > > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, > 0, > > >> 0); > > >>>> // 136 half fan //2.07 Kidwai // > > >>>>> } > > >>>>> > > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > > >>>> GeometryWriterType; > > >>>>> GeometryWriterType::Pointer geometryWriter = > > GeometryWriterType::New(); > > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > > >>>>> geometryWriter->SetObject(geometry); > > >>>>> geometryWriter->WriteFile(); > > >>>>> geometry->Update(); > > >>>>> #pragma endregion "Geometry" > > >>>>> > > >>>>> //Define output image type > > >>>>> > > >>>>> #ifdef USE_CUDA > > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > > PSSFType; > > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > >>>>> #else > > >>>>> typedef itk::Image OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter > PSSFType; > > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > > FDKType; > > >>>>> #endif > > >>>>> > > >>>>> //ScatterCorrection > > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter > imageType > > >>>> BoellaardScatterCorrectionImageFilterType; > > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer > ScatterCorrection > > = > > >>>> BoellaardScatterCorrectionImageFilterType::New(); > > >>>>> ScatterCorrection->SetInput(Projections); > > >>>>> > > >>>>> //VarianObiRawImageFilter > > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > > >>>> RawImageFilterType; > > >>>>> RawImageFilterType::Pointer AttenuationFilter = > > >>>> RawImageFilterType::New(); > > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > >>>>> > > >>>>> //Create the output image > > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > > >>>> ConstantImageSourceType; > > >>>>> ConstantImageSourceType::PointType origin_p; > > >>>>> ConstantImageSourceType::SizeType size_p; > > >>>>> ConstantImageSourceType::SpacingType spacing_p; > > >>>>> ConstantImageSourceType::Pointer projectionsSource = > > >>>> ConstantImageSourceType::New(); > > >>>>> origin_p[0] = -127.5; > > >>>>> origin_p[1] = -127.5; > > >>>>> origin_p[2] = -127.5; > > >>>>> size_p[0] = 512; > > >>>>> size_p[1] = 512; > > >>>>> size_p[2] = 512; > > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > >>>>> > > >>>>> projectionsSource->SetOrigin(origin_p); > > >>>>> projectionsSource->SetSpacing(spacing_p); > > >>>>> projectionsSource->SetSize(size_p); > > >>>>> projectionsSource->SetConstant(0); > > >>>>> > > >>>>> // Short scan image filter > > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > > >>>>> pssf->SetGeometry(geometry); > > >>>>> pssf->InPlaceOff(); > > >>>>> std::cout << "short scan image filter success" << std::endl; > > >>>>> > > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > > >>>>> feldkamp->SetGeometry(geometry); > > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > >>>>> feldkamp->SetGPUEnabled(1); > > >>>>> feldkamp->SetNumberOfThreads(10000); > > >>>>> > > >>>>> #pragma region "Write volume" > > >>>>> > > >>>>> //Create a raw io for writing > > >>>>> > > >>>>> itk::RawImageIO::Pointer io; > > >>>>> io = itk::RawImageIO::New(); > > >>>>> > > >>>>> for (unsigned int i = 0; i < dimension; i++) > > >>>>> { > > >>>>> io->SetDimensions(i, size_p[i]); > > >>>>> io->SetSpacing(i, spacing_p[i]); > > >>>>> io->SetOrigin(i, origin_p[i]); > > >>>>> } > > >>>>> io->SetHeaderSize(0); > > >>>>> io->SetByteOrderToLittleEndian(); > > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > > >>>>> io->SetNumberOfComponents(1); > > >>>>> io->SetNumberOfDimensions(3); > > >>>>> > > >>>>> //create a writer and write reconstructed file > > >>>>> itk::ImageFileWriter::Pointer writer; > > >>>>> writer = itk::ImageFileWriter::New(); > > >>>>> writer->SetFileName("D:\\Output.raw"); > > >>>>> writer->SetImageIO(io); > > >>>>> writer->SetInput(feldkamp->GetOutput()); > > >>>>> > > >>>>> try > > >>>>> { > > >>>>> writer->Update(); > > >>>>> } > > >>>>> catch (itk::ExceptionObject & excp) > > >>>>> { > > >>>>> std::cerr << "Error while writing the image " << std::endl; > > >>>>> std::cerr << excp << std::endl; > > >>>>> getchar(); > > >>>>> } > > >>>>> #pragma endregion "WriteVolume" > > >>>>> delete[] angles; > > >>>>> return 0; > > >>>>> } > > >>>>> > > >>>>> > > >>>>> > > >>>>> Thanks & Regards > > >>>>> > > >>>>> Zahid Hasan Ansari > > >>>>> Senior Design Engineer > > >>>>> Mobile No. +91-9738379729 > > >>>>> > > >>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >>>> http://www.panaceamedical.com > > >>>>> Bangalore - India. > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> ----- Original Message ----- > > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > > >> Rit > > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>> > > >>>>> > > >>>>>> Dear Zahid, > > >>>>>> > > >>>>>> I was able to perform a reconstruction from your header and > geometry > > >>>>>> file, using the following command lines: > > >>>>>> > > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > > >>>>>> --phantomscale "128,128,128" --like Output.mhd > > >>>>>> > > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > > >> --hardware > > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > >>>>>> > > >>>>>> The first computes projections through a Shepp & Logan phantom, > with > > >> the > > >>>>>> same size, spacing, origin, etc... as your projections, using your > > >>>>>> geometry file geo.xml. > > >>>>>> > > >>>>>> The second line performs the FDK reconstruction. I had to use both > > the > > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > > (3GB, > > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > > by > > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > > >>>>>> parts, reconstructs them one by one, then assembles the results. > Can > > >> you > > >>>>>> run the same commands and let us know whether you still encounter > the > > >>>>>> crash you mentioned ? If it works, you can use your own projection > > data > > >>>>>> in the second command line instead of "simulatedprojections.mha". > > >>>>>> > > >>>>>> Best, > > >>>>>> > > >>>>>> Cyril > > >>>>>> > > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > >>>>>> > > >>>>>>> Dear Sir, > > >>>>>>> > > >>>>>>> Please find the Header file in the attachment. > > >>>>>>> > > >>>>>>> > > >>>>>>> Thanks & Regards > > >>>>>>> > > >>>>>>> Zahid Hasan Ansari > > >>>>>>> > > >>>>>>> > > >>>>>>> ----- Original Message ----- > > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > Simon > > >>>> Rit > > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>> > > >>>>>>> > > >>>>>>>> Dear Zahid, > > >>>>>>>> > > >>>>>>>> We do not need the projections file, at least not for a first > stage > > >> of > > >>>>>>>> error tracking. We only need the header. > > >>>>>>>> Try the following command line: > > >>>>>>>> > > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > > >>>>>>>> > > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" > file > > is > > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > > >> contains > > >>>>>>>> the pixel values, but at the moment we do not need them. We will > > >> create > > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough > to > > >>>>>>>> track down the error you encounter. > > >>>>>>>> > > >>>>>>>> Looking forward to receiving your file, > > >>>>>>>> Cyril > > >>>>>>>> > > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > > >>>>>>>>> Dear Sir, > > >>>>>>>>> > > >>>>>>>>> The single raw file of the projections is 1.4 GB > > and > > >> we > > >>>> are > > >>>>>> not > > >>>>>>>> able to send this big file to you. Can you please suggest other > > >>>>>> alternatives > > >>>>>>>> for this? > > >>>>>>>>> Or can you provide us the PC configuration to > solve > > >> the > > >>>>>> issue? > > >>>>>>>>> Let me know if any other clarification is > required. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> Thanks & Regards > > >>>>>>>>> > > >>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> ----- Original Message ----- > > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > >> Simon > > >>>>>> Rit > > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>>> Hello Zahid, > > >>>>>>>>>> > > >>>>>>>>>> We will need the header of your projections file, too (It is > best > > >> if > > >>>>>> you > > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > > file, > > >> so > > >>>>>> it > > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > > >>>>>>>>>> > > >>>>>>>>>> Regards, > > >>>>>>>>>> Cyril > > >>>>>>>>>> > > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>> Dear Cyril Mory, > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> I have only used RTK version 1.3.0. but > in > > the > > >>>> error > > >>>>>>>>>> message it is showing RTK version 1.2.0. > > >>>>>>>>>>> Please find the attachment of the > geometry > > >> file > > >>>> of > > >>>>>> our > > >>>>>>>>>> projections. > > >>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>> > > >>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com], > > >>>> Simon > > >>>>>>>> Rit > > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, > saimahesh.m at panaceamedical.com > > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>> > > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > > >>>> source > > >>>>>> of > > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > > >>>>>> therefore > > >>>>>>>>>>>> yourself): > > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > > changes > > >> in > > >>>>>> the > > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so > your > > >>>>>> problem > > >>>>>>>>>>>> might disappear just by upgrading to the new version > > >>>>>>>>>>>> - create a small example that reproduces your problem. You > can, > > >> for > > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > > >> logan > > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look > at > > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > > an > > >>>>>>>>>>>> example). And send us the script > > >>>>>>>>>>>> - OR send us your geometry file and the header of your > > >> projections > > >>>>>> file > > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > > >>>>>> zero-filled > > >>>>>>>>>>>> stack of projections), and the command line that crashes > > >>>>>>>>>>>> > > >>>>>>>>>>>> Best regards, > > >>>>>>>>>>>> Cyril > > >>>>>>>>>>>> > > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>>>> Dear Simon Rit, > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Please find the screen shot in the > > >> attachment. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > > : > > >>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>>>> To: Zahid Hasan Ansari > > [mailto:zahidhasan.a at panaceamedical.com] > > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > > >>>>>>>> [mailto:rtk-users at public.kitware.com], > > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is > a > > >> CUDA > > >>>>>>>>>> memory > > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > > >> first > > >>>>>> make > > >>>>>>>>>>>> sure > > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > > >> images. > > >>>>>> If > > >>>>>>>> it > > >>>>>>>>>>>> is > > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > > --divisions. > > >>>> The > > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > > use > > >>>> of > > >>>>>>>> RTK > > >>>>>>>>>> on > > >>>>>>>>>>>>>> our case studies webpage > > >>>>>>>>>>>> . > > >>>>>>>>>>>>>> Simon > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Dear Sir\Madam, > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > > >>>>>> reconstruction > > >>>>>>>>>> using > > >>>>>>>>>>>> RTK > > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > > screen > > >>>>>> shoot > > >>>>>>>> of > > >>>>>>>>>>>>>>> the > > >>>>>>>>>>>>>>>> same. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am using the following items > given > > >> below. > > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > > console > > >>>>>>>> application > > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > > >>>>>>>>>>>>>>>> 5. CUDA 7. > > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Please provide the solution of this > > and > > >> let > > >>>> me > > >>>>>>>> know > > >>>>>>>>>> if > > >>>>>>>>>>>>>> any > > >>>>>>>>>>>>>>>> other clarification is required. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, > > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 > | > > >> Url > > >>>> : > > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>>>> > ____________________________________________________________ > > >>>>>>>>>>>>>>> ________________ > > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> This email and any files transmitted with it are > > confidential > > >>>> and > > >>>>>>>>>>>> intended > > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom > they > > >> are > > >>>>>>>>>>>> addressed. > > >>>>>>>>>>>>>>> If you have received this email in error please notify the > > >>>> system > > >>>>>>>>>>>> manager. > > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > > email > > >>>> are > > >>>>>>>>>>>> solely > > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > > of > > >>>> the > > >>>>>>>>>>>> company. > > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > > >>>> attachments > > >>>>>>>> for > > >>>>>>>>>>>> the > > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > > any > > >>>>>> damage > > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> This email and any files transmitted with it are > confidential > > >> and > > >>>>>>>>>> intended > > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > > are > > >>>>>>>>>> addressed. > > >>>>>>>>>>>>> If you have received this email in error please notify the > > >> system > > >>>>>>>>>> manager. > > >>>>>>>>>>>>> Please note that any views or opinions presented in this > email > > >> are > > >>>>>>>>>> solely > > >>>>>>>>>>>>> those of the author and do not necessarily represent those > of > > >> the > > >>>>>>>>>> company. > > >>>>>>>>>>>>> Finally, the recipient should check this email and any > > >> attachments > > >>>>>> for > > >>>>>>>>>> the > > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > > >>>> damage > > >>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>> ________________________________________ > > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > Area > > >>>>>> Phase > > >>>>>>>> 1, > > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > Industrial > > >>>>>> Area, > > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>> > > >>>>>>>>>>> This email and any files transmitted with it are confidential > > and > > >>>>>>>> intended > > >>>>>>>>>>> solely for the use of the individual or entity to whom they > are > > >>>>>>>> addressed. > > >>>>>>>>>>> If you have received this email in error please notify the > > system > > >>>>>>>> manager. > > >>>>>>>>>>> Please note that any views or opinions presented in this email > > are > > >>>>>>>> solely > > >>>>>>>>>>> those of the author and do not necessarily represent those of > > the > > >>>>>>>> company. > > >>>>>>>>>>> Finally, the recipient should check this email and any > > attachments > > >>>> for > > >>>>>>>> the > > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > > >> damage > > >>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>> > > >>>>>>>>> ________________________________________ > > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > > >>>> Phase > > >>>>>> 1, > > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > > >>>> Area, > > >>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>> > > >>>>>>>>> This email and any files transmitted with it are confidential > and > > >>>>>> intended > > >>>>>>>>> solely for the use of the individual or entity to whom they are > > >>>>>> addressed. > > >>>>>>>>> If you have received this email in error please notify the > system > > >>>>>> manager. > > >>>>>>>>> Please note that any views or opinions presented in this email > are > > >>>>>> solely > > >>>>>>>>> those of the author and do not necessarily represent those of > the > > >>>>>> company. > > >>>>>>>>> Finally, the recipient should check this email and any > attachments > > >> for > > >>>>>> the > > >>>>>>>>> presence of viruses. The company accepts no liability for any > > damage > > >>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>> ________________________________________ > > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > >> Phase > > >>>> 1, > > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > >> Area, > > >>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>> Fax : + 91 80 42428710 > > >>>>>>> Url : http://www.panaceamedical.com > > >>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>> > > >>>>>>> This email and any files transmitted with it are confidential and > > >>>> intended > > >>>>>>> solely for the use of the individual or entity to whom they are > > >>>> addressed. > > >>>>>>> If you have received this email in error please notify the system > > >>>> manager. > > >>>>>>> Please note that any views or opinions presented in this email are > > >>>> solely > > >>>>>>> those of the author and do not necessarily represent those of the > > >>>> company. > > >>>>>>> Finally, the recipient should check this email and any attachments > > for > > >>>> the > > >>>>>>> presence of viruses. The company accepts no liability for any > damage > > >>>>>>> caused by any virus transmitted by this email. > > >>>>>>> > > >>>>> ________________________________________ > > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>> Fax : + 91 80 42428710 > > >>>>> Url : http://www.panaceamedical.com > > >>>>> > > >> > > > ____________________________________________________________________________ > > >>>>> PMT EMAIL DISCLAIMER: > > >>>>> > > >>>>> This email and any files transmitted with it are confidential and > > >> intended > > >>>>> solely for the use of the individual or entity to whom they are > > >> addressed. > > >>>>> If you have received this email in error please notify the system > > >> manager. > > >>>>> Please note that any views or opinions presented in this email are > > >> solely > > >>>>> those of the author and do not necessarily represent those of the > > >> company. > > >>>>> Finally, the recipient should check this email and any attachments > for > > >> the > > >>>>> presence of viruses. The company accepts no liability for any damage > > >>>>> caused by any virus transmitted by this email. > > >>>>> > > >>>>> > > >>>>> > > >>>> > > >>> ________________________________________ > > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 > > >>> Fax : + 91 80 42428710 > > >>> Url : http://www.panaceamedical.com > > >>> > > >> > > > ____________________________________________________________________________ > > >>> PMT EMAIL DISCLAIMER: > > >>> > > >>> This email and any files transmitted with it are confidential and > > intended > > >>> solely for the use of the individual or entity to whom they are > > addressed. > > >>> If you have received this email in error please notify the system > > manager. > > >>> Please note that any views or opinions presented in this email are > > solely > > >>> those of the author and do not necessarily represent those of the > > company. > > >>> Finally, the recipient should check this email and any attachments for > > the > > >>> presence of viruses. The company accepts no liability for any damage > > >>> caused by any virus transmitted by this email. > > >>> > > >>> > > >>> > > >>> > > >>> > > >> > > >> > > > > > > ________________________________________ > > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > > Malur - 563130. Kolar District. INDIA. > > > > > > Tel : +91 80 4242 8700 / 2845 4785 > > > Fax : + 91 80 42428710 > > > Url : http://www.panaceamedical.com > > > > > > ____________________________________________________________________________ > > > PMT EMAIL DISCLAIMER: > > > > > > This email and any files transmitted with it are confidential and > intended > > > solely for the use of the individual or entity to whom they are > addressed. > > > If you have received this email in error please notify the system > manager. > > > Please note that any views or opinions presented in this email are > solely > > > those of the author and do not necessarily represent those of the > company. > > > Finally, the recipient should check this email and any attachments for > the > > > presence of viruses. The company accepts no liability for any damage > > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: ScatterGlareError.png Type: image/png Size: 121487 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 3 10:28:49 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 3 Nov 2016 15:28:49 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> References: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Message-ID: Hi, I think you should look at the applications before posting a question on the mailing list. There is a rtkscatterglarecorrection tool, look at rtkscatterglarecorrection.cxx. You must init the coefficients. I'll add a check to make the error message more readable but please, take the time to look at all the examples available in applications before posting a question. Thanks, Simon On Thu, Nov 3, 2016 at 3:21 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > > We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. > > The RTKScatterGlareCorrectionImageFilter code is given below. > > //rtkLagCorrectionImageFilter > typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; > LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); > LagCorrection->SetInput(Projections); > > //rtkScatterGlareCorrectionImageFilter > typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; > ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); > ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); > > > > > > Thanks & Regards > > Zahid Hasan Ansari > > > > ----- Original Message ----- > From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Cyril Mory, >> >> >> Thank you for your help. We are able to reconstruct 1024 >> volume now. >> >> But the reconstruction time is around 4 minutes. Can you >> please help us to reduce the reconstruction time? >> >> We are using NVIDIA TITAN X GPU which has 12 GB memory. >> >> >> Thanks & Regards >> >> Zahid Hasan Ansari >> >> >> >> >> ----- Original Message ----- >> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> >> >> > Dear Zahid, >> > >> > The output looks correct. >> > >> > If the command line solution I suggested in a previous email works, the >> > best way to move forward would be to compare your code and that of >> > rtkfdk.cxx, and where it differs, make sure you have not introduced an >> > error. >> > >> > Cyril >> > >> > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: >> > > Dear Cyril Mory, >> > > >> > > I have done the same but the Output.mhd file is still 0 >> > KB for 1024 volume. Please find the attachment of the status of the output >> > displayed. >> > > >> > > Please suggest us for further process. >> > > >> > > >> > > Thanks & Regards >> > > >> > > Zahid Hasan Ansari >> > > >> > > >> > > >> > > >> > > ----- Original Message ----- >> > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >> > [mailto:simon.rit at creatis.insa-lyon.fr] >> > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > > >> > > >> > >> I see two errors: >> > >> >> > >> Remove this line >> > >> >> > >> writer->SetNumberOfStreamDivisions(4); >> > >> >> > >> since only the streaming filter, not the write filter, needs to know >> > >> about the number of divisions. >> > >> And change the filename to >> > >> >> > >> "D:\\Output.mhd" >> > >> >> > >> It will write both the .mhd and the .raw files. >> > >> >> > >> I hope it helps, >> > >> Cyril >> > >> >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >> > >>> Dear Cyril Mory, >> > >>> >> > >>> I have modified my file writer code and used >> > >> StreamingImageFilter. Now its not giving any error message but the >> final >> > >> output is 0 byte for 1024 volume. It working fine for 512 volume. >> > >>> Please check my modified file writer code given >> below. >> > >>> >> > >>> // Streaming depending on streaming capability of writer >> > >>> typedef itk::StreamingImageFilter >> > >> StreamerType; >> > >>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>> streamerBP->SetInput(feldkamp->GetOutput()); >> > >>> streamerBP->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> //create a writer and write reconstructed file >> > >>> itk::ImageFileWriter::Pointer writer; >> > >>> writer = itk::ImageFileWriter::New(); >> > >>> writer->SetFileName("D:\\Output.raw"); >> > >>> writer->SetImageIO(io); >> > >>> writer->SetInput(streamerBP->GetOutput()); >> > >>> writer->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> >> > >>> Please let me know if any clarification is required. >> > >>> >> > >>> >> > >>> Thanks & Regards >> > >>> >> > >>> Zahid Hasan Ansari >> > >>> Senior Design Engineer >> > >>> Mobile No. +91-9738379729 >> > >>> >> > >>> Panacea Medical Technologies Pvt. Ltd. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >> http://www.panaceamedical.com >> > >>> Bangalore - India. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> ----- Original Message ----- >> > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> > Rit >> > >> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>> >> > >>> >> > >>>> Dear Zahid, >> > >>>> >> > >>>> The --divisions is an option of the command-line application rtkfdk. >> It >> > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >> > >>>> rather, it is passed to a streaming filter at the end of the >> pipeline. >> > >>>> Look for the following bit of code in rtkfdk.cxx : >> > >>>> >> > >>>> // Streaming depending on streaming capability of writer >> > >>>> typedef itk::StreamingImageFilter> > >>>> CPUOutputImageType> StreamerType; >> > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>>> streamerBP->SetInput( pfeldkamp ); >> > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg >> ); >> > >>>> >> > >>>> You can find information on how a streaming filter works on this >> page: >> > >>>> >> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> > >>>> >> > >>>> I hope it helps, >> > >>>> >> > >>>> Cyril >> > >>>> >> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >> > >>>>> Dear Cyril Mory, >> > >>>>> >> > >>>>> I have tried but I am not getting where to give >> > >>>> --division 4 in my code. >> > >>>>> Please find my code given below and please let me >> > know >> > >>>> where I need to change in my code to make it work. >> > >>>>> int _tmain(int argc, _TCHAR* argv[]) >> > >>>>> { >> > >>>>> #pragma region "Variable declaration" >> > >>>>> const double PI = 3.14159265358979323846; >> > >>>>> float *angles; >> > >>>>> int nProj = 349; >> > >>>>> typedef unsigned short pixelType; >> > >>>>> typedef float OutpixelType; >> > >>>>> const int dimension = 3; >> > >>>>> typedef itk::Image imageType; >> > >>>>> typedef itk::ImageRegionConstIterator >> ImageIteratorType; >> > >>>>> imageType::Pointer Projections = imageType::New(); >> > >>>>> >> > >>>>> #pragma endregion "Variable declaration" >> > >>>>> >> > >>>>> Projections = >> > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> > >> nProj); >> > >>>>> imageType::SpacingType pSpacing; >> > >>>>> pSpacing[0] = 0.2960; >> > >>>>> pSpacing[1] = 0.2960; >> > >>>>> pSpacing[2] = 0.2960; >> > >>>>> Projections->SetSpacing(pSpacing); >> > >>>>> >> > >>>>> imageType::PointType pOrigin; >> > >>>>> pOrigin[0] = -212.972; >> > >>>>> pOrigin[1] = -212.972; >> > >>>>> pOrigin[2] = -212.972; //-158.50; >> > >>>>> Projections->SetOrigin(pOrigin); >> > >>>>> >> > >>>>> Projections->Update(); >> > >>>>> >> > >>>>> //Read angles. >> > >>>>> char *angles_file = >> "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >> > >>>>> angles = new float[nProj]; >> > >>>>> angles = readAngles(angles_file, angles); >> > >>>>> >> > >>>>> #pragma region"Geometry" >> > >>>>> // Geometry object >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> > >>>>> GeometryType::Pointer geometry = GeometryType::New(); >> > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >> > >>>>> { >> > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, >> 0, >> > >> 0); >> > >>>> // 136 half fan //2.07 Kidwai // >> > >>>>> } >> > >>>>> >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> > >>>> GeometryWriterType; >> > >>>>> GeometryWriterType::Pointer geometryWriter = >> > GeometryWriterType::New(); >> > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >> > >>>>> geometryWriter->SetObject(geometry); >> > >>>>> geometryWriter->WriteFile(); >> > >>>>> geometry->Update(); >> > >>>>> #pragma endregion "Geometry" >> > >>>>> >> > >>>>> //Define output image type >> > >>>>> >> > >>>>> #ifdef USE_CUDA >> > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > >> PSSFType; >> > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> > >>>>> #else >> > >>>>> typedef itk::Image OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter >> PSSFType; >> > >>>>> typedef rtk::FDKConeBeamReconstructionFilter >> > FDKType; >> > >>>>> #endif >> > >>>>> >> > >>>>> //ScatterCorrection >> > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter> > imageType >> > >>>> BoellaardScatterCorrectionImageFilterType; >> > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer >> ScatterCorrection >> > = >> > >>>> BoellaardScatterCorrectionImageFilterType::New(); >> > >>>>> ScatterCorrection->SetInput(Projections); >> > >>>>> >> > >>>>> //VarianObiRawImageFilter >> > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> > >>>> RawImageFilterType; >> > >>>>> RawImageFilterType::Pointer AttenuationFilter = >> > >>>> RawImageFilterType::New(); >> > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >> > >>>>> >> > >>>>> //Create the output image >> > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >> > >>>> ConstantImageSourceType; >> > >>>>> ConstantImageSourceType::PointType origin_p; >> > >>>>> ConstantImageSourceType::SizeType size_p; >> > >>>>> ConstantImageSourceType::SpacingType spacing_p; >> > >>>>> ConstantImageSourceType::Pointer projectionsSource = >> > >>>> ConstantImageSourceType::New(); >> > >>>>> origin_p[0] = -127.5; >> > >>>>> origin_p[1] = -127.5; >> > >>>>> origin_p[2] = -127.5; >> > >>>>> size_p[0] = 512; >> > >>>>> size_p[1] = 512; >> > >>>>> size_p[2] = 512; >> > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >> > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >> > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >> > >>>>> >> > >>>>> projectionsSource->SetOrigin(origin_p); >> > >>>>> projectionsSource->SetSpacing(spacing_p); >> > >>>>> projectionsSource->SetSize(size_p); >> > >>>>> projectionsSource->SetConstant(0); >> > >>>>> >> > >>>>> // Short scan image filter >> > >>>>> PSSFType::Pointer pssf = PSSFType::New(); >> > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >> > >>>>> pssf->SetGeometry(geometry); >> > >>>>> pssf->InPlaceOff(); >> > >>>>> std::cout << "short scan image filter success" << std::endl; >> > >>>>> >> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); >> > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >> > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >> > >>>>> feldkamp->SetGeometry(geometry); >> > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >> > >>>>> feldkamp->SetGPUEnabled(1); >> > >>>>> feldkamp->SetNumberOfThreads(10000); >> > >>>>> >> > >>>>> #pragma region "Write volume" >> > >>>>> >> > >>>>> //Create a raw io for writing >> > >>>>> >> > >>>>> itk::RawImageIO::Pointer io; >> > >>>>> io = itk::RawImageIO::New(); >> > >>>>> >> > >>>>> for (unsigned int i = 0; i < dimension; i++) >> > >>>>> { >> > >>>>> io->SetDimensions(i, size_p[i]); >> > >>>>> io->SetSpacing(i, spacing_p[i]); >> > >>>>> io->SetOrigin(i, origin_p[i]); >> > >>>>> } >> > >>>>> io->SetHeaderSize(0); >> > >>>>> io->SetByteOrderToLittleEndian(); >> > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >> > >>>>> io->SetNumberOfComponents(1); >> > >>>>> io->SetNumberOfDimensions(3); >> > >>>>> >> > >>>>> //create a writer and write reconstructed file >> > >>>>> itk::ImageFileWriter::Pointer writer; >> > >>>>> writer = itk::ImageFileWriter::New(); >> > >>>>> writer->SetFileName("D:\\Output.raw"); >> > >>>>> writer->SetImageIO(io); >> > >>>>> writer->SetInput(feldkamp->GetOutput()); >> > >>>>> >> > >>>>> try >> > >>>>> { >> > >>>>> writer->Update(); >> > >>>>> } >> > >>>>> catch (itk::ExceptionObject & excp) >> > >>>>> { >> > >>>>> std::cerr << "Error while writing the image " << std::endl; >> > >>>>> std::cerr << excp << std::endl; >> > >>>>> getchar(); >> > >>>>> } >> > >>>>> #pragma endregion "WriteVolume" >> > >>>>> delete[] angles; >> > >>>>> return 0; >> > >>>>> } >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> Thanks & Regards >> > >>>>> >> > >>>>> Zahid Hasan Ansari >> > >>>>> Senior Design Engineer >> > >>>>> Mobile No. +91-9738379729 >> > >>>>> >> > >>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >>>> http://www.panaceamedical.com >> > >>>>> Bangalore - India. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> ----- Original Message ----- >> > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >> > >> Rit >> > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>> >> > >>>>> >> > >>>>>> Dear Zahid, >> > >>>>>> >> > >>>>>> I was able to perform a reconstruction from your header and >> geometry >> > >>>>>> file, using the following command lines: >> > >>>>>> >> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> > >>>>>> --phantomscale "128,128,128" --like Output.mhd >> > >>>>>> >> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> > >> --hardware >> > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> > >>>>>> >> > >>>>>> The first computes projections through a Shepp & Logan phantom, >> with >> > >> the >> > >>>>>> same size, spacing, origin, etc... as your projections, using your >> > >>>>>> geometry file geo.xml. >> > >>>>>> >> > >>>>>> The second line performs the FDK reconstruction. I had to use both >> > the >> > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory >> > (3GB, >> > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory >> > by >> > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> > >>>>>> parts, reconstructs them one by one, then assembles the results. >> Can >> > >> you >> > >>>>>> run the same commands and let us know whether you still encounter >> the >> > >>>>>> crash you mentioned ? If it works, you can use your own projection >> > data >> > >>>>>> in the second command line instead of "simulatedprojections.mha". >> > >>>>>> >> > >>>>>> Best, >> > >>>>>> >> > >>>>>> Cyril >> > >>>>>> >> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> > >>>>>> >> > >>>>>>> Dear Sir, >> > >>>>>>> >> > >>>>>>> Please find the Header file in the attachment. >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> Thanks & Regards >> > >>>>>>> >> > >>>>>>> Zahid Hasan Ansari >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> ----- Original Message ----- >> > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > Simon >> > >>>> Rit >> > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>> >> > >>>>>>> >> > >>>>>>>> Dear Zahid, >> > >>>>>>>> >> > >>>>>>>> We do not need the projections file, at least not for a first >> stage >> > >> of >> > >>>>>>>> error tracking. We only need the header. >> > >>>>>>>> Try the following command line: >> > >>>>>>>> >> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >> > >>>>>>>> >> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" >> file >> > is >> > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> > >> contains >> > >>>>>>>> the pixel values, but at the moment we do not need them. We will >> > >> create >> > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough >> to >> > >>>>>>>> track down the error you encounter. >> > >>>>>>>> >> > >>>>>>>> Looking forward to receiving your file, >> > >>>>>>>> Cyril >> > >>>>>>>> >> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >> > >>>>>>>>> Dear Sir, >> > >>>>>>>>> >> > >>>>>>>>> The single raw file of the projections is 1.4 GB >> > and >> > >> we >> > >>>> are >> > >>>>>> not >> > >>>>>>>> able to send this big file to you. Can you please suggest other >> > >>>>>> alternatives >> > >>>>>>>> for this? >> > >>>>>>>>> Or can you provide us the PC configuration to >> solve >> > >> the >> > >>>>>> issue? >> > >>>>>>>>> Let me know if any other clarification is >> required. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> Thanks & Regards >> > >>>>>>>>> >> > >>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> ----- Original Message ----- >> > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > >> Simon >> > >>>>>> Rit >> > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>>> Hello Zahid, >> > >>>>>>>>>> >> > >>>>>>>>>> We will need the header of your projections file, too (It is >> best >> > >> if >> > >>>>>> you >> > >>>>>>>>>> have all your projections as a single .mhd and a single .raw >> > file, >> > >> so >> > >>>>>> it >> > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >> > >>>>>>>>>> >> > >>>>>>>>>> Regards, >> > >>>>>>>>>> Cyril >> > >>>>>>>>>> >> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>> Dear Cyril Mory, >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> I have only used RTK version 1.3.0. but >> in >> > the >> > >>>> error >> > >>>>>>>>>> message it is showing RTK version 1.2.0. >> > >>>>>>>>>>> Please find the attachment of the >> geometry >> > >> file >> > >>>> of >> > >>>>>> our >> > >>>>>>>>>> projections. >> > >>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>> >> > >>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>>>> To: Zahid Hasan Ansari >> [mailto:zahidhasan.a at panaceamedical.com], >> > >>>> Simon >> > >>>>>>>> Rit >> > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, >> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the >> > >>>> source >> > >>>>>> of >> > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >> > >>>>>> therefore >> > >>>>>>>>>>>> yourself): >> > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable >> > changes >> > >> in >> > >>>>>> the >> > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so >> your >> > >>>>>> problem >> > >>>>>>>>>>>> might disappear just by upgrading to the new version >> > >>>>>>>>>>>> - create a small example that reproduces your problem. You >> can, >> > >> for >> > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> > >> logan >> > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look >> at >> > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need >> > an >> > >>>>>>>>>>>> example). And send us the script >> > >>>>>>>>>>>> - OR send us your geometry file and the header of your >> > >> projections >> > >>>>>> file >> > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >> > >>>>>> zero-filled >> > >>>>>>>>>>>> stack of projections), and the command line that crashes >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Best regards, >> > >>>>>>>>>>>> Cyril >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>>>> Dear Simon Rit, >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Please find the screen shot in the >> > >> attachment. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >> > : >> > >>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>>>> To: Zahid Hasan Ansari >> > [mailto:zahidhasan.a at panaceamedical.com] >> > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >> > >>>>>>>> [mailto:rtk-users at public.kitware.com], >> > >>>>>>>>>>>> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is >> a >> > >> CUDA >> > >>>>>>>>>> memory >> > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> > >> first >> > >>>>>> make >> > >>>>>>>>>>>> sure >> > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> > >> images. >> > >>>>>> If >> > >>>>>>>> it >> > >>>>>>>>>>>> is >> > >>>>>>>>>>>>>> no sufficient, you can split your volume using the >> > --divisions. >> > >>>> The >> > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >> > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the >> > use >> > >>>> of >> > >>>>>>>> RTK >> > >>>>>>>>>> on >> > >>>>>>>>>>>>>> our case studies webpage >> > >>>>>>>>>>>> . >> > >>>>>>>>>>>>>> Simon >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >> > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Dear Sir\Madam, >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >> > >>>>>> reconstruction >> > >>>>>>>>>> using >> > >>>>>>>>>>>> RTK >> > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the >> > screen >> > >>>>>> shoot >> > >>>>>>>> of >> > >>>>>>>>>>>>>>> the >> > >>>>>>>>>>>>>>>> same. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am using the following items >> given >> > >> below. >> > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >> > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >> > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit >> > console >> > >>>>>>>> application >> > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >> > >>>>>>>>>>>>>>>> 5. CUDA 7. >> > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >> > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Please provide the solution of this >> > and >> > >> let >> > >>>> me >> > >>>>>>>> know >> > >>>>>>>>>> if >> > >>>>>>>>>>>>>> any >> > >>>>>>>>>>>>>>>> other clarification is required. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> > EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, >> > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 >> | >> > >> Url >> > >>>> : >> > >>>>>>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>>>> >> ____________________________________________________________ >> > >>>>>>>>>>>>>>> ________________ >> > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> This email and any files transmitted with it are >> > confidential >> > >>>> and >> > >>>>>>>>>>>> intended >> > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom >> they >> > >> are >> > >>>>>>>>>>>> addressed. >> > >>>>>>>>>>>>>>> If you have received this email in error please notify the >> > >>>> system >> > >>>>>>>>>>>> manager. >> > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this >> > email >> > >>>> are >> > >>>>>>>>>>>> solely >> > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those >> > of >> > >>>> the >> > >>>>>>>>>>>> company. >> > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >>>> attachments >> > >>>>>>>> for >> > >>>>>>>>>>>> the >> > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> > any >> > >>>>>> damage >> > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> This email and any files transmitted with it are >> confidential >> > >> and >> > >>>>>>>>>> intended >> > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> > are >> > >>>>>>>>>> addressed. >> > >>>>>>>>>>>>> If you have received this email in error please notify the >> > >> system >> > >>>>>>>>>> manager. >> > >>>>>>>>>>>>> Please note that any views or opinions presented in this >> email >> > >> are >> > >>>>>>>>>> solely >> > >>>>>>>>>>>>> those of the author and do not necessarily represent those >> of >> > >> the >> > >>>>>>>>>> company. >> > >>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >> attachments >> > >>>>>> for >> > >>>>>>>>>> the >> > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> any >> > >>>> damage >> > >>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > Area >> > >>>>>> Phase >> > >>>>>>>> 1, >> > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > Industrial >> > >>>>>> Area, >> > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>> >> > >>>>>>>>>>> This email and any files transmitted with it are confidential >> > and >> > >>>>>>>> intended >> > >>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >> > >>>>>>>> addressed. >> > >>>>>>>>>>> If you have received this email in error please notify the >> > system >> > >>>>>>>> manager. >> > >>>>>>>>>>> Please note that any views or opinions presented in this email >> > are >> > >>>>>>>> solely >> > >>>>>>>>>>> those of the author and do not necessarily represent those of >> > the >> > >>>>>>>> company. >> > >>>>>>>>>>> Finally, the recipient should check this email and any >> > attachments >> > >>>> for >> > >>>>>>>> the >> > >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> > >> damage >> > >>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>> >> > >>>>>>>>> ________________________________________ >> > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >> > >>>> Phase >> > >>>>>> 1, >> > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >> > >>>> Area, >> > >>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>> >> > >>>>>>>>> This email and any files transmitted with it are confidential >> and >> > >>>>>> intended >> > >>>>>>>>> solely for the use of the individual or entity to whom they are >> > >>>>>> addressed. >> > >>>>>>>>> If you have received this email in error please notify the >> system >> > >>>>>> manager. >> > >>>>>>>>> Please note that any views or opinions presented in this email >> are >> > >>>>>> solely >> > >>>>>>>>> those of the author and do not necessarily represent those of >> the >> > >>>>>> company. >> > >>>>>>>>> Finally, the recipient should check this email and any >> attachments >> > >> for >> > >>>>>> the >> > >>>>>>>>> presence of viruses. The company accepts no liability for any >> > damage >> > >>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>> ________________________________________ >> > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > >> Phase >> > >>>> 1, >> > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > >> Area, >> > >>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>> Fax : + 91 80 42428710 >> > >>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>> >> > >>>>>>> This email and any files transmitted with it are confidential and >> > >>>> intended >> > >>>>>>> solely for the use of the individual or entity to whom they are >> > >>>> addressed. >> > >>>>>>> If you have received this email in error please notify the system >> > >>>> manager. >> > >>>>>>> Please note that any views or opinions presented in this email are >> > >>>> solely >> > >>>>>>> those of the author and do not necessarily represent those of the >> > >>>> company. >> > >>>>>>> Finally, the recipient should check this email and any attachments >> > for >> > >>>> the >> > >>>>>>> presence of viruses. The company accepts no liability for any >> damage >> > >>>>>>> caused by any virus transmitted by this email. >> > >>>>>>> >> > >>>>> ________________________________________ >> > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>> Fax : + 91 80 42428710 >> > >>>>> Url : http://www.panaceamedical.com >> > >>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>> PMT EMAIL DISCLAIMER: >> > >>>>> >> > >>>>> This email and any files transmitted with it are confidential and >> > >> intended >> > >>>>> solely for the use of the individual or entity to whom they are >> > >> addressed. >> > >>>>> If you have received this email in error please notify the system >> > >> manager. >> > >>>>> Please note that any views or opinions presented in this email are >> > >> solely >> > >>>>> those of the author and do not necessarily represent those of the >> > >> company. >> > >>>>> Finally, the recipient should check this email and any attachments >> for >> > >> the >> > >>>>> presence of viruses. The company accepts no liability for any damage >> > >>>>> caused by any virus transmitted by this email. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>> >> > >>> ________________________________________ >> > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>> Fax : + 91 80 42428710 >> > >>> Url : http://www.panaceamedical.com >> > >>> >> > >> >> > >> ____________________________________________________________________________ >> > >>> PMT EMAIL DISCLAIMER: >> > >>> >> > >>> This email and any files transmitted with it are confidential and >> > intended >> > >>> solely for the use of the individual or entity to whom they are >> > addressed. >> > >>> If you have received this email in error please notify the system >> > manager. >> > >>> Please note that any views or opinions presented in this email are >> > solely >> > >>> those of the author and do not necessarily represent those of the >> > company. >> > >>> Finally, the recipient should check this email and any attachments for >> > the >> > >>> presence of viruses. The company accepts no liability for any damage >> > >>> caused by any virus transmitted by this email. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > >> >> > >> >> > > >> > > ________________________________________ >> > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >> > Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> > Malur - 563130. Kolar District. INDIA. >> > > >> > > Tel : +91 80 4242 8700 / 2845 4785 >> > > Fax : + 91 80 42428710 >> > > Url : http://www.panaceamedical.com >> > > >> > >> ____________________________________________________________________________ >> > > PMT EMAIL DISCLAIMER: >> > > >> > > This email and any files transmitted with it are confidential and >> intended >> > > solely for the use of the individual or entity to whom they are >> addressed. >> > > If you have received this email in error please notify the system >> manager. >> > > Please note that any views or opinions presented in this email are >> solely >> > > those of the author and do not necessarily represent those of the >> company. >> > > Finally, the recipient should check this email and any attachments for >> the >> > > presence of viruses. The company accepts no liability for any damage >> > > caused by any virus transmitted by this email. >> > > >> > >> > >> > > > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Thu Nov 3 16:10:31 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 20:10:31 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Message-ID: <1775591917.651990.1478203831679@mail.yahoo.com> OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right?About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question:I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards,Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Fri Nov 4 02:31:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 4 Nov 2016 07:31:18 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1775591917.651990.1478203831679@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> Message-ID: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: > OK. good. Thank Cyril to clarify it to me. To implement the Newton's > methods instead of multiplication of R with R^T, we need the > multiplication of Jacobian/Sensitivity (R here) matrix with vector > variable (here x) and the gradient vector (here multiplication of R > with -r). I think it is possible to implement the Newton optimization > methods with the current modules as I think we could extract the R and > f dot product and R and r dot product. Am I right? > About the displayed algorithms, I think the gradient vector is dot > product of matrix A (Jacobian) with the minus residual vector (-r). > > One more question: > I already developed my codes in python. Do you think it is easy to > wrap your modules in python? I don't have experience in these subject. > > Regards, > Vahid > > > On Thursday, November 3, 2016 2:23 AM, Cyril Mory > wrote: > > > Hello Vahid, > Thank you for this insight on Newton's methods. Yes, the output of the > backprojection filter, in SART, is the gradient of the cost function. > You may have noticed that the pipeline performs a division of the > forward projection by something coming from > "RayBoxIntersectionFilter". This is to normalize the forward > projection, so that R^T R f ~= blurry f. If you don't do it, you'll > have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, > and your algorithm will quickly diverge. > You could try to extract the gradient from the conjugate gradient > filter as well, but it is significantly more tricky: first, the CG > filter was implemented from the following algorithm, taken from > wikipedia (which embeds the normalization I was mentioning earlier): > In this algorithm, it is not clear to me what exactly is the gradient > of the cost function. I would say it is something like "- r_k", but > I'm not sure. Second, as you see, the CG filter needs an operator A, > which may differ from one problem to another, so this operator is > implemented in a separate filter, which in your case would be > rtkReconstructionConjugateGradientOperator, with the laplacian > regularization parameter gamma set to 0. > Note that we never actually store the system matrix R. Instead, the > interpolation coefficient it contains are re-computed on the fly > everytime we forward project. And the same holds for backprojection, > i.e the matrix R^T. > Best, > Cyril > > On 11/03/2016 03:38 AM, vahid ettehadi wrote: >> Hello Simon and Cyril, >> Thanks for the reply. >> You are right Simon. I did not notice it too in the literature. The >> main problem as you said is the storage. Actually I developed the >> conjugate gradient (CG), quasi-Newton and Newton optimization methods >> for optical tomography and I intended to apply them to the CT >> reconstruction as well. I implemented the Newton's methods >> (Gauss-Newton and Levenberg-Marquardt) in a >> Jacobian-Free-Newton-Krylov approaches to avoid the matrix >> multiplication of Jacobians (sensitivity). It means we only need to >> store the Jacobian matrix for the these methods (the matrix R that >> Cyril was mentioned), that is still a big matrix for practical >> problems in CT reconstruction. For the quasi-Newton I adapted an >> L-BFGS algorithm that only need the 3 or 8 last iterations of the >> gradient vector to calculate the Hessian matrix. In my case, the >> L-BFGS and Newton's methods was much faster than the CG as you know >> because of using the second order derivative (hessian matrix). I saw >> in your last paper you implement the conjugate gradient method, so I >> thought it might be easy to extract the gradient vector from CG >> modules and solve the cost function within the quasi-Newton/Newton >> methods. I will look at the codes to see what I can do. >> Thanks again for the reply. >> >> @Cyril: >> Please correct me if I am wrong. you mean the output of >> backProjectionFilter is the gradient of defined cost function? >> >> Regards, >> Vahid >> >> >> On Wednesday, November 2, 2016 2:53 AM, Cyril Mory >> >> wrote: >> >> >> Hi Vahid, >> Welcome to RTK :) >> Indeed, there are several iterative methods already implemented in >> RTK, but none of the filters allows you to easily extract the >> gradient of the least squares function there are minimizing. >> If you need to minimize the classical non-regularized tomographic >> cost function, ie || R f - p ||?, with R the forward projection >> operator, f the volume you are looking for, and p the measured >> projections, my best advice would be to copy some part of the >> pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, >> ie the following part (copy-paste this into webgraphviz.com) >> >> digraph SARTConeBeamReconstructionFilter { >> >> Input0 [ label="Input 0 (Volume)"]; >> Input0 [shape=Mdiamond]; >> Input1 [label="Input 1 (Projections)"]; >> Input1 [shape=Mdiamond]; >> >> node [shape=box]; >> ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref >> rtk::ForwardProjectionImageFilter"]; >> Extract [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref >> itk::MultiplyImageFilter"]; >> AfterExtract [label="", fixedsize="false", width=0, height=0, >> shape=none]; >> Subtract [ label="itk::SubtractImageFilter" URL="\ref >> itk::SubtractImageFilter"]; >> MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" >> URL="\ref itk::MultiplyImageFilter"]; >> Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref >> itk::DivideOrZeroOutImageFilter"]; >> GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" >> URL="\ref itk::MultiplyImageFilter", style=dashed]; >> Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref >> rtk::DisplacedDetectorImageFilter"]; >> ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref >> rtk::RayBoxIntersectionImageFilter"]; >> ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref >> rtk::BackProjectionImageFilter"]; >> OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; >> OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; >> Input0 -> OutofInput0 [arrowhead=none]; >> OutofInput0 -> ForwardProject; >> ConstantVolume -> BeforeBP [arrowhead=none]; >> BeforeBP -> BackProjection; >> Extract -> AfterExtract[arrowhead=none]; >> AfterExtract -> MultiplyByZero; >> AfterExtract -> Subtract; >> MultiplyByZero -> ForwardProject; >> Input1 -> Extract; >> ForwardProject -> Subtract; >> Subtract -> MultiplyByLambda; >> MultiplyByLambda -> Divide; >> Divide -> GatingWeight; >> GatingWeight -> Displaced; >> ConstantProjectionStack -> ExtractConstantProjection; >> ExtractConstantProjection -> RayBox; >> RayBox -> Divide; >> Displaced -> BackProjection; >> BackProjection -> OutofBP [arrowhead=none]; >> } >> >> As you can see, it is a very large part of the SART reconstruction >> filter, so yoiu might be better off just copying the whole >> SARTConeBeamReconstructionFilter and modifying it. >> >> Of course, you could also look into ITK's cost function class, and >> see if one of the classes inherited from it suits your needs, >> implement your cost function this way, and use ITK's off-the-shelf >> solvers to minimize it. See the inheritance diagram in >> https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if >> you want to try this approach. >> >> Best regards, >> Cyril >> >> On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >>> Hello RTK users and developers, >>> >>> I already implemented the RTK and reconstructed some images with the >>> FDK algorithm implemented in RTK. It works well. Thanks to RTK >>> developers. >>> Now, I am trying to develop a model-based image reconstruction for >>> our cone-beam micro-CT. I see already that some iterative algorithms >>> like ART and its modifications and conjugate-gradient (CG) method >>> are implemented in the RTK. I want to develop a model-based >>> reconstruction through the Newton/quasi-Newton optimizations >>> methods. I was wondering is it possible to extract the gradient of >>> least square function from implemented algorithms like CG module? >>> Any recommendation will be appreciated. >>> >>> Best Regards, >>> Vahid >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Fri Nov 4 16:42:08 2016 From: julien.jomier at kitware.com (Julien Jomier) Date: Fri, 4 Nov 2016 21:42:08 +0100 Subject: [Rtk-users] SimpleRTK + Matlab In-Reply-To: References: <06d4327e-9fd4-bf08-565d-5304f577b521@creatis.insa-lyon.fr> Message-ID: <89255846-9a06-a625-45f1-88d140c0013d@kitware.com> Hi Arvid, Sorry for the late reply. We successfully build the latest RTK with ITK 4.11.0 on Visual Studio 2013 with static libraries (BUILD_SHARED_LIBS set to OFF). I have just pushed a fix to SimpleRTK to build as shared libraries. Note that you would need to have ITK built as shared libraries as well. Let us know if you still have any issues, Julien On 23/09/2016 10:29, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi again. > > I've been spending some more time with this, and feel I learned a little > bit more. I have now tested this on several machines with several > compiler versions (more or less all of them) and serveral cmake versions > - all with Windows 7. > > I can actually reproduce the successful build you linked to, but this > can only be done if you do not include any of the language wrappings, > like in the build you linked to. Enable any of them, and the build will > break. (see attachment) > > I suspect it must have been working in the past, but since none of them > are included in your test there have been a breaking change, and none of > them work anymore. > > I am still trying to tweak then projects manually to build SimpleRTK > with some sort of language support, but still without any luck. > > best > > Arvid > > On Tue, Sep 20, 2016 at 4:19 PM, Simon Rit > > > wrote: > > Hi, > Sorry, I won't be able to help but I'd advise to tick on WRAP_PYTHON > only at first in cmake, not the other languages (i.e., tick off > WRAP_LUA). > I can't solve your problem but Kitware is going to look into an > upgrade of SimpleRTK in the coming days, I'll ask them if they know > what is the issue. If you look here: > http://my.cdash.org/viewNotes.php?buildid=1052065 > > this is a nightly build of SimpleRTK on Windows and it seems to > work. I don't see why it wouldn't work for you. > Simon > > On Tue, Sep 20, 2016 at 2:17 PM, Arvid Piehl Lauritsen B?ttiger > > wrote: > > Hi again. > > I understand, but could you please help me get in contact with > the person who knows something about the windows build (if any), > I think there is something wrong. > > I have been investigating the build problems I had and found > that in the sub folder "SimpleRTK-build" there is a solutions > file with SimpleRTK. I opened it up and found the projects which > I had problems building: "SimpleRTKCommon", > "SimpleRTKBasicFilters0", "SimpleRTKBasicFilters1" etc. > > When I then tried to build SimpleRTKCommon manually it just > compiled without any problems. However, when I followed up by > building "SimpleRTKBasicFilters0" it gave me an error which > stated that it couldn't find "SimpleRTKCommon-0.9.lib" - which I > just build. > > After some more investigation I realized that the > SimpleRTKCommon is set to build a dynamic linked library (DLL), > and SimpleRTKBasicFilters0 expects it to be a static linked > library (LIB). After changing SimpleRTKCommon to be build as a > static library - and changing the output location - I could > build SimpleRTKBasicFilters0. > > However, SimpleRTKBasicFilters0 is also build as an DLL, but > changing that to a LIB as well I could build > SimpleRTKBasicFilters1, then SimpleRTKBasicFilters2 and then > SimpleRTKBasicFilters3. You get the point. > > I'm unsure if the intention is to build them as static or > dynamic libraries, but in any case the current build > configuration doesn't work - on my setup at least. > > However, I should note than for some reason the "lua5" project > did build successfully out of the box. Whatever it does > differently works. > > best > > Arvid > > > > On Tue, Sep 20, 2016 at 7:33 AM, Simon Rit > > wrote: > > I'm not an msvc specialist but your first line suggests that > you have pasted only part of the log: > > 20> Done Building Project > "C:\Users\aplb\Work\RTK\RTK1.2-bin-vs13\SimpleRTK-build\ALL_BUILD.vcxproj" > (default targets) -- FAILED. > > What you need to find out is why this build failed. If the > build fails, the linking cannot work. > Cheers, > Simon > > > On 19/09/2016 19:44, Arvid Piehl Lauritsen B?ttiger wrote: >> I did a complete rebuild, and here is the end of the >> output: http://pastebin.com/hvQ33WWg >> >> I have to admit I'm not sure what to make of it. I should >> note that I'm trying to compile the version I just pulled >> from git earlier today, since the other version I normally >> work with is really old. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 6:50 PM, Simon Rit >> > > wrote: >> >> SimpleRTKCommon is a library generated when compiling. >> Don't you have another error before that which >> explains why it did not compile? >> Simon >> >> On Mon, Sep 19, 2016 at 2:30 PM, Arvid Piehl Lauritsen >> B?ttiger > > wrote: >> >> Hi again. >> >> I've been trying to get it working. However, I did >> run into some problems compiling SimpleRTK. The >> main issue seems to be that it depends on >> SimpleRTKCommon - which I do not have. >> >> Here is the last few lines from VS2013 >> >> > 5>LINK : fatal error LNK1181: cannot open input >> file '..\..\..\lib\Debug\SimpleRTKCommon-0.9.lib' >> [C:\Users\aplb\Work\RTK\RTK1.2- >> > >> bin-vs13\SimpleRTK-build\Code\IO\src\SimpleRTKIO.vcxproj] >> > 5> >> > 5> 0 Warning(s) >> > 5> 2 Error(s) >> > 5> >> > 5> Time Elapsed 00:00:25.26 >> > ========== Build: 4 succeeded, 1 failed, 0 >> up-to-date, 0 skipped ========== >> >> I'm not quite sure what is going on, because the >> only reference I can find to SimpleRTKCommon is >> the CMakeLists.txt on github: >> https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/CMakeLists.txt >> >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:19 AM, Simon Rit >> > > wrote: >> >> The latest MacOS. It's nice if you can test it >> on other platforms, I'll try to run it on >> Linux but I have to upgrade matlab first (I >> think python calls are available starting with >> Matlab 2014). >> Simon >> >> On Mon, Sep 19, 2016 at 11:14 AM, Arvid Piehl >> Lauritsen B?ttiger > > wrote: >> >> Dear Simon >> >> This look very interesting! Which platform >> did you successfully execute this on? >> I will give it a try at once (on windows) >> and let you know if I run into any problems. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:05 AM, Simon >> Rit > > >> wrote: >> >> Dear RTK users, >> I have quickly tested calling the >> SimpleRTK python lib from Matlab and >> it seems to work well: >> http://wiki.openrtk.org/index.php/SimpleRTK#Matlab >> >> Therefore, I don't think we have to >> work on Matlab wrappings but let us >> know if you think otherwise. >> Future works include a simple >> installation mechanism for >> pre-compiled SimpleRTK libraries. >> We'll keep you posted! >> Simon >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> >> >> >> >> > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From w_ettehadi at yahoo.com Mon Nov 7 16:53:54 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Mon, 7 Nov 2016 21:53:54 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Message-ID: <1477848112.17731.1478555634307@mail.yahoo.com> Thanks Cyril for your time and advises. Vahid On Friday, November 4, 2016 2:31 AM, Cyril Mory wrote: Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right? About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question: I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards, Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Philipp.Freislederer at med.uni-muenchen.de Thu Nov 17 05:08:09 2016 From: Philipp.Freislederer at med.uni-muenchen.de (Freislederer, Philipp) Date: Thu, 17 Nov 2016 10:08:09 +0000 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac Message-ID: Dear all, I currently have some issues in generating off-plane projections where I think rtk might be helpful. I am trying to generate projections from an Brainlab ExacTrac geometry. What I am getting is a projection matrix generated by the system itself. Using only this information I am able to project any voxel value in a CT onto a panel. Now, in order to speed everything up a little and not re-implement everything that has been done sufficiently already I am hoping to use 'rtkforwardprojections'. The problem is I am not able to reproduce the Brainlab geometry using 'rtksimulatedgeometry' from the projection matrix directly. I could calculate the room angle of the source to the panel from the projection matrix but I am getting weird results when applying these on something like plastimatch, so I think I have an error in there. Is there a way of creating a geometry simply from the projection matrix or do I have to work around and calculate every parameter needed specifically? Maybe someone has some experience with this type of issue. Thanks in advance! Philipp -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 17 05:27:14 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 17 Nov 2016 11:27:14 +0100 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac In-Reply-To: References: Message-ID: Hi, Yes ! I have actually added that functionality recently from Thibault Notargiacomo's code see bool rtk::ThreeDCircularProjectionGeometry::AddProjection ( const HomogeneousProjectionMatrixType & pMat) Note that the projection matrix must be for a 3D position in mm to a 2D position in mm. You can add pre-/post-matrices to go from mm to voxel. There is no command line tool to do it but you can easily create your command line tool to do it. This is tested in testing/rtkgeometryfrommatrixtest.cxx. Let me know if you need more info, Simon On Thu, Nov 17, 2016 at 11:08 AM, Freislederer, Philipp < Philipp.Freislederer at med.uni-muenchen.de> wrote: > Dear all, > > > > I currently have some issues in generating off-plane projections where I > think rtk might be helpful. > > I am trying to generate projections from an Brainlab ExacTrac geometry. > > What I am getting is a projection matrix generated by the system itself. > Using only this information I am able to project any voxel value in a CT > onto a panel. > > Now, in order to speed everything up a little and not re-implement > everything that has been done sufficiently already I am hoping to use > ?rtkforwardprojections?. > > The problem is I am not able to reproduce the Brainlab geometry using > ?rtksimulatedgeometry? from the projection matrix directly. > > I could calculate the room angle of the source to the panel from the > projection matrix but I am getting weird results when applying these on > something like plastimatch, so I think I have an error in there. > > > > Is there a way of creating a geometry simply from the projection matrix or > do I have to work around and calculate every parameter needed specifically? > > Maybe someone has some experience with this type of issue. > > > > Thanks in advance! > > > > Philipp > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Sat Nov 19 14:51:24 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Sat, 19 Nov 2016 19:51:24 +0000 Subject: [Rtk-users] Geometric calibration Message-ID: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ From simon.rit at creatis.insa-lyon.fr Tue Nov 22 02:01:19 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 22 Nov 2016 08:01:19 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: Message-ID: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper ). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > Hi RTK users, > > I'm interested in reconstructing images acquired by a fluoroscopy system > rotating around a knee phantom. Unfortunately, I've been unsuccessful so > far. I recognize some of the phantom in the reconstructed image, but it > contains double contours and the shape is deformed. > > I think the issue might be incorrect geometry specification. I have images > also including a phantom containing markers for which we know the > coordinates, which should allow us to calibrate the system. On the wiki on > image quality, I saw that some users had developed scripts to do the > calibration? Would someone be willing to share it? > > Kind regards, > Sepp > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: after.pdf Type: application/pdf Size: 5974 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: before.pdf Type: application/pdf Size: 5678 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: calib.py Type: text/x-python Size: 2488 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 23 12:44:11 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 23 Nov 2016 18:44:11 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Andreas, Today we had the RTK training and some users were looking for a XIM file reader. I pointed to your contributions but any chance to have it put in RTK soon? Thanks in advance, Simon On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit wrote: > Hi, > Thanks for sharing. There still seems to be some streak artefacts, do you > see the same in the Varian reconstruction? > I'm looking forward to the pull-request, I think we should try to make the > bzip2 optional. > Simon > > On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < > andreasg at phys.au.dk> wrote: > >> Thanks for the fast response Simon! >> >> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >> right all along! >> I just didn't get why it makes a difference. I think I do now, as the >> resulting image was flipped upside down and not left/right as I expected. >> [attached] >> >> The reconstruction is significantly better, I'll look into what should be >> included in the reader and what I should keep in my program to keep >> conformity with the other readers. Then I'll create a pull request. >> >> Just for the purpose of others hitting the same or a similar bug, I also >> attempted: >> I did the SART reconstruction with 10 iterations, lambda=0.3, and Joseph >> back/forward projection, *but with no* significant improvement [attached] >> >> And: >> If you want you can download the data set from: [Dropbox link to 460MB >> zip (I'll >> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >> is used along with the Scan.xml (Calibrations folder may be used in the >> future in my program, but I'm not sure if you can rely on the existence of >> the content). >> >> A MatLab XimReader is available: link >> (also >> available from Varian bitbucket along a with a python version and a >> C#->matlab plugin >> ). >> Otherwise my fork with the RTK-style reader is available from the same >> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >> so bzip2 is a new dependancy). >> >> Best regards >> Andreas >> >> >> __________________________________ >> >> Andreas Gravgaard Andersen >> >> Department of Oncology, >> >> Aarhus University Hospital >> >> N?rrebrogade 44, >> >> 8000, Aarhus C >> >> Mail: andreasg at phys.au.dk >> >> Cell: +45 3165 8140 >> >> >> >> 2016-09-16 16:13 GMT+02:00 Simon Rit : >> >>> Hi, >>> You can try any iterative reconstruction, they can also handle short >>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>> However, the nature of the artifacts indicate more a problem in the >>> geometry in my opinion. I have seen such errors when, for example, rotating >>> in the wrong direction. I can have a look if you share the dataset. >>> Cheers, >>> Simon >>> >>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>> andreasg at phys.au.dk> wrote: >>> >>>> Thanks for the suggestions, Simon and Cyril! >>>> >>>> I have been carefully looking though the geometry and from what I >>>> understand of the transformations matrices, the geometry looks correct/(as >>>> expected). >>>> >>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>> were because had used half-fan scans (full-arc). >>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>> artifacts occurs! >>>> >>>> Are there other (built-in) means of improving half-arc scans, than the >>>> parker short scan filter? >>>> >>>> Parker short scan does a decent job, but the result is still far from >>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>> >>>> Best regards >>>> Andreas >>>> >>>> >>>> __________________________________ >>>> >>>> Andreas Gravgaard Andersen >>>> >>>> Department of Oncology, >>>> >>>> Aarhus University Hospital >>>> >>>> N?rrebrogade 44, >>>> >>>> 8000, Aarhus C >>>> >>>> Mail: andreasg at phys.au.dk >>>> >>>> Cell: +45 3165 8140 >>>> >>>> >>>> >>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory : >>>> >>>>> One suggestion since it works with the Hnd projections: >>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>> Xim projections) and output two projection stack files and two geometry >>>>> files, then compare the projection stack files by subtracting one to the >>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>> are identical, then I do not see any reason why the reconstructions should >>>>> be different, so my guess is that you will find differences. >>>>> >>>>> >>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>> >>>>>> Hi, >>>>>> I have almost never worked with Varian data but it looks like a >>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>> projections which results in assigning a bad geometry to each >>>>>> projection. How did you name your projections? Maybe check that the >>>>>> order matches that of the RTK geometry file. Otherwise, there might be >>>>>> an issue in the creation of the geometry file itself. >>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>> code when you feel it's ready. >>>>>> Simon >>>>>> >>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>> wrote: >>>>>> >>>>>>> Dear RTK experts, >>>>>>> >>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>> format. I >>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>> available with RTK. >>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>> >>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>> in UI), >>>>>>> however when reconstructing with a regular FDK I get a reconstructed >>>>>>> image >>>>>>> that is smeared out around the high and low density areas [see >>>>>>> attached >>>>>>> image] >>>>>>> >>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>> Scripps >>>>>>> (~520 projections). Fixed detector and source (offset=0) with SID=2m, >>>>>>> SDD=3m. >>>>>>> >>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>> algorithm). >>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>> software works >>>>>>> perfectly. >>>>>>> >>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>> creates >>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>> If the first few projections are excluded, the following projection >>>>>>> will act >>>>>>> the same way. >>>>>>> >>>>>>> The projections are corrected for beam hardening and all the >>>>>>> projections >>>>>>> have the expected attenuation. >>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>> reconstruction >>>>>>> makes the same artifacts. >>>>>>> >>>>>>> Setting the value of the first and last projection to zero has the >>>>>>> same >>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>> not the >>>>>>> artifacts. >>>>>>> >>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>> >>>>>>> Best regards >>>>>>> Andreas >>>>>>> >>>>>>> __________________________________ >>>>>>> >>>>>>> Andreas Gravgaard Andersen >>>>>>> >>>>>>> Department of Oncology, >>>>>>> >>>>>>> Aarhus University Hospital >>>>>>> >>>>>>> N?rrebrogade 44, >>>>>>> >>>>>>> 8000, Aarhus C >>>>>>> >>>>>>> Mail: andreasg at phys.au.dk >>>>>>> >>>>>>> Cell: +45 3165 8140 >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Thu Nov 24 01:34:58 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Thu, 24 Nov 2016 06:34:58 +0000 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: , Message-ID: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Hi Simon, Thanks for the script. I was wondering if you could also share the csv or a dummy file? I'm unsure of what the second column contains. An offset distance to the rotation axis? Or the height? Which distance was known in your example? From the code it looks like the distance to the rotation axis? Sepp On 22 Nov 2016, at 08.01, Simon Rit > wrote: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt > wrote: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 24 01:44:42 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 24 Nov 2016 07:44:42 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> References: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Message-ID: Hi, Enclosed. Column 1 is platform angle, 2 is bb height, 3 is the u coordinate (in pixel) and 4 is the v coordinate (in pixel too). I had approximately measured the source-to-detector (270) and source-to-isocenter (210) distances but they were still optimized to have a better assessment. Simon On Thu, Nov 24, 2016 at 7:34 AM, Sepp de Raedt wrote: > Hi Simon, > > Thanks for the script. I was wondering if you could also share the csv or > a dummy file? I'm unsure of what the second column contains. An offset > distance to the rotation axis? Or the height? > > Which distance was known in your example? From the code it looks like the > distance to the rotation axis? > > Sepp > > On 22 Nov 2016, at 08.01, Simon Rit > wrote: > > Hi Sepp, > I did do a calibration script on a micro CT platform. The idea was that I > had a bb taken from 4 different view points at 4 different heights with a > known distance. Their projected position was segmented beforehand on the > projections and I tried to match the projections by optimizing the > calibration (which we see in before.pdf and after.pdf). I don't think it's > a good script, e.g., because I tried to find 8 parameters when 7 are > sufficient for my system (see, e.g., this paper > ). > But this gives you a starting point to develop your own script which will > hopefully be better. Please share if you do something from it! > Thanks, > Simon > > On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > >> Hi RTK users, >> >> I'm interested in reconstructing images acquired by a fluoroscopy system >> rotating around a knee phantom. Unfortunately, I've been unsuccessful so >> far. I recognize some of the phantom in the reconstructed image, but it >> contains double contours and the shape is deformed. >> >> I think the issue might be incorrect geometry specification. I have >> images also including a phantom containing markers for which we know the >> coordinates, which should allow us to calibrate the system. On the wiki on >> image quality, I saw that some users had developed scripts to do the >> calibration? Would someone be willing to share it? >> >> Kind regards, >> Sepp >> >> ______________________________________________________________________ >> This email has been scanned by the Symantec Email Security.cloud service. >> For more information please visit http://www.symanteccloud.com >> ______________________________________________________________________ >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > > > > > > > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CentroidPositions_H5_to_H25_90degstep.csv Type: text/csv Size: 321 bytes Desc: not available URL: From andreasg at phys.au.dk Fri Nov 25 10:25:55 2016 From: andreasg at phys.au.dk (Andreas Gravgaard Andersen) Date: Fri, 25 Nov 2016 16:25:55 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Simon, I have created a pull-request with the XIM file reader. I'm sorry for being late with the promised pull-request (there were a lot of merge conflicts, so it got postponed). I have cleaned it up, but it is still not flawless as mentioned in the pull-request-message. I have tried to keep the RTK coding-style by creating it as a modified HND file reader, but I have only a year of experience with C++, so I apologize if I've left some ugly code in there.. Best regards Andreas __________________________________ Andreas Gravgaard Andersen Department of Oncology, Aarhus University Hospital N?rrebrogade 44, 8000, Aarhus C Mail: andreasg at phys.au.dk Cell: +45 3165 8140 2016-11-23 18:44 GMT+01:00 Simon Rit : > Dear Andreas, > Today we had the RTK training and some users were looking for a XIM file > reader. I pointed to your contributions but any chance to have it put in > RTK soon? > Thanks in advance, > Simon > > On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit > wrote: > >> Hi, >> Thanks for sharing. There still seems to be some streak artefacts, do you >> see the same in the Varian reconstruction? >> I'm looking forward to the pull-request, I think we should try to make >> the bzip2 optional. >> Simon >> >> On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < >> andreasg at phys.au.dk> wrote: >> >>> Thanks for the fast response Simon! >>> >>> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >>> right all along! >>> I just didn't get why it makes a difference. I think I do now, as the >>> resulting image was flipped upside down and not left/right as I expected. >>> [attached] >>> >>> The reconstruction is significantly better, I'll look into what should >>> be included in the reader and what I should keep in my program to keep >>> conformity with the other readers. Then I'll create a pull request. >>> >>> Just for the purpose of others hitting the same or a similar bug, I also >>> attempted: >>> I did the SART reconstruction with 10 iterations, lambda=0.3, and >>> Joseph back/forward projection, *but with no* significant improvement >>> [attached] >>> >>> And: >>> If you want you can download the data set from: [Dropbox link to 460MB >>> zip (I'll >>> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >>> is used along with the Scan.xml (Calibrations folder may be used in the >>> future in my program, but I'm not sure if you can rely on the existence of >>> the content). >>> >>> A MatLab XimReader is available: link >>> (also >>> available from Varian bitbucket along a with a python version and a >>> C#->matlab plugin >>> ). >>> Otherwise my fork with the RTK-style reader is available from the same >>> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >>> so bzip2 is a new dependancy). >>> >>> Best regards >>> Andreas >>> >>> >>> __________________________________ >>> >>> Andreas Gravgaard Andersen >>> >>> Department of Oncology, >>> >>> Aarhus University Hospital >>> >>> N?rrebrogade 44, >>> >>> 8000, Aarhus C >>> >>> Mail: andreasg at phys.au.dk >>> >>> Cell: +45 3165 8140 >>> >>> >>> >>> 2016-09-16 16:13 GMT+02:00 Simon Rit : >>> >>>> Hi, >>>> You can try any iterative reconstruction, they can also handle short >>>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>>> However, the nature of the artifacts indicate more a problem in the >>>> geometry in my opinion. I have seen such errors when, for example, rotating >>>> in the wrong direction. I can have a look if you share the dataset. >>>> Cheers, >>>> Simon >>>> >>>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>>> andreasg at phys.au.dk> wrote: >>>> >>>>> Thanks for the suggestions, Simon and Cyril! >>>>> >>>>> I have been carefully looking though the geometry and from what I >>>>> understand of the transformations matrices, the geometry looks correct/(as >>>>> expected). >>>>> >>>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>>> were because had used half-fan scans (full-arc). >>>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>>> artifacts occurs! >>>>> >>>>> Are there other (built-in) means of improving half-arc scans, than the >>>>> parker short scan filter? >>>>> >>>>> Parker short scan does a decent job, but the result is still far from >>>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>>> >>>>> Best regards >>>>> Andreas >>>>> >>>>> >>>>> __________________________________ >>>>> >>>>> Andreas Gravgaard Andersen >>>>> >>>>> Department of Oncology, >>>>> >>>>> Aarhus University Hospital >>>>> >>>>> N?rrebrogade 44, >>>>> >>>>> 8000, Aarhus C >>>>> >>>>> Mail: andreasg at phys.au.dk >>>>> >>>>> Cell: +45 3165 8140 >>>>> >>>>> >>>>> >>>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory >>>>> : >>>>> >>>>>> One suggestion since it works with the Hnd projections: >>>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>>> Xim projections) and output two projection stack files and two geometry >>>>>> files, then compare the projection stack files by subtracting one to the >>>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>>> are identical, then I do not see any reason why the reconstructions should >>>>>> be different, so my guess is that you will find differences. >>>>>> >>>>>> >>>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>>> >>>>>>> Hi, >>>>>>> I have almost never worked with Varian data but it looks like a >>>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>>> projections which results in assigning a bad geometry to each >>>>>>> projection. How did you name your projections? Maybe check that the >>>>>>> order matches that of the RTK geometry file. Otherwise, there might >>>>>>> be >>>>>>> an issue in the creation of the geometry file itself. >>>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>>> code when you feel it's ready. >>>>>>> Simon >>>>>>> >>>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>>> wrote: >>>>>>> >>>>>>>> Dear RTK experts, >>>>>>>> >>>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>>> format. I >>>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>>> available with RTK. >>>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>>> >>>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>>> in UI), >>>>>>>> however when reconstructing with a regular FDK I get a >>>>>>>> reconstructed image >>>>>>>> that is smeared out around the high and low density areas [see >>>>>>>> attached >>>>>>>> image] >>>>>>>> >>>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>>> Scripps >>>>>>>> (~520 projections). Fixed detector and source (offset=0) with >>>>>>>> SID=2m, >>>>>>>> SDD=3m. >>>>>>>> >>>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>>> algorithm). >>>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>>> software works >>>>>>>> perfectly. >>>>>>>> >>>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>>> creates >>>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>>> If the first few projections are excluded, the following projection >>>>>>>> will act >>>>>>>> the same way. >>>>>>>> >>>>>>>> The projections are corrected for beam hardening and all the >>>>>>>> projections >>>>>>>> have the expected attenuation. >>>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>>> reconstruction >>>>>>>> makes the same artifacts. >>>>>>>> >>>>>>>> Setting the value of the first and last projection to zero has the >>>>>>>> same >>>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>>> not the >>>>>>>> artifacts. >>>>>>>> >>>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>>> >>>>>>>> Best regards >>>>>>>> Andreas >>>>>>>> >>>>>>>> __________________________________ >>>>>>>> >>>>>>>> Andreas Gravgaard Andersen >>>>>>>> >>>>>>>> Department of Oncology, >>>>>>>> >>>>>>>> Aarhus University Hospital >>>>>>>> >>>>>>>> N?rrebrogade 44, >>>>>>>> >>>>>>>> 8000, Aarhus C >>>>>>>> >>>>>>>> Mail: andreasg at phys.au.dk >>>>>>>> >>>>>>>> Cell: +45 3165 8140 >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rtk-users mailing list >>>>>>>> Rtk-users at public.kitware.com >>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From w_ettehadi at yahoo.com Tue Nov 1 12:50:12 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Tue, 1 Nov 2016 16:50:12 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> Message-ID: <1400014065.1872614.1478019012480@mail.yahoo.com> Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards,Vahid -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 02:53:39 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 07:53:39 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1400014065.1872614.1478019012480@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> Message-ID: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: > Hello RTK users and developers, > > I already implemented the RTK and reconstructed some images with the > FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. > Now, I am trying to develop a model-based image reconstruction for our > cone-beam micro-CT. I see already that some iterative algorithms like > ART and its modifications and conjugate-gradient (CG) method are > implemented in the RTK. I want to develop a model-based reconstruction > through the Newton/quasi-Newton optimizations methods. I was wondering > is it possible to extract the gradient of least square function from > implemented algorithms like CG module? Any recommendation will be > appreciated. > > Best Regards, > Vahid > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Wed Nov 2 04:01:30 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 08:01:30 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have tried but I am not getting where to give --division 4 in my code. Please find my code given below and please let me know where I need to change in my code to make it work. int _tmain(int argc, _TCHAR* argv[]) { #pragma region "Variable declaration" const double PI = 3.14159265358979323846; float *angles; int nProj = 349; typedef unsigned short pixelType; typedef float OutpixelType; const int dimension = 3; typedef itk::Image imageType; typedef itk::ImageRegionConstIterator ImageIteratorType; imageType::Pointer Projections = imageType::New(); #pragma endregion "Variable declaration" Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); imageType::SpacingType pSpacing; pSpacing[0] = 0.2960; pSpacing[1] = 0.2960; pSpacing[2] = 0.2960; Projections->SetSpacing(pSpacing); imageType::PointType pOrigin; pOrigin[0] = -212.972; pOrigin[1] = -212.972; pOrigin[2] = -212.972; //-158.50; Projections->SetOrigin(pOrigin); Projections->Update(); //Read angles. char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; angles = new float[nProj]; angles = readAngles(angles_file, angles); #pragma region"Geometry" // Geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); for (unsigned int noProj = 0; noProj < nProj; noProj++) { geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // } typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); geometryWriter->SetFilename("D:\\geo.xml"); geometryWriter->SetObject(geometry); geometryWriter->WriteFile(); geometry->Update(); #pragma endregion "Geometry" //Define output image type #ifdef USE_CUDA typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #else typedef itk::Image OutPutImageType; typedef rtk::ParkerShortScanImageFilter PSSFType; typedef rtk::FDKConeBeamReconstructionFilter FDKType; #endif //ScatterCorrection typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); ScatterCorrection->SetInput(Projections); //VarianObiRawImageFilter typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); //Create the output image typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; ConstantImageSourceType::PointType origin_p; ConstantImageSourceType::SizeType size_p; ConstantImageSourceType::SpacingType spacing_p; ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); origin_p[0] = -127.5; origin_p[1] = -127.5; origin_p[2] = -127.5; size_p[0] = 512; size_p[1] = 512; size_p[2] = 512; spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); projectionsSource->SetOrigin(origin_p); projectionsSource->SetSpacing(spacing_p); projectionsSource->SetSize(size_p); projectionsSource->SetConstant(0); // Short scan image filter PSSFType::Pointer pssf = PSSFType::New(); pssf->SetInput(AttenuationFilter->GetOutput()); pssf->SetGeometry(geometry); pssf->InPlaceOff(); std::cout << "short scan image filter success" << std::endl; FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput(0, projectionsSource->GetOutput()); feldkamp->SetInput(1, pssf->GetOutput()); feldkamp->SetGeometry(geometry); feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); feldkamp->GetRampFilter()->SetHammingFrequency(5.0); feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); feldkamp->SetGPUEnabled(1); feldkamp->SetNumberOfThreads(10000); #pragma region "Write volume" //Create a raw io for writing itk::RawImageIO::Pointer io; io = itk::RawImageIO::New(); for (unsigned int i = 0; i < dimension; i++) { io->SetDimensions(i, size_p[i]); io->SetSpacing(i, spacing_p[i]); io->SetOrigin(i, origin_p[i]); } io->SetHeaderSize(0); io->SetByteOrderToLittleEndian(); io->SetPixelType(itk::ImageIOBase::SCALAR); io->SetNumberOfComponents(1); io->SetNumberOfDimensions(3); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(feldkamp->GetOutput()); try { writer->Update(); } catch (itk::ExceptionObject & excp) { std::cerr << "Error while writing the image " << std::endl; std::cerr << excp << std::endl; getchar(); } #pragma endregion "WriteVolume" delete[] angles; return 0; } Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > I was able to perform a reconstruction from your header and geometry > file, using the following command lines: > > rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > --phantomscale "128,128,128" --like Output.mhd > > rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > The first computes projections through a Shepp & Logan phantom, with the > same size, spacing, origin, etc... as your projections, using your > geometry file geo.xml. > > The second line performs the FDK reconstruction. I had to use both the > "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > on a Geforce GTX 780). "--lowmem" loads the projections into memory by > subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > parts, reconstructs them one by one, then assembles the results. Can you > run the same commands and let us know whether you still encounter the > crash you mentioned ? If it works, you can use your own projection data > in the second command line instead of "simulatedprojections.mha". > > Best, > > Cyril > > On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > > Dear Sir, > > > > Please find the Header file in the attachment. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> We do not need the projections file, at least not for a first stage of > >> error tracking. We only need the header. > >> Try the following command line: > >> > >> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >> > >> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >> what we need, and it is a very light text file. The "proj.raw" contains > >> the pixel values, but at the moment we do not need them. We will create > >> our own proj.raw file, filled with zeros, which should be enough to > >> track down the error you encounter. > >> > >> Looking forward to receiving your file, > >> Cyril > >> > >> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>> Dear Sir, > >>> > >>> The single raw file of the projections is 1.4 GB and we are > not > >> able to send this big file to you. Can you please suggest other > alternatives > >> for this? > >>> Or can you provide us the PC configuration to solve the > issue? > >>> > >>> Let me know if any other clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Hello Zahid, > >>>> > >>>> We will need the header of your projections file, too (It is best if > you > >>>> have all your projections as a single .mhd and a single .raw file, so > it > >>>> should be 3-D image, and you send only the .mhd file). > >>>> > >>>> Regards, > >>>> Cyril > >>>> > >>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> > >>>>> I have only used RTK version 1.3.0. but in the error > >>>> message it is showing RTK version 1.2.0. > >>>>> Please find the attachment of the geometry file of > our > >>>> projections. > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> Without some more information, it's unlikely that we find the source > of > >>>>>> the problem. Here are a few things you can do to help us (and > therefore > >>>>>> yourself): > >>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > the > >>>>>> Cuda forward and back projection filters since v1.2.0, so your > problem > >>>>>> might disappear just by upgrading to the new version > >>>>>> - create a small example that reproduces your problem. You can, for > >>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>> example). And send us the script > >>>>>> - OR send us your geometry file and the header of your projections > file > >>>>>> (no need to send the projection data itself, we'll create a > zero-filled > >>>>>> stack of projections), and the command line that crashes > >>>>>> > >>>>>> Best regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Simon Rit, > >>>>>>> > >>>>>>> Please find the screen shot in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> Senior Design Engineer > >>>>>>> Mobile No. +91-9738379729 > >>>>>>> > >>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>> http://www.panaceamedical.com > >>>>>>> Bangalore - India. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>> Cc: rtk-users at public.kitware.com > >> [mailto:rtk-users at public.kitware.com], > >>>>>> saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>> memory > >>>>>>>> error. If you use the command line tool rtkfdk, you should first > make > >>>>>> sure > >>>>>>>> that you use the --lowmem option to stream the projection images. > If > >> it > >>>>>> is > >>>>>>>> no sufficient, you can split your volume using the --divisions. The > >>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of > >> RTK > >>>> on > >>>>>>>> our case studies webpage > >>>>>> . > >>>>>>>> Simon > >>>>>>>> > >>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>> > >>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>> > >>>>>>>>>> I am unable to do 1024x1024x1024 > reconstruction > >>>> using > >>>>>> RTK > >>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > shoot > >> of > >>>>>>>>> the > >>>>>>>>>> same. > >>>>>>>>>> > >>>>>>>>>> I am using the following items given below. > >>>>>>>>>> > >>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >> application > >>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>> 5. CUDA 7. > >>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>> > >>>>>>>>>> Please provide the solution of this and let me > >> know > >>>> if > >>>>>>>> any > >>>>>>>>>> other clarification is required. > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> Thanks & Regards > >>>>>>>>>> > >>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>> Senior Design Engineer > >>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>> > >>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>> Bangalore - India. > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> ____________________________________________________________ > >>>>>>>>> ________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> Rtk-users mailing list > >>>>>>> Rtk-users at public.kitware.com > >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 04:33:32 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 09:33:32 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> References: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Message-ID: <398170fb-a69e-9781-73d5-2a419542d06d@creatis.insa-lyon.fr> Dear Zahid, The --divisions is an option of the command-line application rtkfdk. It is not directly an option of the FDKConeBeamReconstructionFilter : rather, it is passed to a streaming filter at the end of the pipeline. Look for the following bit of code in rtkfdk.cxx : // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput( pfeldkamp ); streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); You can find information on how a streaming filter works on this page: https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html I hope it helps, Cyril On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have tried but I am not getting where to give --division 4 in my code. > > > Please find my code given below and please let me know where I need to change in my code to make it work. > > > int _tmain(int argc, _TCHAR* argv[]) > { > #pragma region "Variable declaration" > const double PI = 3.14159265358979323846; > float *angles; > int nProj = 349; > typedef unsigned short pixelType; > typedef float OutpixelType; > const int dimension = 3; > typedef itk::Image imageType; > typedef itk::ImageRegionConstIterator ImageIteratorType; > imageType::Pointer Projections = imageType::New(); > > #pragma endregion "Variable declaration" > > Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > imageType::SpacingType pSpacing; > pSpacing[0] = 0.2960; > pSpacing[1] = 0.2960; > pSpacing[2] = 0.2960; > Projections->SetSpacing(pSpacing); > > imageType::PointType pOrigin; > pOrigin[0] = -212.972; > pOrigin[1] = -212.972; > pOrigin[2] = -212.972; //-158.50; > Projections->SetOrigin(pOrigin); > > Projections->Update(); > > //Read angles. > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > angles = new float[nProj]; > angles = readAngles(angles_file, angles); > > #pragma region"Geometry" > // Geometry object > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > GeometryType::Pointer geometry = GeometryType::New(); > for (unsigned int noProj = 0; noProj < nProj; noProj++) > { > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // > } > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > geometryWriter->SetFilename("D:\\geo.xml"); > geometryWriter->SetObject(geometry); > geometryWriter->WriteFile(); > geometry->Update(); > #pragma endregion "Geometry" > > //Define output image type > > #ifdef USE_CUDA > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > #else > typedef itk::Image OutPutImageType; > typedef rtk::ParkerShortScanImageFilter PSSFType; > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > #endif > > //ScatterCorrection > typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); > ScatterCorrection->SetInput(Projections); > > //VarianObiRawImageFilter > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; > RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > //Create the output image > typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; > ConstantImageSourceType::PointType origin_p; > ConstantImageSourceType::SizeType size_p; > ConstantImageSourceType::SpacingType spacing_p; > ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); > origin_p[0] = -127.5; > origin_p[1] = -127.5; > origin_p[2] = -127.5; > size_p[0] = 512; > size_p[1] = 512; > size_p[2] = 512; > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > projectionsSource->SetOrigin(origin_p); > projectionsSource->SetSpacing(spacing_p); > projectionsSource->SetSize(size_p); > projectionsSource->SetConstant(0); > > // Short scan image filter > PSSFType::Pointer pssf = PSSFType::New(); > pssf->SetInput(AttenuationFilter->GetOutput()); > pssf->SetGeometry(geometry); > pssf->InPlaceOff(); > std::cout << "short scan image filter success" << std::endl; > > FDKType::Pointer feldkamp = FDKType::New(); > feldkamp->SetInput(0, projectionsSource->GetOutput()); > feldkamp->SetInput(1, pssf->GetOutput()); > feldkamp->SetGeometry(geometry); > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > feldkamp->SetGPUEnabled(1); > feldkamp->SetNumberOfThreads(10000); > > #pragma region "Write volume" > > //Create a raw io for writing > > itk::RawImageIO::Pointer io; > io = itk::RawImageIO::New(); > > for (unsigned int i = 0; i < dimension; i++) > { > io->SetDimensions(i, size_p[i]); > io->SetSpacing(i, spacing_p[i]); > io->SetOrigin(i, origin_p[i]); > } > io->SetHeaderSize(0); > io->SetByteOrderToLittleEndian(); > io->SetPixelType(itk::ImageIOBase::SCALAR); > io->SetNumberOfComponents(1); > io->SetNumberOfDimensions(3); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(feldkamp->GetOutput()); > > try > { > writer->Update(); > } > catch (itk::ExceptionObject & excp) > { > std::cerr << "Error while writing the image " << std::endl; > std::cerr << excp << std::endl; > getchar(); > } > #pragma endregion "WriteVolume" > delete[] angles; > return 0; > } > > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> I was able to perform a reconstruction from your header and geometry >> file, using the following command lines: >> >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> --phantomscale "128,128,128" --like Output.mhd >> >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> >> The first computes projections through a Shepp & Logan phantom, with the >> same size, spacing, origin, etc... as your projections, using your >> geometry file geo.xml. >> >> The second line performs the FDK reconstruction. I had to use both the >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> parts, reconstructs them one by one, then assembles the results. Can you >> run the same commands and let us know whether you still encounter the >> crash you mentioned ? If it works, you can use your own projection data >> in the second command line instead of "simulatedprojections.mha". >> >> Best, >> >> Cyril >> >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> >>> Dear Sir, >>> >>> Please find the Header file in the attachment. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> We do not need the projections file, at least not for a first stage of >>>> error tracking. We only need the header. >>>> Try the following command line: >>>> >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>> >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>> what we need, and it is a very light text file. The "proj.raw" contains >>>> the pixel values, but at the moment we do not need them. We will create >>>> our own proj.raw file, filled with zeros, which should be enough to >>>> track down the error you encounter. >>>> >>>> Looking forward to receiving your file, >>>> Cyril >>>> >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>> Dear Sir, >>>>> >>>>> The single raw file of the projections is 1.4 GB and we are >> not >>>> able to send this big file to you. Can you please suggest other >> alternatives >>>> for this? >>>>> Or can you provide us the PC configuration to solve the >> issue? >>>>> Let me know if any other clarification is required. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Hello Zahid, >>>>>> >>>>>> We will need the header of your projections file, too (It is best if >> you >>>>>> have all your projections as a single .mhd and a single .raw file, so >> it >>>>>> should be 3-D image, and you send only the .mhd file). >>>>>> >>>>>> Regards, >>>>>> Cyril >>>>>> >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>> Dear Cyril Mory, >>>>>>> >>>>>>> >>>>>>> I have only used RTK version 1.3.0. but in the error >>>>>> message it is showing RTK version 1.2.0. >>>>>>> Please find the attachment of the geometry file of >> our >>>>>> projections. >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> Without some more information, it's unlikely that we find the source >> of >>>>>>>> the problem. Here are a few things you can do to help us (and >> therefore >>>>>>>> yourself): >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >> the >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >> problem >>>>>>>> might disappear just by upgrading to the new version >>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>> example). And send us the script >>>>>>>> - OR send us your geometry file and the header of your projections >> file >>>>>>>> (no need to send the projection data itself, we'll create a >> zero-filled >>>>>>>> stack of projections), and the command line that crashes >>>>>>>> >>>>>>>> Best regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Simon Rit, >>>>>>>>> >>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> Senior Design Engineer >>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>> >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>> http://www.panaceamedical.com >>>>>>>>> Bangalore - India. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>> Cc: rtk-users at public.kitware.com >>>> [mailto:rtk-users at public.kitware.com], >>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>> memory >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >> make >>>>>>>> sure >>>>>>>>>> that you use the --lowmem option to stream the projection images. >> If >>>> it >>>>>>>> is >>>>>>>>>> no sufficient, you can split your volume using the --divisions. The >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of >>>> RTK >>>>>> on >>>>>>>>>> our case studies webpage >>>>>>>> . >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>> >>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>> >>>>>>>>>>>> I am unable to do 1024x1024x1024 >> reconstruction >>>>>> using >>>>>>>> RTK >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >> shoot >>>> of >>>>>>>>>>> the >>>>>>>>>>>> same. >>>>>>>>>>>> >>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>> >>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>> application >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>> >>>>>>>>>>>> Please provide the solution of this and let me >>>> know >>>>>> if >>>>>>>>>> any >>>>>>>>>>>> other clarification is required. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>> >>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>> >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>> Bangalore - India. >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>> ________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rtk-users mailing list >>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 06:57:15 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 10:57:15 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. Please check my modified file writer code given below. // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput(feldkamp->GetOutput()); streamerBP->SetNumberOfStreamDivisions(4); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(streamerBP->GetOutput()); writer->SetNumberOfStreamDivisions(4); Please let me know if any clarification is required. Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The --divisions is an option of the command-line application rtkfdk. It > is not directly an option of the FDKConeBeamReconstructionFilter : > rather, it is passed to a streaming filter at the end of the pipeline. > Look for the following bit of code in rtkfdk.cxx : > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter CPUOutputImageType> StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput( pfeldkamp ); > streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > > You can find information on how a streaming filter works on this page: > > https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > I hope it helps, > > Cyril > > On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have tried but I am not getting where to give > --division 4 in my code. > > > > > > Please find my code given below and please let me know > where I need to change in my code to make it work. > > > > > > int _tmain(int argc, _TCHAR* argv[]) > > { > > #pragma region "Variable declaration" > > const double PI = 3.14159265358979323846; > > float *angles; > > int nProj = 349; > > typedef unsigned short pixelType; > > typedef float OutpixelType; > > const int dimension = 3; > > typedef itk::Image imageType; > > typedef itk::ImageRegionConstIterator ImageIteratorType; > > imageType::Pointer Projections = imageType::New(); > > > > #pragma endregion "Variable declaration" > > > > Projections = > ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > > imageType::SpacingType pSpacing; > > pSpacing[0] = 0.2960; > > pSpacing[1] = 0.2960; > > pSpacing[2] = 0.2960; > > Projections->SetSpacing(pSpacing); > > > > imageType::PointType pOrigin; > > pOrigin[0] = -212.972; > > pOrigin[1] = -212.972; > > pOrigin[2] = -212.972; //-158.50; > > Projections->SetOrigin(pOrigin); > > > > Projections->Update(); > > > > //Read angles. > > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > angles = new float[nProj]; > > angles = readAngles(angles_file, angles); > > > > #pragma region"Geometry" > > // Geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > for (unsigned int noProj = 0; noProj < nProj; noProj++) > > { > > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); > // 136 half fan //2.07 Kidwai // > > } > > > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > GeometryWriterType; > > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > > geometryWriter->SetFilename("D:\\geo.xml"); > > geometryWriter->SetObject(geometry); > > geometryWriter->WriteFile(); > > geometry->Update(); > > #pragma endregion "Geometry" > > > > //Define output image type > > > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef itk::Image OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter PSSFType; > > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > > #endif > > > > //ScatterCorrection > > typedef rtk::BoellaardScatterCorrectionImageFilter > BoellaardScatterCorrectionImageFilterType; > > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > BoellaardScatterCorrectionImageFilterType::New(); > > ScatterCorrection->SetInput(Projections); > > > > //VarianObiRawImageFilter > > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > RawImageFilterType; > > RawImageFilterType::Pointer AttenuationFilter = > RawImageFilterType::New(); > > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > > > //Create the output image > > typedef rtk::ConstantImageSource< OutPutImageType > > ConstantImageSourceType; > > ConstantImageSourceType::PointType origin_p; > > ConstantImageSourceType::SizeType size_p; > > ConstantImageSourceType::SpacingType spacing_p; > > ConstantImageSourceType::Pointer projectionsSource = > ConstantImageSourceType::New(); > > origin_p[0] = -127.5; > > origin_p[1] = -127.5; > > origin_p[2] = -127.5; > > size_p[0] = 512; > > size_p[1] = 512; > > size_p[2] = 512; > > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > > > projectionsSource->SetOrigin(origin_p); > > projectionsSource->SetSpacing(spacing_p); > > projectionsSource->SetSize(size_p); > > projectionsSource->SetConstant(0); > > > > // Short scan image filter > > PSSFType::Pointer pssf = PSSFType::New(); > > pssf->SetInput(AttenuationFilter->GetOutput()); > > pssf->SetGeometry(geometry); > > pssf->InPlaceOff(); > > std::cout << "short scan image filter success" << std::endl; > > > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput(0, projectionsSource->GetOutput()); > > feldkamp->SetInput(1, pssf->GetOutput()); > > feldkamp->SetGeometry(geometry); > > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > feldkamp->SetGPUEnabled(1); > > feldkamp->SetNumberOfThreads(10000); > > > > #pragma region "Write volume" > > > > //Create a raw io for writing > > > > itk::RawImageIO::Pointer io; > > io = itk::RawImageIO::New(); > > > > for (unsigned int i = 0; i < dimension; i++) > > { > > io->SetDimensions(i, size_p[i]); > > io->SetSpacing(i, spacing_p[i]); > > io->SetOrigin(i, origin_p[i]); > > } > > io->SetHeaderSize(0); > > io->SetByteOrderToLittleEndian(); > > io->SetPixelType(itk::ImageIOBase::SCALAR); > > io->SetNumberOfComponents(1); > > io->SetNumberOfDimensions(3); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(feldkamp->GetOutput()); > > > > try > > { > > writer->Update(); > > } > > catch (itk::ExceptionObject & excp) > > { > > std::cerr << "Error while writing the image " << std::endl; > > std::cerr << excp << std::endl; > > getchar(); > > } > > #pragma endregion "WriteVolume" > > delete[] angles; > > return 0; > > } > > > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> I was able to perform a reconstruction from your header and geometry > >> file, using the following command lines: > >> > >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >> --phantomscale "128,128,128" --like Output.mhd > >> > >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >> > >> The first computes projections through a Shepp & Logan phantom, with the > >> same size, spacing, origin, etc... as your projections, using your > >> geometry file geo.xml. > >> > >> The second line performs the FDK reconstruction. I had to use both the > >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >> parts, reconstructs them one by one, then assembles the results. Can you > >> run the same commands and let us know whether you still encounter the > >> crash you mentioned ? If it works, you can use your own projection data > >> in the second command line instead of "simulatedprojections.mha". > >> > >> Best, > >> > >> Cyril > >> > >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >> > >>> Dear Sir, > >>> > >>> Please find the Header file in the attachment. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> We do not need the projections file, at least not for a first stage of > >>>> error tracking. We only need the header. > >>>> Try the following command line: > >>>> > >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>> > >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>> what we need, and it is a very light text file. The "proj.raw" contains > >>>> the pixel values, but at the moment we do not need them. We will create > >>>> our own proj.raw file, filled with zeros, which should be enough to > >>>> track down the error you encounter. > >>>> > >>>> Looking forward to receiving your file, > >>>> Cyril > >>>> > >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Sir, > >>>>> > >>>>> The single raw file of the projections is 1.4 GB and we > are > >> not > >>>> able to send this big file to you. Can you please suggest other > >> alternatives > >>>> for this? > >>>>> Or can you provide us the PC configuration to solve the > >> issue? > >>>>> Let me know if any other clarification is required. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Hello Zahid, > >>>>>> > >>>>>> We will need the header of your projections file, too (It is best if > >> you > >>>>>> have all your projections as a single .mhd and a single .raw file, so > >> it > >>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>> > >>>>>> Regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Cyril Mory, > >>>>>>> > >>>>>>> > >>>>>>> I have only used RTK version 1.3.0. but in the > error > >>>>>> message it is showing RTK version 1.2.0. > >>>>>>> Please find the attachment of the geometry file > of > >> our > >>>>>> projections. > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> Without some more information, it's unlikely that we find the > source > >> of > >>>>>>>> the problem. Here are a few things you can do to help us (and > >> therefore > >>>>>>>> yourself): > >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > >> the > >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >> problem > >>>>>>>> might disappear just by upgrading to the new version > >>>>>>>> - create a small example that reproduces your problem. You can, for > >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>> example). And send us the script > >>>>>>>> - OR send us your geometry file and the header of your projections > >> file > >>>>>>>> (no need to send the projection data itself, we'll create a > >> zero-filled > >>>>>>>> stack of projections), and the command line that crashes > >>>>>>>> > >>>>>>>> Best regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Simon Rit, > >>>>>>>>> > >>>>>>>>> Please find the screen shot in the attachment. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> Senior Design Engineer > >>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>> > >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>> http://www.panaceamedical.com > >>>>>>>>> Bangalore - India. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>> Cc: rtk-users at public.kitware.com > >>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>>>> memory > >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first > >> make > >>>>>>>> sure > >>>>>>>>>> that you use the --lowmem option to stream the projection images. > >> If > >>>> it > >>>>>>>> is > >>>>>>>>>> no sufficient, you can split your volume using the --divisions. > The > >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > of > >>>> RTK > >>>>>> on > >>>>>>>>>> our case studies webpage > >>>>>>>> . > >>>>>>>>>> Simon > >>>>>>>>>> > >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>> > >>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>> > >>>>>>>>>>>> I am unable to do 1024x1024x1024 > >> reconstruction > >>>>>> using > >>>>>>>> RTK > >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >> shoot > >>>> of > >>>>>>>>>>> the > >>>>>>>>>>>> same. > >>>>>>>>>>>> > >>>>>>>>>>>> I am using the following items given below. > >>>>>>>>>>>> > >>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>> application > >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>> > >>>>>>>>>>>> Please provide the solution of this and let > me > >>>> know > >>>>>> if > >>>>>>>>>> any > >>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>> > >>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>> > >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>> ________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 08:27:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 13:27:18 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> References: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Message-ID: <84154ed0-3cb8-abf7-c253-3162d78bf7b7@creatis.insa-lyon.fr> I see two errors: Remove this line writer->SetNumberOfStreamDivisions(4); since only the streaming filter, not the write filter, needs to know about the number of divisions. And change the filename to "D:\\Output.mhd" It will write both the .mhd and the .raw files. I hope it helps, Cyril On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. > > Please check my modified file writer code given below. > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput(feldkamp->GetOutput()); > streamerBP->SetNumberOfStreamDivisions(4); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(streamerBP->GetOutput()); > writer->SetNumberOfStreamDivisions(4); > > > Please let me know if any clarification is required. > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> The --divisions is an option of the command-line application rtkfdk. It >> is not directly an option of the FDKConeBeamReconstructionFilter : >> rather, it is passed to a streaming filter at the end of the pipeline. >> Look for the following bit of code in rtkfdk.cxx : >> >> // Streaming depending on streaming capability of writer >> typedef itk::StreamingImageFilter> CPUOutputImageType> StreamerType; >> StreamerType::Pointer streamerBP = StreamerType::New(); >> streamerBP->SetInput( pfeldkamp ); >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >> >> You can find information on how a streaming filter works on this page: >> >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> >> I hope it helps, >> >> Cyril >> >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have tried but I am not getting where to give >> --division 4 in my code. >>> >>> Please find my code given below and please let me know >> where I need to change in my code to make it work. >>> >>> int _tmain(int argc, _TCHAR* argv[]) >>> { >>> #pragma region "Variable declaration" >>> const double PI = 3.14159265358979323846; >>> float *angles; >>> int nProj = 349; >>> typedef unsigned short pixelType; >>> typedef float OutpixelType; >>> const int dimension = 3; >>> typedef itk::Image imageType; >>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>> imageType::Pointer Projections = imageType::New(); >>> >>> #pragma endregion "Variable declaration" >>> >>> Projections = >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); >>> imageType::SpacingType pSpacing; >>> pSpacing[0] = 0.2960; >>> pSpacing[1] = 0.2960; >>> pSpacing[2] = 0.2960; >>> Projections->SetSpacing(pSpacing); >>> >>> imageType::PointType pOrigin; >>> pOrigin[0] = -212.972; >>> pOrigin[1] = -212.972; >>> pOrigin[2] = -212.972; //-158.50; >>> Projections->SetOrigin(pOrigin); >>> >>> Projections->Update(); >>> >>> //Read angles. >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>> angles = new float[nProj]; >>> angles = readAngles(angles_file, angles); >>> >>> #pragma region"Geometry" >>> // Geometry object >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> GeometryType::Pointer geometry = GeometryType::New(); >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>> { >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); >> // 136 half fan //2.07 Kidwai // >>> } >>> >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> GeometryWriterType; >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>> geometryWriter->SetFilename("D:\\geo.xml"); >>> geometryWriter->SetObject(geometry); >>> geometryWriter->WriteFile(); >>> geometry->Update(); >>> #pragma endregion "Geometry" >>> >>> //Define output image type >>> >>> #ifdef USE_CUDA >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> #else >>> typedef itk::Image OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>> #endif >>> >>> //ScatterCorrection >>> typedef rtk::BoellaardScatterCorrectionImageFilter >> BoellaardScatterCorrectionImageFilterType; >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >> BoellaardScatterCorrectionImageFilterType::New(); >>> ScatterCorrection->SetInput(Projections); >>> >>> //VarianObiRawImageFilter >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> RawImageFilterType; >>> RawImageFilterType::Pointer AttenuationFilter = >> RawImageFilterType::New(); >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>> >>> //Create the output image >>> typedef rtk::ConstantImageSource< OutPutImageType > >> ConstantImageSourceType; >>> ConstantImageSourceType::PointType origin_p; >>> ConstantImageSourceType::SizeType size_p; >>> ConstantImageSourceType::SpacingType spacing_p; >>> ConstantImageSourceType::Pointer projectionsSource = >> ConstantImageSourceType::New(); >>> origin_p[0] = -127.5; >>> origin_p[1] = -127.5; >>> origin_p[2] = -127.5; >>> size_p[0] = 512; >>> size_p[1] = 512; >>> size_p[2] = 512; >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>> >>> projectionsSource->SetOrigin(origin_p); >>> projectionsSource->SetSpacing(spacing_p); >>> projectionsSource->SetSize(size_p); >>> projectionsSource->SetConstant(0); >>> >>> // Short scan image filter >>> PSSFType::Pointer pssf = PSSFType::New(); >>> pssf->SetInput(AttenuationFilter->GetOutput()); >>> pssf->SetGeometry(geometry); >>> pssf->InPlaceOff(); >>> std::cout << "short scan image filter success" << std::endl; >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>> feldkamp->SetInput(1, pssf->GetOutput()); >>> feldkamp->SetGeometry(geometry); >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>> feldkamp->SetGPUEnabled(1); >>> feldkamp->SetNumberOfThreads(10000); >>> >>> #pragma region "Write volume" >>> >>> //Create a raw io for writing >>> >>> itk::RawImageIO::Pointer io; >>> io = itk::RawImageIO::New(); >>> >>> for (unsigned int i = 0; i < dimension; i++) >>> { >>> io->SetDimensions(i, size_p[i]); >>> io->SetSpacing(i, spacing_p[i]); >>> io->SetOrigin(i, origin_p[i]); >>> } >>> io->SetHeaderSize(0); >>> io->SetByteOrderToLittleEndian(); >>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>> io->SetNumberOfComponents(1); >>> io->SetNumberOfDimensions(3); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(feldkamp->GetOutput()); >>> >>> try >>> { >>> writer->Update(); >>> } >>> catch (itk::ExceptionObject & excp) >>> { >>> std::cerr << "Error while writing the image " << std::endl; >>> std::cerr << excp << std::endl; >>> getchar(); >>> } >>> #pragma endregion "WriteVolume" >>> delete[] angles; >>> return 0; >>> } >>> >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> I was able to perform a reconstruction from your header and geometry >>>> file, using the following command lines: >>>> >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>> --phantomscale "128,128,128" --like Output.mhd >>>> >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>> >>>> The first computes projections through a Shepp & Logan phantom, with the >>>> same size, spacing, origin, etc... as your projections, using your >>>> geometry file geo.xml. >>>> >>>> The second line performs the FDK reconstruction. I had to use both the >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>> parts, reconstructs them one by one, then assembles the results. Can you >>>> run the same commands and let us know whether you still encounter the >>>> crash you mentioned ? If it works, you can use your own projection data >>>> in the second command line instead of "simulatedprojections.mha". >>>> >>>> Best, >>>> >>>> Cyril >>>> >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>> >>>>> Dear Sir, >>>>> >>>>> Please find the Header file in the attachment. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> We do not need the projections file, at least not for a first stage of >>>>>> error tracking. We only need the header. >>>>>> Try the following command line: >>>>>> >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>> >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>> what we need, and it is a very light text file. The "proj.raw" contains >>>>>> the pixel values, but at the moment we do not need them. We will create >>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>> track down the error you encounter. >>>>>> >>>>>> Looking forward to receiving your file, >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>> Dear Sir, >>>>>>> >>>>>>> The single raw file of the projections is 1.4 GB and we >> are >>>> not >>>>>> able to send this big file to you. Can you please suggest other >>>> alternatives >>>>>> for this? >>>>>>> Or can you provide us the PC configuration to solve the >>>> issue? >>>>>>> Let me know if any other clarification is required. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Hello Zahid, >>>>>>>> >>>>>>>> We will need the header of your projections file, too (It is best if >>>> you >>>>>>>> have all your projections as a single .mhd and a single .raw file, so >>>> it >>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>> >>>>>>>> Regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Cyril Mory, >>>>>>>>> >>>>>>>>> >>>>>>>>> I have only used RTK version 1.3.0. but in the >> error >>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>> Please find the attachment of the geometry file >> of >>>> our >>>>>>>> projections. >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> >>>>>>>>>> Without some more information, it's unlikely that we find the >> source >>>> of >>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>> therefore >>>>>>>>>> yourself): >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >>>> the >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>> problem >>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>> example). And send us the script >>>>>>>>>> - OR send us your geometry file and the header of your projections >>>> file >>>>>>>>>> (no need to send the projection data itself, we'll create a >>>> zero-filled >>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>> >>>>>>>>>> Best regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>> >>>>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> Senior Design Engineer >>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>> >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>> Bangalore - India. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>>>> memory >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >>>> make >>>>>>>>>> sure >>>>>>>>>>>> that you use the --lowmem option to stream the projection images. >>>> If >>>>>> it >>>>>>>>>> is >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >> The >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >> of >>>>>> RTK >>>>>>>> on >>>>>>>>>>>> our case studies webpage >>>>>>>>>> . >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>> reconstruction >>>>>>>> using >>>>>>>>>> RTK >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>> shoot >>>>>> of >>>>>>>>>>>>> the >>>>>>>>>>>>>> same. >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>>>> >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>> application >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Please provide the solution of this and let >> me >>>>>> know >>>>>>>> if >>>>>>>>>>>> any >>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>> >>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>> >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url >> : >>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>> ________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>> >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>>>> >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 09:37:23 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 13:37:23 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. Please suggest us for further process. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > I see two errors: > > Remove this line > > writer->SetNumberOfStreamDivisions(4); > > since only the streaming filter, not the write filter, needs to know > about the number of divisions. > And change the filename to > > "D:\\Output.mhd" > > It will write both the .mhd and the .raw files. > > I hope it helps, > Cyril > > On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have modified my file writer code and used > StreamingImageFilter. Now its not giving any error message but the final > output is 0 byte for 1024 volume. It working fine for 512 volume. > > > > Please check my modified file writer code given below. > > > > // Streaming depending on streaming capability of writer > > typedef itk::StreamingImageFilter > StreamerType; > > StreamerType::Pointer streamerBP = StreamerType::New(); > > streamerBP->SetInput(feldkamp->GetOutput()); > > streamerBP->SetNumberOfStreamDivisions(4); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(streamerBP->GetOutput()); > > writer->SetNumberOfStreamDivisions(4); > > > > > > Please let me know if any clarification is required. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> The --divisions is an option of the command-line application rtkfdk. It > >> is not directly an option of the FDKConeBeamReconstructionFilter : > >> rather, it is passed to a streaming filter at the end of the pipeline. > >> Look for the following bit of code in rtkfdk.cxx : > >> > >> // Streaming depending on streaming capability of writer > >> typedef itk::StreamingImageFilter >> CPUOutputImageType> StreamerType; > >> StreamerType::Pointer streamerBP = StreamerType::New(); > >> streamerBP->SetInput( pfeldkamp ); > >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >> > >> You can find information on how a streaming filter works on this page: > >> > >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >> > >> I hope it helps, > >> > >> Cyril > >> > >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have tried but I am not getting where to give > >> --division 4 in my code. > >>> > >>> Please find my code given below and please let me know > >> where I need to change in my code to make it work. > >>> > >>> int _tmain(int argc, _TCHAR* argv[]) > >>> { > >>> #pragma region "Variable declaration" > >>> const double PI = 3.14159265358979323846; > >>> float *angles; > >>> int nProj = 349; > >>> typedef unsigned short pixelType; > >>> typedef float OutpixelType; > >>> const int dimension = 3; > >>> typedef itk::Image imageType; > >>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>> imageType::Pointer Projections = imageType::New(); > >>> > >>> #pragma endregion "Variable declaration" > >>> > >>> Projections = > >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > nProj); > >>> imageType::SpacingType pSpacing; > >>> pSpacing[0] = 0.2960; > >>> pSpacing[1] = 0.2960; > >>> pSpacing[2] = 0.2960; > >>> Projections->SetSpacing(pSpacing); > >>> > >>> imageType::PointType pOrigin; > >>> pOrigin[0] = -212.972; > >>> pOrigin[1] = -212.972; > >>> pOrigin[2] = -212.972; //-158.50; > >>> Projections->SetOrigin(pOrigin); > >>> > >>> Projections->Update(); > >>> > >>> //Read angles. > >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>> angles = new float[nProj]; > >>> angles = readAngles(angles_file, angles); > >>> > >>> #pragma region"Geometry" > >>> // Geometry object > >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>> GeometryType::Pointer geometry = GeometryType::New(); > >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>> { > >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > 0); > >> // 136 half fan //2.07 Kidwai // > >>> } > >>> > >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >> GeometryWriterType; > >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > >>> geometryWriter->SetFilename("D:\\geo.xml"); > >>> geometryWriter->SetObject(geometry); > >>> geometryWriter->WriteFile(); > >>> geometry->Update(); > >>> #pragma endregion "Geometry" > >>> > >>> //Define output image type > >>> > >>> #ifdef USE_CUDA > >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>> #else > >>> typedef itk::Image OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; > >>> #endif > >>> > >>> //ScatterCorrection > >>> typedef rtk::BoellaardScatterCorrectionImageFilter > > >> BoellaardScatterCorrectionImageFilterType; > >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > >> BoellaardScatterCorrectionImageFilterType::New(); > >>> ScatterCorrection->SetInput(Projections); > >>> > >>> //VarianObiRawImageFilter > >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >> RawImageFilterType; > >>> RawImageFilterType::Pointer AttenuationFilter = > >> RawImageFilterType::New(); > >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>> > >>> //Create the output image > >>> typedef rtk::ConstantImageSource< OutPutImageType > > >> ConstantImageSourceType; > >>> ConstantImageSourceType::PointType origin_p; > >>> ConstantImageSourceType::SizeType size_p; > >>> ConstantImageSourceType::SpacingType spacing_p; > >>> ConstantImageSourceType::Pointer projectionsSource = > >> ConstantImageSourceType::New(); > >>> origin_p[0] = -127.5; > >>> origin_p[1] = -127.5; > >>> origin_p[2] = -127.5; > >>> size_p[0] = 512; > >>> size_p[1] = 512; > >>> size_p[2] = 512; > >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>> > >>> projectionsSource->SetOrigin(origin_p); > >>> projectionsSource->SetSpacing(spacing_p); > >>> projectionsSource->SetSize(size_p); > >>> projectionsSource->SetConstant(0); > >>> > >>> // Short scan image filter > >>> PSSFType::Pointer pssf = PSSFType::New(); > >>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>> pssf->SetGeometry(geometry); > >>> pssf->InPlaceOff(); > >>> std::cout << "short scan image filter success" << std::endl; > >>> > >>> FDKType::Pointer feldkamp = FDKType::New(); > >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>> feldkamp->SetInput(1, pssf->GetOutput()); > >>> feldkamp->SetGeometry(geometry); > >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>> feldkamp->SetGPUEnabled(1); > >>> feldkamp->SetNumberOfThreads(10000); > >>> > >>> #pragma region "Write volume" > >>> > >>> //Create a raw io for writing > >>> > >>> itk::RawImageIO::Pointer io; > >>> io = itk::RawImageIO::New(); > >>> > >>> for (unsigned int i = 0; i < dimension; i++) > >>> { > >>> io->SetDimensions(i, size_p[i]); > >>> io->SetSpacing(i, spacing_p[i]); > >>> io->SetOrigin(i, origin_p[i]); > >>> } > >>> io->SetHeaderSize(0); > >>> io->SetByteOrderToLittleEndian(); > >>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>> io->SetNumberOfComponents(1); > >>> io->SetNumberOfDimensions(3); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(feldkamp->GetOutput()); > >>> > >>> try > >>> { > >>> writer->Update(); > >>> } > >>> catch (itk::ExceptionObject & excp) > >>> { > >>> std::cerr << "Error while writing the image " << std::endl; > >>> std::cerr << excp << std::endl; > >>> getchar(); > >>> } > >>> #pragma endregion "WriteVolume" > >>> delete[] angles; > >>> return 0; > >>> } > >>> > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> I was able to perform a reconstruction from your header and geometry > >>>> file, using the following command lines: > >>>> > >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>> --phantomscale "128,128,128" --like Output.mhd > >>>> > >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > --hardware > >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>> > >>>> The first computes projections through a Shepp & Logan phantom, with > the > >>>> same size, spacing, origin, etc... as your projections, using your > >>>> geometry file geo.xml. > >>>> > >>>> The second line performs the FDK reconstruction. I had to use both the > >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>> parts, reconstructs them one by one, then assembles the results. Can > you > >>>> run the same commands and let us know whether you still encounter the > >>>> crash you mentioned ? If it works, you can use your own projection data > >>>> in the second command line instead of "simulatedprojections.mha". > >>>> > >>>> Best, > >>>> > >>>> Cyril > >>>> > >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>> > >>>>> Dear Sir, > >>>>> > >>>>> Please find the Header file in the attachment. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> We do not need the projections file, at least not for a first stage > of > >>>>>> error tracking. We only need the header. > >>>>>> Try the following command line: > >>>>>> > >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>> > >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>>>> what we need, and it is a very light text file. The "proj.raw" > contains > >>>>>> the pixel values, but at the moment we do not need them. We will > create > >>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>> track down the error you encounter. > >>>>>> > >>>>>> Looking forward to receiving your file, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> The single raw file of the projections is 1.4 GB and > we > >> are > >>>> not > >>>>>> able to send this big file to you. Can you please suggest other > >>>> alternatives > >>>>>> for this? > >>>>>>> Or can you provide us the PC configuration to solve > the > >>>> issue? > >>>>>>> Let me know if any other clarification is required. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Hello Zahid, > >>>>>>>> > >>>>>>>> We will need the header of your projections file, too (It is best > if > >>>> you > >>>>>>>> have all your projections as a single .mhd and a single .raw file, > so > >>>> it > >>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>> > >>>>>>>> Regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Cyril Mory, > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> I have only used RTK version 1.3.0. but in the > >> error > >>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>> Please find the attachment of the geometry > file > >> of > >>>> our > >>>>>>>> projections. > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> > >>>>>>>>>> Without some more information, it's unlikely that we find the > >> source > >>>> of > >>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>> therefore > >>>>>>>>>> yourself): > >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes > in > >>>> the > >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>> problem > >>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>> - create a small example that reproduces your problem. You can, > for > >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > logan > >>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>>>> example). And send us the script > >>>>>>>>>> - OR send us your geometry file and the header of your > projections > >>>> file > >>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>> zero-filled > >>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>> > >>>>>>>>>> Best regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>> > >>>>>>>>>>> Please find the screen shot in the > attachment. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>> > >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > CUDA > >>>>>>>> memory > >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > first > >>>> make > >>>>>>>>>> sure > >>>>>>>>>>>> that you use the --lowmem option to stream the projection > images. > >>>> If > >>>>>> it > >>>>>>>>>> is > >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. > >> The > >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > >> of > >>>>>> RTK > >>>>>>>> on > >>>>>>>>>>>> our case studies webpage > >>>>>>>>>> . > >>>>>>>>>>>> Simon > >>>>>>>>>>>> > >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>> reconstruction > >>>>>>>> using > >>>>>>>>>> RTK > >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >>>> shoot > >>>>>> of > >>>>>>>>>>>>> the > >>>>>>>>>>>>>> same. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am using the following items given > below. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>>>> application > >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Please provide the solution of this and > let > >> me > >>>>>> know > >>>>>>>> if > >>>>>>>>>>>> any > >>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, > >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > >> : > >>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>> ________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>> > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: RTK_Error.png Type: image/png Size: 57211 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 10:00:50 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 15:00:50 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> References: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Message-ID: <94e0045d-ef88-726d-9b7b-8b5ebf5ac067@creatis.insa-lyon.fr> Dear Zahid, The output looks correct. If the command line solution I suggested in a previous email works, the best way to move forward would be to compare your code and that of rtkfdk.cxx, and where it differs, make sure you have not introduced an error. Cyril On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. > > Please suggest us for further process. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> I see two errors: >> >> Remove this line >> >> writer->SetNumberOfStreamDivisions(4); >> >> since only the streaming filter, not the write filter, needs to know >> about the number of divisions. >> And change the filename to >> >> "D:\\Output.mhd" >> >> It will write both the .mhd and the .raw files. >> >> I hope it helps, >> Cyril >> >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have modified my file writer code and used >> StreamingImageFilter. Now its not giving any error message but the final >> output is 0 byte for 1024 volume. It working fine for 512 volume. >>> Please check my modified file writer code given below. >>> >>> // Streaming depending on streaming capability of writer >>> typedef itk::StreamingImageFilter >> StreamerType; >>> StreamerType::Pointer streamerBP = StreamerType::New(); >>> streamerBP->SetInput(feldkamp->GetOutput()); >>> streamerBP->SetNumberOfStreamDivisions(4); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(streamerBP->GetOutput()); >>> writer->SetNumberOfStreamDivisions(4); >>> >>> >>> Please let me know if any clarification is required. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> The --divisions is an option of the command-line application rtkfdk. It >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >>>> rather, it is passed to a streaming filter at the end of the pipeline. >>>> Look for the following bit of code in rtkfdk.cxx : >>>> >>>> // Streaming depending on streaming capability of writer >>>> typedef itk::StreamingImageFilter>>> CPUOutputImageType> StreamerType; >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >>>> streamerBP->SetInput( pfeldkamp ); >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >>>> >>>> You can find information on how a streaming filter works on this page: >>>> >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >>>> >>>> I hope it helps, >>>> >>>> Cyril >>>> >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>>>> Dear Cyril Mory, >>>>> >>>>> I have tried but I am not getting where to give >>>> --division 4 in my code. >>>>> Please find my code given below and please let me know >>>> where I need to change in my code to make it work. >>>>> int _tmain(int argc, _TCHAR* argv[]) >>>>> { >>>>> #pragma region "Variable declaration" >>>>> const double PI = 3.14159265358979323846; >>>>> float *angles; >>>>> int nProj = 349; >>>>> typedef unsigned short pixelType; >>>>> typedef float OutpixelType; >>>>> const int dimension = 3; >>>>> typedef itk::Image imageType; >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>>>> imageType::Pointer Projections = imageType::New(); >>>>> >>>>> #pragma endregion "Variable declaration" >>>>> >>>>> Projections = >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> nProj); >>>>> imageType::SpacingType pSpacing; >>>>> pSpacing[0] = 0.2960; >>>>> pSpacing[1] = 0.2960; >>>>> pSpacing[2] = 0.2960; >>>>> Projections->SetSpacing(pSpacing); >>>>> >>>>> imageType::PointType pOrigin; >>>>> pOrigin[0] = -212.972; >>>>> pOrigin[1] = -212.972; >>>>> pOrigin[2] = -212.972; //-158.50; >>>>> Projections->SetOrigin(pOrigin); >>>>> >>>>> Projections->Update(); >>>>> >>>>> //Read angles. >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>>>> angles = new float[nProj]; >>>>> angles = readAngles(angles_file, angles); >>>>> >>>>> #pragma region"Geometry" >>>>> // Geometry object >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>>>> { >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, >> 0); >>>> // 136 half fan //2.07 Kidwai // >>>>> } >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >>>> GeometryWriterType; >>>>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >>>>> geometryWriter->SetObject(geometry); >>>>> geometryWriter->WriteFile(); >>>>> geometry->Update(); >>>>> #pragma endregion "Geometry" >>>>> >>>>> //Define output image type >>>>> >>>>> #ifdef USE_CUDA >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> #else >>>>> typedef itk::Image OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>>>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>>>> #endif >>>>> >>>>> //ScatterCorrection >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter>>> BoellaardScatterCorrectionImageFilterType; >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >>>> BoellaardScatterCorrectionImageFilterType::New(); >>>>> ScatterCorrection->SetInput(Projections); >>>>> >>>>> //VarianObiRawImageFilter >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >>>> RawImageFilterType; >>>>> RawImageFilterType::Pointer AttenuationFilter = >>>> RawImageFilterType::New(); >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>>>> >>>>> //Create the output image >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >>>> ConstantImageSourceType; >>>>> ConstantImageSourceType::PointType origin_p; >>>>> ConstantImageSourceType::SizeType size_p; >>>>> ConstantImageSourceType::SpacingType spacing_p; >>>>> ConstantImageSourceType::Pointer projectionsSource = >>>> ConstantImageSourceType::New(); >>>>> origin_p[0] = -127.5; >>>>> origin_p[1] = -127.5; >>>>> origin_p[2] = -127.5; >>>>> size_p[0] = 512; >>>>> size_p[1] = 512; >>>>> size_p[2] = 512; >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>>>> >>>>> projectionsSource->SetOrigin(origin_p); >>>>> projectionsSource->SetSpacing(spacing_p); >>>>> projectionsSource->SetSize(size_p); >>>>> projectionsSource->SetConstant(0); >>>>> >>>>> // Short scan image filter >>>>> PSSFType::Pointer pssf = PSSFType::New(); >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >>>>> pssf->SetGeometry(geometry); >>>>> pssf->InPlaceOff(); >>>>> std::cout << "short scan image filter success" << std::endl; >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >>>>> feldkamp->SetGeometry(geometry); >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>>>> feldkamp->SetGPUEnabled(1); >>>>> feldkamp->SetNumberOfThreads(10000); >>>>> >>>>> #pragma region "Write volume" >>>>> >>>>> //Create a raw io for writing >>>>> >>>>> itk::RawImageIO::Pointer io; >>>>> io = itk::RawImageIO::New(); >>>>> >>>>> for (unsigned int i = 0; i < dimension; i++) >>>>> { >>>>> io->SetDimensions(i, size_p[i]); >>>>> io->SetSpacing(i, spacing_p[i]); >>>>> io->SetOrigin(i, origin_p[i]); >>>>> } >>>>> io->SetHeaderSize(0); >>>>> io->SetByteOrderToLittleEndian(); >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>>>> io->SetNumberOfComponents(1); >>>>> io->SetNumberOfDimensions(3); >>>>> >>>>> //create a writer and write reconstructed file >>>>> itk::ImageFileWriter::Pointer writer; >>>>> writer = itk::ImageFileWriter::New(); >>>>> writer->SetFileName("D:\\Output.raw"); >>>>> writer->SetImageIO(io); >>>>> writer->SetInput(feldkamp->GetOutput()); >>>>> >>>>> try >>>>> { >>>>> writer->Update(); >>>>> } >>>>> catch (itk::ExceptionObject & excp) >>>>> { >>>>> std::cerr << "Error while writing the image " << std::endl; >>>>> std::cerr << excp << std::endl; >>>>> getchar(); >>>>> } >>>>> #pragma endregion "WriteVolume" >>>>> delete[] angles; >>>>> return 0; >>>>> } >>>>> >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> Senior Design Engineer >>>>> Mobile No. +91-9738379729 >>>>> >>>>> Panacea Medical Technologies Pvt. Ltd. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>> http://www.panaceamedical.com >>>>> Bangalore - India. >>>>> >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> I was able to perform a reconstruction from your header and geometry >>>>>> file, using the following command lines: >>>>>> >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>>>> --phantomscale "128,128,128" --like Output.mhd >>>>>> >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> --hardware >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>>>> >>>>>> The first computes projections through a Shepp & Logan phantom, with >> the >>>>>> same size, spacing, origin, etc... as your projections, using your >>>>>> geometry file geo.xml. >>>>>> >>>>>> The second line performs the FDK reconstruction. I had to use both the >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>>>> parts, reconstructs them one by one, then assembles the results. Can >> you >>>>>> run the same commands and let us know whether you still encounter the >>>>>> crash you mentioned ? If it works, you can use your own projection data >>>>>> in the second command line instead of "simulatedprojections.mha". >>>>>> >>>>>> Best, >>>>>> >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>>>> >>>>>>> Dear Sir, >>>>>>> >>>>>>> Please find the Header file in the attachment. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> We do not need the projections file, at least not for a first stage >> of >>>>>>>> error tracking. We only need the header. >>>>>>>> Try the following command line: >>>>>>>> >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>>>> >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> contains >>>>>>>> the pixel values, but at the moment we do not need them. We will >> create >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>>>> track down the error you encounter. >>>>>>>> >>>>>>>> Looking forward to receiving your file, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Sir, >>>>>>>>> >>>>>>>>> The single raw file of the projections is 1.4 GB and >> we >>>> are >>>>>> not >>>>>>>> able to send this big file to you. Can you please suggest other >>>>>> alternatives >>>>>>>> for this? >>>>>>>>> Or can you provide us the PC configuration to solve >> the >>>>>> issue? >>>>>>>>> Let me know if any other clarification is required. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Hello Zahid, >>>>>>>>>> >>>>>>>>>> We will need the header of your projections file, too (It is best >> if >>>>>> you >>>>>>>>>> have all your projections as a single .mhd and a single .raw file, >> so >>>>>> it >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Cyril Mory, >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I have only used RTK version 1.3.0. but in the >>>> error >>>>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>>>> Please find the attachment of the geometry >> file >>>> of >>>>>> our >>>>>>>>>> projections. >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >>>> Simon >>>>>>>> Rit >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> >>>>>>>>>>>> Without some more information, it's unlikely that we find the >>>> source >>>>>> of >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>>>> therefore >>>>>>>>>>>> yourself): >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes >> in >>>>>> the >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>>>> problem >>>>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>>>> - create a small example that reproduces your problem. You can, >> for >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> logan >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>>>> example). And send us the script >>>>>>>>>>>> - OR send us your geometry file and the header of your >> projections >>>>>> file >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >>>>>> zero-filled >>>>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>>>> >>>>>>>>>>>> Best regards, >>>>>>>>>>>> Cyril >>>>>>>>>>>> >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>>>> >>>>>>>>>>>>> Please find the screen shot in the >> attachment. >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>> >>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>> >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a >> CUDA >>>>>>>>>> memory >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> first >>>>>> make >>>>>>>>>>>> sure >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> images. >>>>>> If >>>>>>>> it >>>>>>>>>>>> is >>>>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >>>> The >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >>>> of >>>>>>>> RTK >>>>>>>>>> on >>>>>>>>>>>>>> our case studies webpage >>>>>>>>>>>> . >>>>>>>>>>>>>> Simon >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>>>> reconstruction >>>>>>>>>> using >>>>>>>>>>>> RTK >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>>>> shoot >>>>>>>> of >>>>>>>>>>>>>>> the >>>>>>>>>>>>>>>> same. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am using the following items given >> below. >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>>>> application >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Please provide the solution of this and >> let >>>> me >>>>>>>> know >>>>>>>>>> if >>>>>>>>>>>>>> any >>>>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >>>> : >>>>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>>>> ________________ >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> This email and any files transmitted with it are confidential >>>> and >>>>>>>>>>>> intended >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >>>>>>>>>>>> addressed. >>>>>>>>>>>>>>> If you have received this email in error please notify the >>>> system >>>>>>>>>>>> manager. >>>>>>>>>>>>>>> Please note that any views or opinions presented in this email >>>> are >>>>>>>>>>>> solely >>>>>>>>>>>>>>> those of the author and do not necessarily represent those of >>>> the >>>>>>>>>>>> company. >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >>>> attachments >>>>>>>> for >>>>>>>>>>>> the >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>>>> damage >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>>>> >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >>> >>> >> >> > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Wed Nov 2 22:38:38 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 02:38:38 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Message-ID: <24189134.77160.1478140718379@mail.yahoo.com> Hello Simon and Cyril,Thanks for the reply.You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do.Thanks again for the reply. @Cyril:Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards,Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 02:05:51 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 06:05:51 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103060551.f7bfa0c3@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, Thank you for your help. We are able to reconstruct 1024 volume now. But the reconstruction time is around 4 minutes. Can you please help us to reduce the reconstruction time? We are using NVIDIA TITAN X GPU which has 12 GB memory. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The output looks correct. > > If the command line solution I suggested in a previous email works, the > best way to move forward would be to compare your code and that of > rtkfdk.cxx, and where it differs, make sure you have not introduced an > error. > > Cyril > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have done the same but the Output.mhd file is still 0 > KB for 1024 volume. Please find the attachment of the status of the output > displayed. > > > > Please suggest us for further process. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> I see two errors: > >> > >> Remove this line > >> > >> writer->SetNumberOfStreamDivisions(4); > >> > >> since only the streaming filter, not the write filter, needs to know > >> about the number of divisions. > >> And change the filename to > >> > >> "D:\\Output.mhd" > >> > >> It will write both the .mhd and the .raw files. > >> > >> I hope it helps, > >> Cyril > >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have modified my file writer code and used > >> StreamingImageFilter. Now its not giving any error message but the final > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > >>> Please check my modified file writer code given below. > >>> > >>> // Streaming depending on streaming capability of writer > >>> typedef itk::StreamingImageFilter > >> StreamerType; > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>> streamerBP->SetInput(feldkamp->GetOutput()); > >>> streamerBP->SetNumberOfStreamDivisions(4); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(streamerBP->GetOutput()); > >>> writer->SetNumberOfStreamDivisions(4); > >>> > >>> > >>> Please let me know if any clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> The --divisions is an option of the command-line application rtkfdk. It > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > >>>> rather, it is passed to a streaming filter at the end of the pipeline. > >>>> Look for the following bit of code in rtkfdk.cxx : > >>>> > >>>> // Streaming depending on streaming capability of writer > >>>> typedef itk::StreamingImageFilter >>>> CPUOutputImageType> StreamerType; > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>>> streamerBP->SetInput( pfeldkamp ); > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >>>> > >>>> You can find information on how a streaming filter works on this page: > >>>> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >>>> > >>>> I hope it helps, > >>>> > >>>> Cyril > >>>> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> I have tried but I am not getting where to give > >>>> --division 4 in my code. > >>>>> Please find my code given below and please let me > know > >>>> where I need to change in my code to make it work. > >>>>> int _tmain(int argc, _TCHAR* argv[]) > >>>>> { > >>>>> #pragma region "Variable declaration" > >>>>> const double PI = 3.14159265358979323846; > >>>>> float *angles; > >>>>> int nProj = 349; > >>>>> typedef unsigned short pixelType; > >>>>> typedef float OutpixelType; > >>>>> const int dimension = 3; > >>>>> typedef itk::Image imageType; > >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>>>> imageType::Pointer Projections = imageType::New(); > >>>>> > >>>>> #pragma endregion "Variable declaration" > >>>>> > >>>>> Projections = > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > >> nProj); > >>>>> imageType::SpacingType pSpacing; > >>>>> pSpacing[0] = 0.2960; > >>>>> pSpacing[1] = 0.2960; > >>>>> pSpacing[2] = 0.2960; > >>>>> Projections->SetSpacing(pSpacing); > >>>>> > >>>>> imageType::PointType pOrigin; > >>>>> pOrigin[0] = -212.972; > >>>>> pOrigin[1] = -212.972; > >>>>> pOrigin[2] = -212.972; //-158.50; > >>>>> Projections->SetOrigin(pOrigin); > >>>>> > >>>>> Projections->Update(); > >>>>> > >>>>> //Read angles. > >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>>>> angles = new float[nProj]; > >>>>> angles = readAngles(angles_file, angles); > >>>>> > >>>>> #pragma region"Geometry" > >>>>> // Geometry object > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>>>> { > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > >> 0); > >>>> // 136 half fan //2.07 Kidwai // > >>>>> } > >>>>> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >>>> GeometryWriterType; > >>>>> GeometryWriterType::Pointer geometryWriter = > GeometryWriterType::New(); > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > >>>>> geometryWriter->SetObject(geometry); > >>>>> geometryWriter->WriteFile(); > >>>>> geometry->Update(); > >>>>> #pragma endregion "Geometry" > >>>>> > >>>>> //Define output image type > >>>>> > >>>>> #ifdef USE_CUDA > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>>>> #else > >>>>> typedef itk::Image OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > FDKType; > >>>>> #endif > >>>>> > >>>>> //ScatterCorrection > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter imageType > >>>> BoellaardScatterCorrectionImageFilterType; > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection > = > >>>> BoellaardScatterCorrectionImageFilterType::New(); > >>>>> ScatterCorrection->SetInput(Projections); > >>>>> > >>>>> //VarianObiRawImageFilter > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >>>> RawImageFilterType; > >>>>> RawImageFilterType::Pointer AttenuationFilter = > >>>> RawImageFilterType::New(); > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>>>> > >>>>> //Create the output image > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > >>>> ConstantImageSourceType; > >>>>> ConstantImageSourceType::PointType origin_p; > >>>>> ConstantImageSourceType::SizeType size_p; > >>>>> ConstantImageSourceType::SpacingType spacing_p; > >>>>> ConstantImageSourceType::Pointer projectionsSource = > >>>> ConstantImageSourceType::New(); > >>>>> origin_p[0] = -127.5; > >>>>> origin_p[1] = -127.5; > >>>>> origin_p[2] = -127.5; > >>>>> size_p[0] = 512; > >>>>> size_p[1] = 512; > >>>>> size_p[2] = 512; > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>>>> > >>>>> projectionsSource->SetOrigin(origin_p); > >>>>> projectionsSource->SetSpacing(spacing_p); > >>>>> projectionsSource->SetSize(size_p); > >>>>> projectionsSource->SetConstant(0); > >>>>> > >>>>> // Short scan image filter > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>>>> pssf->SetGeometry(geometry); > >>>>> pssf->InPlaceOff(); > >>>>> std::cout << "short scan image filter success" << std::endl; > >>>>> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > >>>>> feldkamp->SetGeometry(geometry); > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>>>> feldkamp->SetGPUEnabled(1); > >>>>> feldkamp->SetNumberOfThreads(10000); > >>>>> > >>>>> #pragma region "Write volume" > >>>>> > >>>>> //Create a raw io for writing > >>>>> > >>>>> itk::RawImageIO::Pointer io; > >>>>> io = itk::RawImageIO::New(); > >>>>> > >>>>> for (unsigned int i = 0; i < dimension; i++) > >>>>> { > >>>>> io->SetDimensions(i, size_p[i]); > >>>>> io->SetSpacing(i, spacing_p[i]); > >>>>> io->SetOrigin(i, origin_p[i]); > >>>>> } > >>>>> io->SetHeaderSize(0); > >>>>> io->SetByteOrderToLittleEndian(); > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>>>> io->SetNumberOfComponents(1); > >>>>> io->SetNumberOfDimensions(3); > >>>>> > >>>>> //create a writer and write reconstructed file > >>>>> itk::ImageFileWriter::Pointer writer; > >>>>> writer = itk::ImageFileWriter::New(); > >>>>> writer->SetFileName("D:\\Output.raw"); > >>>>> writer->SetImageIO(io); > >>>>> writer->SetInput(feldkamp->GetOutput()); > >>>>> > >>>>> try > >>>>> { > >>>>> writer->Update(); > >>>>> } > >>>>> catch (itk::ExceptionObject & excp) > >>>>> { > >>>>> std::cerr << "Error while writing the image " << std::endl; > >>>>> std::cerr << excp << std::endl; > >>>>> getchar(); > >>>>> } > >>>>> #pragma endregion "WriteVolume" > >>>>> delete[] angles; > >>>>> return 0; > >>>>> } > >>>>> > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> Senior Design Engineer > >>>>> Mobile No. +91-9738379729 > >>>>> > >>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>> http://www.panaceamedical.com > >>>>> Bangalore - India. > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> I was able to perform a reconstruction from your header and geometry > >>>>>> file, using the following command lines: > >>>>>> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>>>> --phantomscale "128,128,128" --like Output.mhd > >>>>>> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > >> --hardware > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>>>> > >>>>>> The first computes projections through a Shepp & Logan phantom, with > >> the > >>>>>> same size, spacing, origin, etc... as your projections, using your > >>>>>> geometry file geo.xml. > >>>>>> > >>>>>> The second line performs the FDK reconstruction. I had to use both > the > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > (3GB, > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > by > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>>>> parts, reconstructs them one by one, then assembles the results. Can > >> you > >>>>>> run the same commands and let us know whether you still encounter the > >>>>>> crash you mentioned ? If it works, you can use your own projection > data > >>>>>> in the second command line instead of "simulatedprojections.mha". > >>>>>> > >>>>>> Best, > >>>>>> > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>>>> > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> Please find the Header file in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> We do not need the projections file, at least not for a first stage > >> of > >>>>>>>> error tracking. We only need the header. > >>>>>>>> Try the following command line: > >>>>>>>> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>>>> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file > is > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > >> contains > >>>>>>>> the pixel values, but at the moment we do not need them. We will > >> create > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>>>> track down the error you encounter. > >>>>>>>> > >>>>>>>> Looking forward to receiving your file, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Sir, > >>>>>>>>> > >>>>>>>>> The single raw file of the projections is 1.4 GB > and > >> we > >>>> are > >>>>>> not > >>>>>>>> able to send this big file to you. Can you please suggest other > >>>>>> alternatives > >>>>>>>> for this? > >>>>>>>>> Or can you provide us the PC configuration to solve > >> the > >>>>>> issue? > >>>>>>>>> Let me know if any other clarification is required. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Hello Zahid, > >>>>>>>>>> > >>>>>>>>>> We will need the header of your projections file, too (It is best > >> if > >>>>>> you > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > file, > >> so > >>>>>> it > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>>>> > >>>>>>>>>> Regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Cyril Mory, > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> I have only used RTK version 1.3.0. but in > the > >>>> error > >>>>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>>>> Please find the attachment of the geometry > >> file > >>>> of > >>>>>> our > >>>>>>>>>> projections. > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >>>> Simon > >>>>>>>> Rit > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > >>>> source > >>>>>> of > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>>>> therefore > >>>>>>>>>>>> yourself): > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > changes > >> in > >>>>>> the > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>>>> problem > >>>>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>>>> - create a small example that reproduces your problem. You can, > >> for > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > >> logan > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > an > >>>>>>>>>>>> example). And send us the script > >>>>>>>>>>>> - OR send us your geometry file and the header of your > >> projections > >>>>>> file > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>>>> zero-filled > >>>>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>>>> > >>>>>>>>>>>> Best regards, > >>>>>>>>>>>> Cyril > >>>>>>>>>>>> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>>>> > >>>>>>>>>>>>> Please find the screen shot in the > >> attachment. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>> > >>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > >> CUDA > >>>>>>>>>> memory > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > >> first > >>>>>> make > >>>>>>>>>>>> sure > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > >> images. > >>>>>> If > >>>>>>>> it > >>>>>>>>>>>> is > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > --divisions. > >>>> The > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > use > >>>> of > >>>>>>>> RTK > >>>>>>>>>> on > >>>>>>>>>>>>>> our case studies webpage > >>>>>>>>>>>> . > >>>>>>>>>>>>>> Simon > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>>>> reconstruction > >>>>>>>>>> using > >>>>>>>>>>>> RTK > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > screen > >>>>>> shoot > >>>>>>>> of > >>>>>>>>>>>>>>> the > >>>>>>>>>>>>>>>> same. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am using the following items given > >> below. > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > console > >>>>>>>> application > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Please provide the solution of this > and > >> let > >>>> me > >>>>>>>> know > >>>>>>>>>> if > >>>>>>>>>>>>>> any > >>>>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > >> Url > >>>> : > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>>>> ________________ > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> This email and any files transmitted with it are > confidential > >>>> and > >>>>>>>>>>>> intended > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they > >> are > >>>>>>>>>>>> addressed. > >>>>>>>>>>>>>>> If you have received this email in error please notify the > >>>> system > >>>>>>>>>>>> manager. > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > email > >>>> are > >>>>>>>>>>>> solely > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > of > >>>> the > >>>>>>>>>>>> company. > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > >>>> attachments > >>>>>>>> for > >>>>>>>>>>>> the > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > >>>>>> damage > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>>>> > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Thu Nov 3 02:23:25 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 3 Nov 2016 07:23:25 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <24189134.77160.1478140718379@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> Message-ID: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): {\begin{aligned}&\mathbf {r} _{0}:=\mathbf {b} -\mathbf {Ax} _{0}\\&\mathbf {p} _{0}:=\mathbf {r} _{0}\\&k:=0\\&{\hbox{repeat}}\\&\qquad \alpha _{k}:={\frac {\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}{\mathbf {p} _{k}^{\mathsf {T}}\mathbf {Ap} _{k}}}\\&\qquad \mathbf {x} _{k+1}:=\mathbf {x} _{k}+\alpha _{k}\mathbf {p} _{k}\\&\qquad \mathbf {r} _{k+1}:=\mathbf {r} _{k}-\alpha _{k}\mathbf {Ap} _{k}\\&\qquad {\hbox{if }}r_{k+1}{\hbox{ is sufficiently small then exit loop}}\\&\qquad \beta _{k}:={\frac {\mathbf {r} _{k+1}^{\mathsf {T}}\mathbf {r} _{k+1}}{\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}}\\&\qquad \mathbf {p} _{k+1}:=\mathbf {r} _{k+1}+\beta _{k}\mathbf {p} _{k}\\&\qquad k:=k+1\\&{\hbox{end repeat}}\\&{\hbox{The result is }}\mathbf {x} _{k+1}\end{aligned}} In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: > Hello Simon and Cyril, > Thanks for the reply. > You are right Simon. I did not notice it too in the literature. The > main problem as you said is the storage. Actually I developed the > conjugate gradient (CG), quasi-Newton and Newton optimization methods > for optical tomography and I intended to apply them to the CT > reconstruction as well. I implemented the Newton's methods > (Gauss-Newton and Levenberg-Marquardt) in a > Jacobian-Free-Newton-Krylov approaches to avoid the matrix > multiplication of Jacobians (sensitivity). It means we only need to > store the Jacobian matrix for the these methods (the matrix R that > Cyril was mentioned), that is still a big matrix for practical > problems in CT reconstruction. For the quasi-Newton I adapted an > L-BFGS algorithm that only need the 3 or 8 last iterations of the > gradient vector to calculate the Hessian matrix. In my case, the > L-BFGS and Newton's methods was much faster than the CG as you know > because of using the second order derivative (hessian matrix). I saw > in your last paper you implement the conjugate gradient method, so I > thought it might be easy to extract the gradient vector from CG > modules and solve the cost function within the quasi-Newton/Newton > methods. I will look at the codes to see what I can do. > Thanks again for the reply. > > @Cyril: > Please correct me if I am wrong. you mean the output of > backProjectionFilter is the gradient of defined cost function? > > Regards, > Vahid > > > On Wednesday, November 2, 2016 2:53 AM, Cyril Mory > wrote: > > > Hi Vahid, > Welcome to RTK :) > Indeed, there are several iterative methods already implemented in > RTK, but none of the filters allows you to easily extract the gradient > of the least squares function there are minimizing. > If you need to minimize the classical non-regularized tomographic cost > function, ie || R f - p ||?, with R the forward projection operator, f > the volume you are looking for, and p the measured projections, my > best advice would be to copy some part of the pipeline of > rtkSARTConeBeamReconstructionFilter to get the job done, ie the > following part (copy-paste this into webgraphviz.com) > > digraph SARTConeBeamReconstructionFilter { > > Input0 [ label="Input 0 (Volume)"]; > Input0 [shape=Mdiamond]; > Input1 [label="Input 1 (Projections)"]; > Input1 [shape=Mdiamond]; > > node [shape=box]; > ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref > rtk::ForwardProjectionImageFilter"]; > Extract [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref > itk::MultiplyImageFilter"]; > AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; > Subtract [ label="itk::SubtractImageFilter" URL="\ref > itk::SubtractImageFilter"]; > MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" > URL="\ref itk::MultiplyImageFilter"]; > Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref > itk::DivideOrZeroOutImageFilter"]; > GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" > URL="\ref itk::MultiplyImageFilter", style=dashed]; > Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref > rtk::DisplacedDetectorImageFilter"]; > ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref > rtk::RayBoxIntersectionImageFilter"]; > ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref > rtk::BackProjectionImageFilter"]; > OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; > OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; > Input0 -> OutofInput0 [arrowhead=none]; > OutofInput0 -> ForwardProject; > ConstantVolume -> BeforeBP [arrowhead=none]; > BeforeBP -> BackProjection; > Extract -> AfterExtract[arrowhead=none]; > AfterExtract -> MultiplyByZero; > AfterExtract -> Subtract; > MultiplyByZero -> ForwardProject; > Input1 -> Extract; > ForwardProject -> Subtract; > Subtract -> MultiplyByLambda; > MultiplyByLambda -> Divide; > Divide -> GatingWeight; > GatingWeight -> Displaced; > ConstantProjectionStack -> ExtractConstantProjection; > ExtractConstantProjection -> RayBox; > RayBox -> Divide; > Displaced -> BackProjection; > BackProjection -> OutofBP [arrowhead=none]; > } > > As you can see, it is a very large part of the SART reconstruction > filter, so yoiu might be better off just copying the whole > SARTConeBeamReconstructionFilter and modifying it. > > Of course, you could also look into ITK's cost function class, and see > if one of the classes inherited from it suits your needs, implement > your cost function this way, and use ITK's off-the-shelf solvers to > minimize it. See the inheritance diagram in > https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if > you want to try this approach. > > Best regards, > Cyril > > On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >> Hello RTK users and developers, >> >> I already implemented the RTK and reconstructed some images with the >> FDK algorithm implemented in RTK. It works well. Thanks to RTK >> developers. >> Now, I am trying to develop a model-based image reconstruction for >> our cone-beam micro-CT. I see already that some iterative algorithms >> like ART and its modifications and conjugate-gradient (CG) method are >> implemented in the RTK. I want to develop a model-based >> reconstruction through the Newton/quasi-Newton optimizations methods. >> I was wondering is it possible to extract the gradient of least >> square function from implemented algorithms like CG module? Any >> recommendation will be appreciated. >> >> Best Regards, >> Vahid >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 10:21:11 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 14:21:11 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. The RTKScatterGlareCorrectionImageFilter code is given below. //rtkLagCorrectionImageFilter typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); LagCorrection->SetInput(Projections); //rtkScatterGlareCorrectionImageFilter typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Cyril Mory, > > > Thank you for your help. We are able to reconstruct 1024 > volume now. > > But the reconstruction time is around 4 minutes. Can you > please help us to reduce the reconstruction time? > > We are using NVIDIA TITAN X GPU which has 12 GB memory. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > Dear Zahid, > > > > The output looks correct. > > > > If the command line solution I suggested in a previous email works, the > > best way to move forward would be to compare your code and that of > > rtkfdk.cxx, and where it differs, make sure you have not introduced an > > error. > > > > Cyril > > > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > > Dear Cyril Mory, > > > > > > I have done the same but the Output.mhd file is still 0 > > KB for 1024 volume. Please find the attachment of the status of the output > > displayed. > > > > > > Please suggest us for further process. > > > > > > > > > Thanks & Regards > > > > > > Zahid Hasan Ansari > > > > > > > > > > > > > > > ----- Original Message ----- > > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > > [mailto:simon.rit at creatis.insa-lyon.fr] > > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > > > > >> I see two errors: > > >> > > >> Remove this line > > >> > > >> writer->SetNumberOfStreamDivisions(4); > > >> > > >> since only the streaming filter, not the write filter, needs to know > > >> about the number of divisions. > > >> And change the filename to > > >> > > >> "D:\\Output.mhd" > > >> > > >> It will write both the .mhd and the .raw files. > > >> > > >> I hope it helps, > > >> Cyril > > >> > > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > >>> Dear Cyril Mory, > > >>> > > >>> I have modified my file writer code and used > > >> StreamingImageFilter. Now its not giving any error message but the > final > > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > > >>> Please check my modified file writer code given > below. > > >>> > > >>> // Streaming depending on streaming capability of writer > > >>> typedef itk::StreamingImageFilter > > >> StreamerType; > > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>> streamerBP->SetInput(feldkamp->GetOutput()); > > >>> streamerBP->SetNumberOfStreamDivisions(4); > > >>> > > >>> //create a writer and write reconstructed file > > >>> itk::ImageFileWriter::Pointer writer; > > >>> writer = itk::ImageFileWriter::New(); > > >>> writer->SetFileName("D:\\Output.raw"); > > >>> writer->SetImageIO(io); > > >>> writer->SetInput(streamerBP->GetOutput()); > > >>> writer->SetNumberOfStreamDivisions(4); > > >>> > > >>> > > >>> Please let me know if any clarification is required. > > >>> > > >>> > > >>> Thanks & Regards > > >>> > > >>> Zahid Hasan Ansari > > >>> Senior Design Engineer > > >>> Mobile No. +91-9738379729 > > >>> > > >>> Panacea Medical Technologies Pvt. Ltd. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >> http://www.panaceamedical.com > > >>> Bangalore - India. > > >>> > > >>> > > >>> > > >>> > > >>> ----- Original Message ----- > > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > > Rit > > >> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>> > > >>> > > >>>> Dear Zahid, > > >>>> > > >>>> The --divisions is an option of the command-line application rtkfdk. > It > > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > > >>>> rather, it is passed to a streaming filter at the end of the > pipeline. > > >>>> Look for the following bit of code in rtkfdk.cxx : > > >>>> > > >>>> // Streaming depending on streaming capability of writer > > >>>> typedef itk::StreamingImageFilter > >>>> CPUOutputImageType> StreamerType; > > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>>> streamerBP->SetInput( pfeldkamp ); > > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg > ); > > >>>> > > >>>> You can find information on how a streaming filter works on this > page: > > >>>> > > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > >>>> > > >>>> I hope it helps, > > >>>> > > >>>> Cyril > > >>>> > > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > >>>>> Dear Cyril Mory, > > >>>>> > > >>>>> I have tried but I am not getting where to give > > >>>> --division 4 in my code. > > >>>>> Please find my code given below and please let me > > know > > >>>> where I need to change in my code to make it work. > > >>>>> int _tmain(int argc, _TCHAR* argv[]) > > >>>>> { > > >>>>> #pragma region "Variable declaration" > > >>>>> const double PI = 3.14159265358979323846; > > >>>>> float *angles; > > >>>>> int nProj = 349; > > >>>>> typedef unsigned short pixelType; > > >>>>> typedef float OutpixelType; > > >>>>> const int dimension = 3; > > >>>>> typedef itk::Image imageType; > > >>>>> typedef itk::ImageRegionConstIterator > ImageIteratorType; > > >>>>> imageType::Pointer Projections = imageType::New(); > > >>>>> > > >>>>> #pragma endregion "Variable declaration" > > >>>>> > > >>>>> Projections = > > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > > >> nProj); > > >>>>> imageType::SpacingType pSpacing; > > >>>>> pSpacing[0] = 0.2960; > > >>>>> pSpacing[1] = 0.2960; > > >>>>> pSpacing[2] = 0.2960; > > >>>>> Projections->SetSpacing(pSpacing); > > >>>>> > > >>>>> imageType::PointType pOrigin; > > >>>>> pOrigin[0] = -212.972; > > >>>>> pOrigin[1] = -212.972; > > >>>>> pOrigin[2] = -212.972; //-158.50; > > >>>>> Projections->SetOrigin(pOrigin); > > >>>>> > > >>>>> Projections->Update(); > > >>>>> > > >>>>> //Read angles. > > >>>>> char *angles_file = > "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > >>>>> angles = new float[nProj]; > > >>>>> angles = readAngles(angles_file, angles); > > >>>>> > > >>>>> #pragma region"Geometry" > > >>>>> // Geometry object > > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > > >>>>> { > > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, > 0, > > >> 0); > > >>>> // 136 half fan //2.07 Kidwai // > > >>>>> } > > >>>>> > > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > > >>>> GeometryWriterType; > > >>>>> GeometryWriterType::Pointer geometryWriter = > > GeometryWriterType::New(); > > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > > >>>>> geometryWriter->SetObject(geometry); > > >>>>> geometryWriter->WriteFile(); > > >>>>> geometry->Update(); > > >>>>> #pragma endregion "Geometry" > > >>>>> > > >>>>> //Define output image type > > >>>>> > > >>>>> #ifdef USE_CUDA > > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > > PSSFType; > > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > >>>>> #else > > >>>>> typedef itk::Image OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter > PSSFType; > > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > > FDKType; > > >>>>> #endif > > >>>>> > > >>>>> //ScatterCorrection > > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter > imageType > > >>>> BoellaardScatterCorrectionImageFilterType; > > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer > ScatterCorrection > > = > > >>>> BoellaardScatterCorrectionImageFilterType::New(); > > >>>>> ScatterCorrection->SetInput(Projections); > > >>>>> > > >>>>> //VarianObiRawImageFilter > > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > > >>>> RawImageFilterType; > > >>>>> RawImageFilterType::Pointer AttenuationFilter = > > >>>> RawImageFilterType::New(); > > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > >>>>> > > >>>>> //Create the output image > > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > > >>>> ConstantImageSourceType; > > >>>>> ConstantImageSourceType::PointType origin_p; > > >>>>> ConstantImageSourceType::SizeType size_p; > > >>>>> ConstantImageSourceType::SpacingType spacing_p; > > >>>>> ConstantImageSourceType::Pointer projectionsSource = > > >>>> ConstantImageSourceType::New(); > > >>>>> origin_p[0] = -127.5; > > >>>>> origin_p[1] = -127.5; > > >>>>> origin_p[2] = -127.5; > > >>>>> size_p[0] = 512; > > >>>>> size_p[1] = 512; > > >>>>> size_p[2] = 512; > > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > >>>>> > > >>>>> projectionsSource->SetOrigin(origin_p); > > >>>>> projectionsSource->SetSpacing(spacing_p); > > >>>>> projectionsSource->SetSize(size_p); > > >>>>> projectionsSource->SetConstant(0); > > >>>>> > > >>>>> // Short scan image filter > > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > > >>>>> pssf->SetGeometry(geometry); > > >>>>> pssf->InPlaceOff(); > > >>>>> std::cout << "short scan image filter success" << std::endl; > > >>>>> > > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > > >>>>> feldkamp->SetGeometry(geometry); > > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > >>>>> feldkamp->SetGPUEnabled(1); > > >>>>> feldkamp->SetNumberOfThreads(10000); > > >>>>> > > >>>>> #pragma region "Write volume" > > >>>>> > > >>>>> //Create a raw io for writing > > >>>>> > > >>>>> itk::RawImageIO::Pointer io; > > >>>>> io = itk::RawImageIO::New(); > > >>>>> > > >>>>> for (unsigned int i = 0; i < dimension; i++) > > >>>>> { > > >>>>> io->SetDimensions(i, size_p[i]); > > >>>>> io->SetSpacing(i, spacing_p[i]); > > >>>>> io->SetOrigin(i, origin_p[i]); > > >>>>> } > > >>>>> io->SetHeaderSize(0); > > >>>>> io->SetByteOrderToLittleEndian(); > > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > > >>>>> io->SetNumberOfComponents(1); > > >>>>> io->SetNumberOfDimensions(3); > > >>>>> > > >>>>> //create a writer and write reconstructed file > > >>>>> itk::ImageFileWriter::Pointer writer; > > >>>>> writer = itk::ImageFileWriter::New(); > > >>>>> writer->SetFileName("D:\\Output.raw"); > > >>>>> writer->SetImageIO(io); > > >>>>> writer->SetInput(feldkamp->GetOutput()); > > >>>>> > > >>>>> try > > >>>>> { > > >>>>> writer->Update(); > > >>>>> } > > >>>>> catch (itk::ExceptionObject & excp) > > >>>>> { > > >>>>> std::cerr << "Error while writing the image " << std::endl; > > >>>>> std::cerr << excp << std::endl; > > >>>>> getchar(); > > >>>>> } > > >>>>> #pragma endregion "WriteVolume" > > >>>>> delete[] angles; > > >>>>> return 0; > > >>>>> } > > >>>>> > > >>>>> > > >>>>> > > >>>>> Thanks & Regards > > >>>>> > > >>>>> Zahid Hasan Ansari > > >>>>> Senior Design Engineer > > >>>>> Mobile No. +91-9738379729 > > >>>>> > > >>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >>>> http://www.panaceamedical.com > > >>>>> Bangalore - India. > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> ----- Original Message ----- > > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > > >> Rit > > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>> > > >>>>> > > >>>>>> Dear Zahid, > > >>>>>> > > >>>>>> I was able to perform a reconstruction from your header and > geometry > > >>>>>> file, using the following command lines: > > >>>>>> > > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > > >>>>>> --phantomscale "128,128,128" --like Output.mhd > > >>>>>> > > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > > >> --hardware > > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > >>>>>> > > >>>>>> The first computes projections through a Shepp & Logan phantom, > with > > >> the > > >>>>>> same size, spacing, origin, etc... as your projections, using your > > >>>>>> geometry file geo.xml. > > >>>>>> > > >>>>>> The second line performs the FDK reconstruction. I had to use both > > the > > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > > (3GB, > > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > > by > > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > > >>>>>> parts, reconstructs them one by one, then assembles the results. > Can > > >> you > > >>>>>> run the same commands and let us know whether you still encounter > the > > >>>>>> crash you mentioned ? If it works, you can use your own projection > > data > > >>>>>> in the second command line instead of "simulatedprojections.mha". > > >>>>>> > > >>>>>> Best, > > >>>>>> > > >>>>>> Cyril > > >>>>>> > > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > >>>>>> > > >>>>>>> Dear Sir, > > >>>>>>> > > >>>>>>> Please find the Header file in the attachment. > > >>>>>>> > > >>>>>>> > > >>>>>>> Thanks & Regards > > >>>>>>> > > >>>>>>> Zahid Hasan Ansari > > >>>>>>> > > >>>>>>> > > >>>>>>> ----- Original Message ----- > > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > Simon > > >>>> Rit > > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>> > > >>>>>>> > > >>>>>>>> Dear Zahid, > > >>>>>>>> > > >>>>>>>> We do not need the projections file, at least not for a first > stage > > >> of > > >>>>>>>> error tracking. We only need the header. > > >>>>>>>> Try the following command line: > > >>>>>>>> > > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > > >>>>>>>> > > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" > file > > is > > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > > >> contains > > >>>>>>>> the pixel values, but at the moment we do not need them. We will > > >> create > > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough > to > > >>>>>>>> track down the error you encounter. > > >>>>>>>> > > >>>>>>>> Looking forward to receiving your file, > > >>>>>>>> Cyril > > >>>>>>>> > > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > > >>>>>>>>> Dear Sir, > > >>>>>>>>> > > >>>>>>>>> The single raw file of the projections is 1.4 GB > > and > > >> we > > >>>> are > > >>>>>> not > > >>>>>>>> able to send this big file to you. Can you please suggest other > > >>>>>> alternatives > > >>>>>>>> for this? > > >>>>>>>>> Or can you provide us the PC configuration to > solve > > >> the > > >>>>>> issue? > > >>>>>>>>> Let me know if any other clarification is > required. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> Thanks & Regards > > >>>>>>>>> > > >>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> ----- Original Message ----- > > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > >> Simon > > >>>>>> Rit > > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>>> Hello Zahid, > > >>>>>>>>>> > > >>>>>>>>>> We will need the header of your projections file, too (It is > best > > >> if > > >>>>>> you > > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > > file, > > >> so > > >>>>>> it > > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > > >>>>>>>>>> > > >>>>>>>>>> Regards, > > >>>>>>>>>> Cyril > > >>>>>>>>>> > > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>> Dear Cyril Mory, > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> I have only used RTK version 1.3.0. but > in > > the > > >>>> error > > >>>>>>>>>> message it is showing RTK version 1.2.0. > > >>>>>>>>>>> Please find the attachment of the > geometry > > >> file > > >>>> of > > >>>>>> our > > >>>>>>>>>> projections. > > >>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>> > > >>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com], > > >>>> Simon > > >>>>>>>> Rit > > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, > saimahesh.m at panaceamedical.com > > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>> > > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > > >>>> source > > >>>>>> of > > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > > >>>>>> therefore > > >>>>>>>>>>>> yourself): > > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > > changes > > >> in > > >>>>>> the > > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so > your > > >>>>>> problem > > >>>>>>>>>>>> might disappear just by upgrading to the new version > > >>>>>>>>>>>> - create a small example that reproduces your problem. You > can, > > >> for > > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > > >> logan > > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look > at > > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > > an > > >>>>>>>>>>>> example). And send us the script > > >>>>>>>>>>>> - OR send us your geometry file and the header of your > > >> projections > > >>>>>> file > > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > > >>>>>> zero-filled > > >>>>>>>>>>>> stack of projections), and the command line that crashes > > >>>>>>>>>>>> > > >>>>>>>>>>>> Best regards, > > >>>>>>>>>>>> Cyril > > >>>>>>>>>>>> > > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>>>> Dear Simon Rit, > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Please find the screen shot in the > > >> attachment. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > > : > > >>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>>>> To: Zahid Hasan Ansari > > [mailto:zahidhasan.a at panaceamedical.com] > > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > > >>>>>>>> [mailto:rtk-users at public.kitware.com], > > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is > a > > >> CUDA > > >>>>>>>>>> memory > > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > > >> first > > >>>>>> make > > >>>>>>>>>>>> sure > > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > > >> images. > > >>>>>> If > > >>>>>>>> it > > >>>>>>>>>>>> is > > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > > --divisions. > > >>>> The > > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > > use > > >>>> of > > >>>>>>>> RTK > > >>>>>>>>>> on > > >>>>>>>>>>>>>> our case studies webpage > > >>>>>>>>>>>> . > > >>>>>>>>>>>>>> Simon > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Dear Sir\Madam, > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > > >>>>>> reconstruction > > >>>>>>>>>> using > > >>>>>>>>>>>> RTK > > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > > screen > > >>>>>> shoot > > >>>>>>>> of > > >>>>>>>>>>>>>>> the > > >>>>>>>>>>>>>>>> same. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am using the following items > given > > >> below. > > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > > console > > >>>>>>>> application > > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > > >>>>>>>>>>>>>>>> 5. CUDA 7. > > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Please provide the solution of this > > and > > >> let > > >>>> me > > >>>>>>>> know > > >>>>>>>>>> if > > >>>>>>>>>>>>>> any > > >>>>>>>>>>>>>>>> other clarification is required. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, > > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 > | > > >> Url > > >>>> : > > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>>>> > ____________________________________________________________ > > >>>>>>>>>>>>>>> ________________ > > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> This email and any files transmitted with it are > > confidential > > >>>> and > > >>>>>>>>>>>> intended > > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom > they > > >> are > > >>>>>>>>>>>> addressed. > > >>>>>>>>>>>>>>> If you have received this email in error please notify the > > >>>> system > > >>>>>>>>>>>> manager. > > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > > email > > >>>> are > > >>>>>>>>>>>> solely > > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > > of > > >>>> the > > >>>>>>>>>>>> company. > > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > > >>>> attachments > > >>>>>>>> for > > >>>>>>>>>>>> the > > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > > any > > >>>>>> damage > > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> This email and any files transmitted with it are > confidential > > >> and > > >>>>>>>>>> intended > > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > > are > > >>>>>>>>>> addressed. > > >>>>>>>>>>>>> If you have received this email in error please notify the > > >> system > > >>>>>>>>>> manager. > > >>>>>>>>>>>>> Please note that any views or opinions presented in this > email > > >> are > > >>>>>>>>>> solely > > >>>>>>>>>>>>> those of the author and do not necessarily represent those > of > > >> the > > >>>>>>>>>> company. > > >>>>>>>>>>>>> Finally, the recipient should check this email and any > > >> attachments > > >>>>>> for > > >>>>>>>>>> the > > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > > >>>> damage > > >>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>> ________________________________________ > > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > Area > > >>>>>> Phase > > >>>>>>>> 1, > > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > Industrial > > >>>>>> Area, > > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>> > > >>>>>>>>>>> This email and any files transmitted with it are confidential > > and > > >>>>>>>> intended > > >>>>>>>>>>> solely for the use of the individual or entity to whom they > are > > >>>>>>>> addressed. > > >>>>>>>>>>> If you have received this email in error please notify the > > system > > >>>>>>>> manager. > > >>>>>>>>>>> Please note that any views or opinions presented in this email > > are > > >>>>>>>> solely > > >>>>>>>>>>> those of the author and do not necessarily represent those of > > the > > >>>>>>>> company. > > >>>>>>>>>>> Finally, the recipient should check this email and any > > attachments > > >>>> for > > >>>>>>>> the > > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > > >> damage > > >>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>> > > >>>>>>>>> ________________________________________ > > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > > >>>> Phase > > >>>>>> 1, > > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > > >>>> Area, > > >>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>> > > >>>>>>>>> This email and any files transmitted with it are confidential > and > > >>>>>> intended > > >>>>>>>>> solely for the use of the individual or entity to whom they are > > >>>>>> addressed. > > >>>>>>>>> If you have received this email in error please notify the > system > > >>>>>> manager. > > >>>>>>>>> Please note that any views or opinions presented in this email > are > > >>>>>> solely > > >>>>>>>>> those of the author and do not necessarily represent those of > the > > >>>>>> company. > > >>>>>>>>> Finally, the recipient should check this email and any > attachments > > >> for > > >>>>>> the > > >>>>>>>>> presence of viruses. The company accepts no liability for any > > damage > > >>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>> ________________________________________ > > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > >> Phase > > >>>> 1, > > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > >> Area, > > >>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>> Fax : + 91 80 42428710 > > >>>>>>> Url : http://www.panaceamedical.com > > >>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>> > > >>>>>>> This email and any files transmitted with it are confidential and > > >>>> intended > > >>>>>>> solely for the use of the individual or entity to whom they are > > >>>> addressed. > > >>>>>>> If you have received this email in error please notify the system > > >>>> manager. > > >>>>>>> Please note that any views or opinions presented in this email are > > >>>> solely > > >>>>>>> those of the author and do not necessarily represent those of the > > >>>> company. > > >>>>>>> Finally, the recipient should check this email and any attachments > > for > > >>>> the > > >>>>>>> presence of viruses. The company accepts no liability for any > damage > > >>>>>>> caused by any virus transmitted by this email. > > >>>>>>> > > >>>>> ________________________________________ > > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>> Fax : + 91 80 42428710 > > >>>>> Url : http://www.panaceamedical.com > > >>>>> > > >> > > > ____________________________________________________________________________ > > >>>>> PMT EMAIL DISCLAIMER: > > >>>>> > > >>>>> This email and any files transmitted with it are confidential and > > >> intended > > >>>>> solely for the use of the individual or entity to whom they are > > >> addressed. > > >>>>> If you have received this email in error please notify the system > > >> manager. > > >>>>> Please note that any views or opinions presented in this email are > > >> solely > > >>>>> those of the author and do not necessarily represent those of the > > >> company. > > >>>>> Finally, the recipient should check this email and any attachments > for > > >> the > > >>>>> presence of viruses. The company accepts no liability for any damage > > >>>>> caused by any virus transmitted by this email. > > >>>>> > > >>>>> > > >>>>> > > >>>> > > >>> ________________________________________ > > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 > > >>> Fax : + 91 80 42428710 > > >>> Url : http://www.panaceamedical.com > > >>> > > >> > > > ____________________________________________________________________________ > > >>> PMT EMAIL DISCLAIMER: > > >>> > > >>> This email and any files transmitted with it are confidential and > > intended > > >>> solely for the use of the individual or entity to whom they are > > addressed. > > >>> If you have received this email in error please notify the system > > manager. > > >>> Please note that any views or opinions presented in this email are > > solely > > >>> those of the author and do not necessarily represent those of the > > company. > > >>> Finally, the recipient should check this email and any attachments for > > the > > >>> presence of viruses. The company accepts no liability for any damage > > >>> caused by any virus transmitted by this email. > > >>> > > >>> > > >>> > > >>> > > >>> > > >> > > >> > > > > > > ________________________________________ > > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > > Malur - 563130. Kolar District. INDIA. > > > > > > Tel : +91 80 4242 8700 / 2845 4785 > > > Fax : + 91 80 42428710 > > > Url : http://www.panaceamedical.com > > > > > > ____________________________________________________________________________ > > > PMT EMAIL DISCLAIMER: > > > > > > This email and any files transmitted with it are confidential and > intended > > > solely for the use of the individual or entity to whom they are > addressed. > > > If you have received this email in error please notify the system > manager. > > > Please note that any views or opinions presented in this email are > solely > > > those of the author and do not necessarily represent those of the > company. > > > Finally, the recipient should check this email and any attachments for > the > > > presence of viruses. The company accepts no liability for any damage > > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: ScatterGlareError.png Type: image/png Size: 121487 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 3 10:28:49 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 3 Nov 2016 15:28:49 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> References: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Message-ID: Hi, I think you should look at the applications before posting a question on the mailing list. There is a rtkscatterglarecorrection tool, look at rtkscatterglarecorrection.cxx. You must init the coefficients. I'll add a check to make the error message more readable but please, take the time to look at all the examples available in applications before posting a question. Thanks, Simon On Thu, Nov 3, 2016 at 3:21 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > > We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. > > The RTKScatterGlareCorrectionImageFilter code is given below. > > //rtkLagCorrectionImageFilter > typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; > LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); > LagCorrection->SetInput(Projections); > > //rtkScatterGlareCorrectionImageFilter > typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; > ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); > ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); > > > > > > Thanks & Regards > > Zahid Hasan Ansari > > > > ----- Original Message ----- > From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Cyril Mory, >> >> >> Thank you for your help. We are able to reconstruct 1024 >> volume now. >> >> But the reconstruction time is around 4 minutes. Can you >> please help us to reduce the reconstruction time? >> >> We are using NVIDIA TITAN X GPU which has 12 GB memory. >> >> >> Thanks & Regards >> >> Zahid Hasan Ansari >> >> >> >> >> ----- Original Message ----- >> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> >> >> > Dear Zahid, >> > >> > The output looks correct. >> > >> > If the command line solution I suggested in a previous email works, the >> > best way to move forward would be to compare your code and that of >> > rtkfdk.cxx, and where it differs, make sure you have not introduced an >> > error. >> > >> > Cyril >> > >> > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: >> > > Dear Cyril Mory, >> > > >> > > I have done the same but the Output.mhd file is still 0 >> > KB for 1024 volume. Please find the attachment of the status of the output >> > displayed. >> > > >> > > Please suggest us for further process. >> > > >> > > >> > > Thanks & Regards >> > > >> > > Zahid Hasan Ansari >> > > >> > > >> > > >> > > >> > > ----- Original Message ----- >> > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >> > [mailto:simon.rit at creatis.insa-lyon.fr] >> > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > > >> > > >> > >> I see two errors: >> > >> >> > >> Remove this line >> > >> >> > >> writer->SetNumberOfStreamDivisions(4); >> > >> >> > >> since only the streaming filter, not the write filter, needs to know >> > >> about the number of divisions. >> > >> And change the filename to >> > >> >> > >> "D:\\Output.mhd" >> > >> >> > >> It will write both the .mhd and the .raw files. >> > >> >> > >> I hope it helps, >> > >> Cyril >> > >> >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >> > >>> Dear Cyril Mory, >> > >>> >> > >>> I have modified my file writer code and used >> > >> StreamingImageFilter. Now its not giving any error message but the >> final >> > >> output is 0 byte for 1024 volume. It working fine for 512 volume. >> > >>> Please check my modified file writer code given >> below. >> > >>> >> > >>> // Streaming depending on streaming capability of writer >> > >>> typedef itk::StreamingImageFilter >> > >> StreamerType; >> > >>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>> streamerBP->SetInput(feldkamp->GetOutput()); >> > >>> streamerBP->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> //create a writer and write reconstructed file >> > >>> itk::ImageFileWriter::Pointer writer; >> > >>> writer = itk::ImageFileWriter::New(); >> > >>> writer->SetFileName("D:\\Output.raw"); >> > >>> writer->SetImageIO(io); >> > >>> writer->SetInput(streamerBP->GetOutput()); >> > >>> writer->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> >> > >>> Please let me know if any clarification is required. >> > >>> >> > >>> >> > >>> Thanks & Regards >> > >>> >> > >>> Zahid Hasan Ansari >> > >>> Senior Design Engineer >> > >>> Mobile No. +91-9738379729 >> > >>> >> > >>> Panacea Medical Technologies Pvt. Ltd. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >> http://www.panaceamedical.com >> > >>> Bangalore - India. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> ----- Original Message ----- >> > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> > Rit >> > >> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>> >> > >>> >> > >>>> Dear Zahid, >> > >>>> >> > >>>> The --divisions is an option of the command-line application rtkfdk. >> It >> > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >> > >>>> rather, it is passed to a streaming filter at the end of the >> pipeline. >> > >>>> Look for the following bit of code in rtkfdk.cxx : >> > >>>> >> > >>>> // Streaming depending on streaming capability of writer >> > >>>> typedef itk::StreamingImageFilter> > >>>> CPUOutputImageType> StreamerType; >> > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>>> streamerBP->SetInput( pfeldkamp ); >> > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg >> ); >> > >>>> >> > >>>> You can find information on how a streaming filter works on this >> page: >> > >>>> >> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> > >>>> >> > >>>> I hope it helps, >> > >>>> >> > >>>> Cyril >> > >>>> >> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >> > >>>>> Dear Cyril Mory, >> > >>>>> >> > >>>>> I have tried but I am not getting where to give >> > >>>> --division 4 in my code. >> > >>>>> Please find my code given below and please let me >> > know >> > >>>> where I need to change in my code to make it work. >> > >>>>> int _tmain(int argc, _TCHAR* argv[]) >> > >>>>> { >> > >>>>> #pragma region "Variable declaration" >> > >>>>> const double PI = 3.14159265358979323846; >> > >>>>> float *angles; >> > >>>>> int nProj = 349; >> > >>>>> typedef unsigned short pixelType; >> > >>>>> typedef float OutpixelType; >> > >>>>> const int dimension = 3; >> > >>>>> typedef itk::Image imageType; >> > >>>>> typedef itk::ImageRegionConstIterator >> ImageIteratorType; >> > >>>>> imageType::Pointer Projections = imageType::New(); >> > >>>>> >> > >>>>> #pragma endregion "Variable declaration" >> > >>>>> >> > >>>>> Projections = >> > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> > >> nProj); >> > >>>>> imageType::SpacingType pSpacing; >> > >>>>> pSpacing[0] = 0.2960; >> > >>>>> pSpacing[1] = 0.2960; >> > >>>>> pSpacing[2] = 0.2960; >> > >>>>> Projections->SetSpacing(pSpacing); >> > >>>>> >> > >>>>> imageType::PointType pOrigin; >> > >>>>> pOrigin[0] = -212.972; >> > >>>>> pOrigin[1] = -212.972; >> > >>>>> pOrigin[2] = -212.972; //-158.50; >> > >>>>> Projections->SetOrigin(pOrigin); >> > >>>>> >> > >>>>> Projections->Update(); >> > >>>>> >> > >>>>> //Read angles. >> > >>>>> char *angles_file = >> "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >> > >>>>> angles = new float[nProj]; >> > >>>>> angles = readAngles(angles_file, angles); >> > >>>>> >> > >>>>> #pragma region"Geometry" >> > >>>>> // Geometry object >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> > >>>>> GeometryType::Pointer geometry = GeometryType::New(); >> > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >> > >>>>> { >> > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, >> 0, >> > >> 0); >> > >>>> // 136 half fan //2.07 Kidwai // >> > >>>>> } >> > >>>>> >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> > >>>> GeometryWriterType; >> > >>>>> GeometryWriterType::Pointer geometryWriter = >> > GeometryWriterType::New(); >> > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >> > >>>>> geometryWriter->SetObject(geometry); >> > >>>>> geometryWriter->WriteFile(); >> > >>>>> geometry->Update(); >> > >>>>> #pragma endregion "Geometry" >> > >>>>> >> > >>>>> //Define output image type >> > >>>>> >> > >>>>> #ifdef USE_CUDA >> > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > >> PSSFType; >> > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> > >>>>> #else >> > >>>>> typedef itk::Image OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter >> PSSFType; >> > >>>>> typedef rtk::FDKConeBeamReconstructionFilter >> > FDKType; >> > >>>>> #endif >> > >>>>> >> > >>>>> //ScatterCorrection >> > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter> > imageType >> > >>>> BoellaardScatterCorrectionImageFilterType; >> > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer >> ScatterCorrection >> > = >> > >>>> BoellaardScatterCorrectionImageFilterType::New(); >> > >>>>> ScatterCorrection->SetInput(Projections); >> > >>>>> >> > >>>>> //VarianObiRawImageFilter >> > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> > >>>> RawImageFilterType; >> > >>>>> RawImageFilterType::Pointer AttenuationFilter = >> > >>>> RawImageFilterType::New(); >> > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >> > >>>>> >> > >>>>> //Create the output image >> > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >> > >>>> ConstantImageSourceType; >> > >>>>> ConstantImageSourceType::PointType origin_p; >> > >>>>> ConstantImageSourceType::SizeType size_p; >> > >>>>> ConstantImageSourceType::SpacingType spacing_p; >> > >>>>> ConstantImageSourceType::Pointer projectionsSource = >> > >>>> ConstantImageSourceType::New(); >> > >>>>> origin_p[0] = -127.5; >> > >>>>> origin_p[1] = -127.5; >> > >>>>> origin_p[2] = -127.5; >> > >>>>> size_p[0] = 512; >> > >>>>> size_p[1] = 512; >> > >>>>> size_p[2] = 512; >> > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >> > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >> > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >> > >>>>> >> > >>>>> projectionsSource->SetOrigin(origin_p); >> > >>>>> projectionsSource->SetSpacing(spacing_p); >> > >>>>> projectionsSource->SetSize(size_p); >> > >>>>> projectionsSource->SetConstant(0); >> > >>>>> >> > >>>>> // Short scan image filter >> > >>>>> PSSFType::Pointer pssf = PSSFType::New(); >> > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >> > >>>>> pssf->SetGeometry(geometry); >> > >>>>> pssf->InPlaceOff(); >> > >>>>> std::cout << "short scan image filter success" << std::endl; >> > >>>>> >> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); >> > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >> > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >> > >>>>> feldkamp->SetGeometry(geometry); >> > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >> > >>>>> feldkamp->SetGPUEnabled(1); >> > >>>>> feldkamp->SetNumberOfThreads(10000); >> > >>>>> >> > >>>>> #pragma region "Write volume" >> > >>>>> >> > >>>>> //Create a raw io for writing >> > >>>>> >> > >>>>> itk::RawImageIO::Pointer io; >> > >>>>> io = itk::RawImageIO::New(); >> > >>>>> >> > >>>>> for (unsigned int i = 0; i < dimension; i++) >> > >>>>> { >> > >>>>> io->SetDimensions(i, size_p[i]); >> > >>>>> io->SetSpacing(i, spacing_p[i]); >> > >>>>> io->SetOrigin(i, origin_p[i]); >> > >>>>> } >> > >>>>> io->SetHeaderSize(0); >> > >>>>> io->SetByteOrderToLittleEndian(); >> > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >> > >>>>> io->SetNumberOfComponents(1); >> > >>>>> io->SetNumberOfDimensions(3); >> > >>>>> >> > >>>>> //create a writer and write reconstructed file >> > >>>>> itk::ImageFileWriter::Pointer writer; >> > >>>>> writer = itk::ImageFileWriter::New(); >> > >>>>> writer->SetFileName("D:\\Output.raw"); >> > >>>>> writer->SetImageIO(io); >> > >>>>> writer->SetInput(feldkamp->GetOutput()); >> > >>>>> >> > >>>>> try >> > >>>>> { >> > >>>>> writer->Update(); >> > >>>>> } >> > >>>>> catch (itk::ExceptionObject & excp) >> > >>>>> { >> > >>>>> std::cerr << "Error while writing the image " << std::endl; >> > >>>>> std::cerr << excp << std::endl; >> > >>>>> getchar(); >> > >>>>> } >> > >>>>> #pragma endregion "WriteVolume" >> > >>>>> delete[] angles; >> > >>>>> return 0; >> > >>>>> } >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> Thanks & Regards >> > >>>>> >> > >>>>> Zahid Hasan Ansari >> > >>>>> Senior Design Engineer >> > >>>>> Mobile No. +91-9738379729 >> > >>>>> >> > >>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >>>> http://www.panaceamedical.com >> > >>>>> Bangalore - India. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> ----- Original Message ----- >> > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >> > >> Rit >> > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>> >> > >>>>> >> > >>>>>> Dear Zahid, >> > >>>>>> >> > >>>>>> I was able to perform a reconstruction from your header and >> geometry >> > >>>>>> file, using the following command lines: >> > >>>>>> >> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> > >>>>>> --phantomscale "128,128,128" --like Output.mhd >> > >>>>>> >> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> > >> --hardware >> > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> > >>>>>> >> > >>>>>> The first computes projections through a Shepp & Logan phantom, >> with >> > >> the >> > >>>>>> same size, spacing, origin, etc... as your projections, using your >> > >>>>>> geometry file geo.xml. >> > >>>>>> >> > >>>>>> The second line performs the FDK reconstruction. I had to use both >> > the >> > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory >> > (3GB, >> > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory >> > by >> > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> > >>>>>> parts, reconstructs them one by one, then assembles the results. >> Can >> > >> you >> > >>>>>> run the same commands and let us know whether you still encounter >> the >> > >>>>>> crash you mentioned ? If it works, you can use your own projection >> > data >> > >>>>>> in the second command line instead of "simulatedprojections.mha". >> > >>>>>> >> > >>>>>> Best, >> > >>>>>> >> > >>>>>> Cyril >> > >>>>>> >> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> > >>>>>> >> > >>>>>>> Dear Sir, >> > >>>>>>> >> > >>>>>>> Please find the Header file in the attachment. >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> Thanks & Regards >> > >>>>>>> >> > >>>>>>> Zahid Hasan Ansari >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> ----- Original Message ----- >> > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > Simon >> > >>>> Rit >> > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>> >> > >>>>>>> >> > >>>>>>>> Dear Zahid, >> > >>>>>>>> >> > >>>>>>>> We do not need the projections file, at least not for a first >> stage >> > >> of >> > >>>>>>>> error tracking. We only need the header. >> > >>>>>>>> Try the following command line: >> > >>>>>>>> >> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >> > >>>>>>>> >> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" >> file >> > is >> > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> > >> contains >> > >>>>>>>> the pixel values, but at the moment we do not need them. We will >> > >> create >> > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough >> to >> > >>>>>>>> track down the error you encounter. >> > >>>>>>>> >> > >>>>>>>> Looking forward to receiving your file, >> > >>>>>>>> Cyril >> > >>>>>>>> >> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >> > >>>>>>>>> Dear Sir, >> > >>>>>>>>> >> > >>>>>>>>> The single raw file of the projections is 1.4 GB >> > and >> > >> we >> > >>>> are >> > >>>>>> not >> > >>>>>>>> able to send this big file to you. Can you please suggest other >> > >>>>>> alternatives >> > >>>>>>>> for this? >> > >>>>>>>>> Or can you provide us the PC configuration to >> solve >> > >> the >> > >>>>>> issue? >> > >>>>>>>>> Let me know if any other clarification is >> required. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> Thanks & Regards >> > >>>>>>>>> >> > >>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> ----- Original Message ----- >> > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > >> Simon >> > >>>>>> Rit >> > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>>> Hello Zahid, >> > >>>>>>>>>> >> > >>>>>>>>>> We will need the header of your projections file, too (It is >> best >> > >> if >> > >>>>>> you >> > >>>>>>>>>> have all your projections as a single .mhd and a single .raw >> > file, >> > >> so >> > >>>>>> it >> > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >> > >>>>>>>>>> >> > >>>>>>>>>> Regards, >> > >>>>>>>>>> Cyril >> > >>>>>>>>>> >> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>> Dear Cyril Mory, >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> I have only used RTK version 1.3.0. but >> in >> > the >> > >>>> error >> > >>>>>>>>>> message it is showing RTK version 1.2.0. >> > >>>>>>>>>>> Please find the attachment of the >> geometry >> > >> file >> > >>>> of >> > >>>>>> our >> > >>>>>>>>>> projections. >> > >>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>> >> > >>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>>>> To: Zahid Hasan Ansari >> [mailto:zahidhasan.a at panaceamedical.com], >> > >>>> Simon >> > >>>>>>>> Rit >> > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, >> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the >> > >>>> source >> > >>>>>> of >> > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >> > >>>>>> therefore >> > >>>>>>>>>>>> yourself): >> > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable >> > changes >> > >> in >> > >>>>>> the >> > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so >> your >> > >>>>>> problem >> > >>>>>>>>>>>> might disappear just by upgrading to the new version >> > >>>>>>>>>>>> - create a small example that reproduces your problem. You >> can, >> > >> for >> > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> > >> logan >> > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look >> at >> > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need >> > an >> > >>>>>>>>>>>> example). And send us the script >> > >>>>>>>>>>>> - OR send us your geometry file and the header of your >> > >> projections >> > >>>>>> file >> > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >> > >>>>>> zero-filled >> > >>>>>>>>>>>> stack of projections), and the command line that crashes >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Best regards, >> > >>>>>>>>>>>> Cyril >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>>>> Dear Simon Rit, >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Please find the screen shot in the >> > >> attachment. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >> > : >> > >>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>>>> To: Zahid Hasan Ansari >> > [mailto:zahidhasan.a at panaceamedical.com] >> > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >> > >>>>>>>> [mailto:rtk-users at public.kitware.com], >> > >>>>>>>>>>>> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is >> a >> > >> CUDA >> > >>>>>>>>>> memory >> > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> > >> first >> > >>>>>> make >> > >>>>>>>>>>>> sure >> > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> > >> images. >> > >>>>>> If >> > >>>>>>>> it >> > >>>>>>>>>>>> is >> > >>>>>>>>>>>>>> no sufficient, you can split your volume using the >> > --divisions. >> > >>>> The >> > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >> > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the >> > use >> > >>>> of >> > >>>>>>>> RTK >> > >>>>>>>>>> on >> > >>>>>>>>>>>>>> our case studies webpage >> > >>>>>>>>>>>> . >> > >>>>>>>>>>>>>> Simon >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >> > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Dear Sir\Madam, >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >> > >>>>>> reconstruction >> > >>>>>>>>>> using >> > >>>>>>>>>>>> RTK >> > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the >> > screen >> > >>>>>> shoot >> > >>>>>>>> of >> > >>>>>>>>>>>>>>> the >> > >>>>>>>>>>>>>>>> same. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am using the following items >> given >> > >> below. >> > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >> > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >> > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit >> > console >> > >>>>>>>> application >> > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >> > >>>>>>>>>>>>>>>> 5. CUDA 7. >> > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >> > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Please provide the solution of this >> > and >> > >> let >> > >>>> me >> > >>>>>>>> know >> > >>>>>>>>>> if >> > >>>>>>>>>>>>>> any >> > >>>>>>>>>>>>>>>> other clarification is required. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> > EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, >> > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 >> | >> > >> Url >> > >>>> : >> > >>>>>>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>>>> >> ____________________________________________________________ >> > >>>>>>>>>>>>>>> ________________ >> > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> This email and any files transmitted with it are >> > confidential >> > >>>> and >> > >>>>>>>>>>>> intended >> > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom >> they >> > >> are >> > >>>>>>>>>>>> addressed. >> > >>>>>>>>>>>>>>> If you have received this email in error please notify the >> > >>>> system >> > >>>>>>>>>>>> manager. >> > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this >> > email >> > >>>> are >> > >>>>>>>>>>>> solely >> > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those >> > of >> > >>>> the >> > >>>>>>>>>>>> company. >> > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >>>> attachments >> > >>>>>>>> for >> > >>>>>>>>>>>> the >> > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> > any >> > >>>>>> damage >> > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> This email and any files transmitted with it are >> confidential >> > >> and >> > >>>>>>>>>> intended >> > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> > are >> > >>>>>>>>>> addressed. >> > >>>>>>>>>>>>> If you have received this email in error please notify the >> > >> system >> > >>>>>>>>>> manager. >> > >>>>>>>>>>>>> Please note that any views or opinions presented in this >> email >> > >> are >> > >>>>>>>>>> solely >> > >>>>>>>>>>>>> those of the author and do not necessarily represent those >> of >> > >> the >> > >>>>>>>>>> company. >> > >>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >> attachments >> > >>>>>> for >> > >>>>>>>>>> the >> > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> any >> > >>>> damage >> > >>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > Area >> > >>>>>> Phase >> > >>>>>>>> 1, >> > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > Industrial >> > >>>>>> Area, >> > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>> >> > >>>>>>>>>>> This email and any files transmitted with it are confidential >> > and >> > >>>>>>>> intended >> > >>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >> > >>>>>>>> addressed. >> > >>>>>>>>>>> If you have received this email in error please notify the >> > system >> > >>>>>>>> manager. >> > >>>>>>>>>>> Please note that any views or opinions presented in this email >> > are >> > >>>>>>>> solely >> > >>>>>>>>>>> those of the author and do not necessarily represent those of >> > the >> > >>>>>>>> company. >> > >>>>>>>>>>> Finally, the recipient should check this email and any >> > attachments >> > >>>> for >> > >>>>>>>> the >> > >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> > >> damage >> > >>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>> >> > >>>>>>>>> ________________________________________ >> > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >> > >>>> Phase >> > >>>>>> 1, >> > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >> > >>>> Area, >> > >>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>> >> > >>>>>>>>> This email and any files transmitted with it are confidential >> and >> > >>>>>> intended >> > >>>>>>>>> solely for the use of the individual or entity to whom they are >> > >>>>>> addressed. >> > >>>>>>>>> If you have received this email in error please notify the >> system >> > >>>>>> manager. >> > >>>>>>>>> Please note that any views or opinions presented in this email >> are >> > >>>>>> solely >> > >>>>>>>>> those of the author and do not necessarily represent those of >> the >> > >>>>>> company. >> > >>>>>>>>> Finally, the recipient should check this email and any >> attachments >> > >> for >> > >>>>>> the >> > >>>>>>>>> presence of viruses. The company accepts no liability for any >> > damage >> > >>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>> ________________________________________ >> > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > >> Phase >> > >>>> 1, >> > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > >> Area, >> > >>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>> Fax : + 91 80 42428710 >> > >>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>> >> > >>>>>>> This email and any files transmitted with it are confidential and >> > >>>> intended >> > >>>>>>> solely for the use of the individual or entity to whom they are >> > >>>> addressed. >> > >>>>>>> If you have received this email in error please notify the system >> > >>>> manager. >> > >>>>>>> Please note that any views or opinions presented in this email are >> > >>>> solely >> > >>>>>>> those of the author and do not necessarily represent those of the >> > >>>> company. >> > >>>>>>> Finally, the recipient should check this email and any attachments >> > for >> > >>>> the >> > >>>>>>> presence of viruses. The company accepts no liability for any >> damage >> > >>>>>>> caused by any virus transmitted by this email. >> > >>>>>>> >> > >>>>> ________________________________________ >> > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>> Fax : + 91 80 42428710 >> > >>>>> Url : http://www.panaceamedical.com >> > >>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>> PMT EMAIL DISCLAIMER: >> > >>>>> >> > >>>>> This email and any files transmitted with it are confidential and >> > >> intended >> > >>>>> solely for the use of the individual or entity to whom they are >> > >> addressed. >> > >>>>> If you have received this email in error please notify the system >> > >> manager. >> > >>>>> Please note that any views or opinions presented in this email are >> > >> solely >> > >>>>> those of the author and do not necessarily represent those of the >> > >> company. >> > >>>>> Finally, the recipient should check this email and any attachments >> for >> > >> the >> > >>>>> presence of viruses. The company accepts no liability for any damage >> > >>>>> caused by any virus transmitted by this email. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>> >> > >>> ________________________________________ >> > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>> Fax : + 91 80 42428710 >> > >>> Url : http://www.panaceamedical.com >> > >>> >> > >> >> > >> ____________________________________________________________________________ >> > >>> PMT EMAIL DISCLAIMER: >> > >>> >> > >>> This email and any files transmitted with it are confidential and >> > intended >> > >>> solely for the use of the individual or entity to whom they are >> > addressed. >> > >>> If you have received this email in error please notify the system >> > manager. >> > >>> Please note that any views or opinions presented in this email are >> > solely >> > >>> those of the author and do not necessarily represent those of the >> > company. >> > >>> Finally, the recipient should check this email and any attachments for >> > the >> > >>> presence of viruses. The company accepts no liability for any damage >> > >>> caused by any virus transmitted by this email. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > >> >> > >> >> > > >> > > ________________________________________ >> > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >> > Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> > Malur - 563130. Kolar District. INDIA. >> > > >> > > Tel : +91 80 4242 8700 / 2845 4785 >> > > Fax : + 91 80 42428710 >> > > Url : http://www.panaceamedical.com >> > > >> > >> ____________________________________________________________________________ >> > > PMT EMAIL DISCLAIMER: >> > > >> > > This email and any files transmitted with it are confidential and >> intended >> > > solely for the use of the individual or entity to whom they are >> addressed. >> > > If you have received this email in error please notify the system >> manager. >> > > Please note that any views or opinions presented in this email are >> solely >> > > those of the author and do not necessarily represent those of the >> company. >> > > Finally, the recipient should check this email and any attachments for >> the >> > > presence of viruses. The company accepts no liability for any damage >> > > caused by any virus transmitted by this email. >> > > >> > >> > >> > > > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Thu Nov 3 16:10:31 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 20:10:31 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Message-ID: <1775591917.651990.1478203831679@mail.yahoo.com> OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right?About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question:I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards,Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Fri Nov 4 02:31:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 4 Nov 2016 07:31:18 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1775591917.651990.1478203831679@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> Message-ID: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: > OK. good. Thank Cyril to clarify it to me. To implement the Newton's > methods instead of multiplication of R with R^T, we need the > multiplication of Jacobian/Sensitivity (R here) matrix with vector > variable (here x) and the gradient vector (here multiplication of R > with -r). I think it is possible to implement the Newton optimization > methods with the current modules as I think we could extract the R and > f dot product and R and r dot product. Am I right? > About the displayed algorithms, I think the gradient vector is dot > product of matrix A (Jacobian) with the minus residual vector (-r). > > One more question: > I already developed my codes in python. Do you think it is easy to > wrap your modules in python? I don't have experience in these subject. > > Regards, > Vahid > > > On Thursday, November 3, 2016 2:23 AM, Cyril Mory > wrote: > > > Hello Vahid, > Thank you for this insight on Newton's methods. Yes, the output of the > backprojection filter, in SART, is the gradient of the cost function. > You may have noticed that the pipeline performs a division of the > forward projection by something coming from > "RayBoxIntersectionFilter". This is to normalize the forward > projection, so that R^T R f ~= blurry f. If you don't do it, you'll > have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, > and your algorithm will quickly diverge. > You could try to extract the gradient from the conjugate gradient > filter as well, but it is significantly more tricky: first, the CG > filter was implemented from the following algorithm, taken from > wikipedia (which embeds the normalization I was mentioning earlier): > In this algorithm, it is not clear to me what exactly is the gradient > of the cost function. I would say it is something like "- r_k", but > I'm not sure. Second, as you see, the CG filter needs an operator A, > which may differ from one problem to another, so this operator is > implemented in a separate filter, which in your case would be > rtkReconstructionConjugateGradientOperator, with the laplacian > regularization parameter gamma set to 0. > Note that we never actually store the system matrix R. Instead, the > interpolation coefficient it contains are re-computed on the fly > everytime we forward project. And the same holds for backprojection, > i.e the matrix R^T. > Best, > Cyril > > On 11/03/2016 03:38 AM, vahid ettehadi wrote: >> Hello Simon and Cyril, >> Thanks for the reply. >> You are right Simon. I did not notice it too in the literature. The >> main problem as you said is the storage. Actually I developed the >> conjugate gradient (CG), quasi-Newton and Newton optimization methods >> for optical tomography and I intended to apply them to the CT >> reconstruction as well. I implemented the Newton's methods >> (Gauss-Newton and Levenberg-Marquardt) in a >> Jacobian-Free-Newton-Krylov approaches to avoid the matrix >> multiplication of Jacobians (sensitivity). It means we only need to >> store the Jacobian matrix for the these methods (the matrix R that >> Cyril was mentioned), that is still a big matrix for practical >> problems in CT reconstruction. For the quasi-Newton I adapted an >> L-BFGS algorithm that only need the 3 or 8 last iterations of the >> gradient vector to calculate the Hessian matrix. In my case, the >> L-BFGS and Newton's methods was much faster than the CG as you know >> because of using the second order derivative (hessian matrix). I saw >> in your last paper you implement the conjugate gradient method, so I >> thought it might be easy to extract the gradient vector from CG >> modules and solve the cost function within the quasi-Newton/Newton >> methods. I will look at the codes to see what I can do. >> Thanks again for the reply. >> >> @Cyril: >> Please correct me if I am wrong. you mean the output of >> backProjectionFilter is the gradient of defined cost function? >> >> Regards, >> Vahid >> >> >> On Wednesday, November 2, 2016 2:53 AM, Cyril Mory >> >> wrote: >> >> >> Hi Vahid, >> Welcome to RTK :) >> Indeed, there are several iterative methods already implemented in >> RTK, but none of the filters allows you to easily extract the >> gradient of the least squares function there are minimizing. >> If you need to minimize the classical non-regularized tomographic >> cost function, ie || R f - p ||?, with R the forward projection >> operator, f the volume you are looking for, and p the measured >> projections, my best advice would be to copy some part of the >> pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, >> ie the following part (copy-paste this into webgraphviz.com) >> >> digraph SARTConeBeamReconstructionFilter { >> >> Input0 [ label="Input 0 (Volume)"]; >> Input0 [shape=Mdiamond]; >> Input1 [label="Input 1 (Projections)"]; >> Input1 [shape=Mdiamond]; >> >> node [shape=box]; >> ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref >> rtk::ForwardProjectionImageFilter"]; >> Extract [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref >> itk::MultiplyImageFilter"]; >> AfterExtract [label="", fixedsize="false", width=0, height=0, >> shape=none]; >> Subtract [ label="itk::SubtractImageFilter" URL="\ref >> itk::SubtractImageFilter"]; >> MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" >> URL="\ref itk::MultiplyImageFilter"]; >> Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref >> itk::DivideOrZeroOutImageFilter"]; >> GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" >> URL="\ref itk::MultiplyImageFilter", style=dashed]; >> Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref >> rtk::DisplacedDetectorImageFilter"]; >> ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref >> rtk::RayBoxIntersectionImageFilter"]; >> ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref >> rtk::BackProjectionImageFilter"]; >> OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; >> OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; >> Input0 -> OutofInput0 [arrowhead=none]; >> OutofInput0 -> ForwardProject; >> ConstantVolume -> BeforeBP [arrowhead=none]; >> BeforeBP -> BackProjection; >> Extract -> AfterExtract[arrowhead=none]; >> AfterExtract -> MultiplyByZero; >> AfterExtract -> Subtract; >> MultiplyByZero -> ForwardProject; >> Input1 -> Extract; >> ForwardProject -> Subtract; >> Subtract -> MultiplyByLambda; >> MultiplyByLambda -> Divide; >> Divide -> GatingWeight; >> GatingWeight -> Displaced; >> ConstantProjectionStack -> ExtractConstantProjection; >> ExtractConstantProjection -> RayBox; >> RayBox -> Divide; >> Displaced -> BackProjection; >> BackProjection -> OutofBP [arrowhead=none]; >> } >> >> As you can see, it is a very large part of the SART reconstruction >> filter, so yoiu might be better off just copying the whole >> SARTConeBeamReconstructionFilter and modifying it. >> >> Of course, you could also look into ITK's cost function class, and >> see if one of the classes inherited from it suits your needs, >> implement your cost function this way, and use ITK's off-the-shelf >> solvers to minimize it. See the inheritance diagram in >> https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if >> you want to try this approach. >> >> Best regards, >> Cyril >> >> On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >>> Hello RTK users and developers, >>> >>> I already implemented the RTK and reconstructed some images with the >>> FDK algorithm implemented in RTK. It works well. Thanks to RTK >>> developers. >>> Now, I am trying to develop a model-based image reconstruction for >>> our cone-beam micro-CT. I see already that some iterative algorithms >>> like ART and its modifications and conjugate-gradient (CG) method >>> are implemented in the RTK. I want to develop a model-based >>> reconstruction through the Newton/quasi-Newton optimizations >>> methods. I was wondering is it possible to extract the gradient of >>> least square function from implemented algorithms like CG module? >>> Any recommendation will be appreciated. >>> >>> Best Regards, >>> Vahid >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Fri Nov 4 16:42:08 2016 From: julien.jomier at kitware.com (Julien Jomier) Date: Fri, 4 Nov 2016 21:42:08 +0100 Subject: [Rtk-users] SimpleRTK + Matlab In-Reply-To: References: <06d4327e-9fd4-bf08-565d-5304f577b521@creatis.insa-lyon.fr> Message-ID: <89255846-9a06-a625-45f1-88d140c0013d@kitware.com> Hi Arvid, Sorry for the late reply. We successfully build the latest RTK with ITK 4.11.0 on Visual Studio 2013 with static libraries (BUILD_SHARED_LIBS set to OFF). I have just pushed a fix to SimpleRTK to build as shared libraries. Note that you would need to have ITK built as shared libraries as well. Let us know if you still have any issues, Julien On 23/09/2016 10:29, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi again. > > I've been spending some more time with this, and feel I learned a little > bit more. I have now tested this on several machines with several > compiler versions (more or less all of them) and serveral cmake versions > - all with Windows 7. > > I can actually reproduce the successful build you linked to, but this > can only be done if you do not include any of the language wrappings, > like in the build you linked to. Enable any of them, and the build will > break. (see attachment) > > I suspect it must have been working in the past, but since none of them > are included in your test there have been a breaking change, and none of > them work anymore. > > I am still trying to tweak then projects manually to build SimpleRTK > with some sort of language support, but still without any luck. > > best > > Arvid > > On Tue, Sep 20, 2016 at 4:19 PM, Simon Rit > > > wrote: > > Hi, > Sorry, I won't be able to help but I'd advise to tick on WRAP_PYTHON > only at first in cmake, not the other languages (i.e., tick off > WRAP_LUA). > I can't solve your problem but Kitware is going to look into an > upgrade of SimpleRTK in the coming days, I'll ask them if they know > what is the issue. If you look here: > http://my.cdash.org/viewNotes.php?buildid=1052065 > > this is a nightly build of SimpleRTK on Windows and it seems to > work. I don't see why it wouldn't work for you. > Simon > > On Tue, Sep 20, 2016 at 2:17 PM, Arvid Piehl Lauritsen B?ttiger > > wrote: > > Hi again. > > I understand, but could you please help me get in contact with > the person who knows something about the windows build (if any), > I think there is something wrong. > > I have been investigating the build problems I had and found > that in the sub folder "SimpleRTK-build" there is a solutions > file with SimpleRTK. I opened it up and found the projects which > I had problems building: "SimpleRTKCommon", > "SimpleRTKBasicFilters0", "SimpleRTKBasicFilters1" etc. > > When I then tried to build SimpleRTKCommon manually it just > compiled without any problems. However, when I followed up by > building "SimpleRTKBasicFilters0" it gave me an error which > stated that it couldn't find "SimpleRTKCommon-0.9.lib" - which I > just build. > > After some more investigation I realized that the > SimpleRTKCommon is set to build a dynamic linked library (DLL), > and SimpleRTKBasicFilters0 expects it to be a static linked > library (LIB). After changing SimpleRTKCommon to be build as a > static library - and changing the output location - I could > build SimpleRTKBasicFilters0. > > However, SimpleRTKBasicFilters0 is also build as an DLL, but > changing that to a LIB as well I could build > SimpleRTKBasicFilters1, then SimpleRTKBasicFilters2 and then > SimpleRTKBasicFilters3. You get the point. > > I'm unsure if the intention is to build them as static or > dynamic libraries, but in any case the current build > configuration doesn't work - on my setup at least. > > However, I should note than for some reason the "lua5" project > did build successfully out of the box. Whatever it does > differently works. > > best > > Arvid > > > > On Tue, Sep 20, 2016 at 7:33 AM, Simon Rit > > wrote: > > I'm not an msvc specialist but your first line suggests that > you have pasted only part of the log: > > 20> Done Building Project > "C:\Users\aplb\Work\RTK\RTK1.2-bin-vs13\SimpleRTK-build\ALL_BUILD.vcxproj" > (default targets) -- FAILED. > > What you need to find out is why this build failed. If the > build fails, the linking cannot work. > Cheers, > Simon > > > On 19/09/2016 19:44, Arvid Piehl Lauritsen B?ttiger wrote: >> I did a complete rebuild, and here is the end of the >> output: http://pastebin.com/hvQ33WWg >> >> I have to admit I'm not sure what to make of it. I should >> note that I'm trying to compile the version I just pulled >> from git earlier today, since the other version I normally >> work with is really old. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 6:50 PM, Simon Rit >> > > wrote: >> >> SimpleRTKCommon is a library generated when compiling. >> Don't you have another error before that which >> explains why it did not compile? >> Simon >> >> On Mon, Sep 19, 2016 at 2:30 PM, Arvid Piehl Lauritsen >> B?ttiger > > wrote: >> >> Hi again. >> >> I've been trying to get it working. However, I did >> run into some problems compiling SimpleRTK. The >> main issue seems to be that it depends on >> SimpleRTKCommon - which I do not have. >> >> Here is the last few lines from VS2013 >> >> > 5>LINK : fatal error LNK1181: cannot open input >> file '..\..\..\lib\Debug\SimpleRTKCommon-0.9.lib' >> [C:\Users\aplb\Work\RTK\RTK1.2- >> > >> bin-vs13\SimpleRTK-build\Code\IO\src\SimpleRTKIO.vcxproj] >> > 5> >> > 5> 0 Warning(s) >> > 5> 2 Error(s) >> > 5> >> > 5> Time Elapsed 00:00:25.26 >> > ========== Build: 4 succeeded, 1 failed, 0 >> up-to-date, 0 skipped ========== >> >> I'm not quite sure what is going on, because the >> only reference I can find to SimpleRTKCommon is >> the CMakeLists.txt on github: >> https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/CMakeLists.txt >> >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:19 AM, Simon Rit >> > > wrote: >> >> The latest MacOS. It's nice if you can test it >> on other platforms, I'll try to run it on >> Linux but I have to upgrade matlab first (I >> think python calls are available starting with >> Matlab 2014). >> Simon >> >> On Mon, Sep 19, 2016 at 11:14 AM, Arvid Piehl >> Lauritsen B?ttiger > > wrote: >> >> Dear Simon >> >> This look very interesting! Which platform >> did you successfully execute this on? >> I will give it a try at once (on windows) >> and let you know if I run into any problems. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:05 AM, Simon >> Rit > > >> wrote: >> >> Dear RTK users, >> I have quickly tested calling the >> SimpleRTK python lib from Matlab and >> it seems to work well: >> http://wiki.openrtk.org/index.php/SimpleRTK#Matlab >> >> Therefore, I don't think we have to >> work on Matlab wrappings but let us >> know if you think otherwise. >> Future works include a simple >> installation mechanism for >> pre-compiled SimpleRTK libraries. >> We'll keep you posted! >> Simon >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> >> >> >> >> > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From w_ettehadi at yahoo.com Mon Nov 7 16:53:54 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Mon, 7 Nov 2016 21:53:54 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Message-ID: <1477848112.17731.1478555634307@mail.yahoo.com> Thanks Cyril for your time and advises. Vahid On Friday, November 4, 2016 2:31 AM, Cyril Mory wrote: Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right? About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question: I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards, Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Philipp.Freislederer at med.uni-muenchen.de Thu Nov 17 05:08:09 2016 From: Philipp.Freislederer at med.uni-muenchen.de (Freislederer, Philipp) Date: Thu, 17 Nov 2016 10:08:09 +0000 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac Message-ID: Dear all, I currently have some issues in generating off-plane projections where I think rtk might be helpful. I am trying to generate projections from an Brainlab ExacTrac geometry. What I am getting is a projection matrix generated by the system itself. Using only this information I am able to project any voxel value in a CT onto a panel. Now, in order to speed everything up a little and not re-implement everything that has been done sufficiently already I am hoping to use 'rtkforwardprojections'. The problem is I am not able to reproduce the Brainlab geometry using 'rtksimulatedgeometry' from the projection matrix directly. I could calculate the room angle of the source to the panel from the projection matrix but I am getting weird results when applying these on something like plastimatch, so I think I have an error in there. Is there a way of creating a geometry simply from the projection matrix or do I have to work around and calculate every parameter needed specifically? Maybe someone has some experience with this type of issue. Thanks in advance! Philipp -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 17 05:27:14 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 17 Nov 2016 11:27:14 +0100 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac In-Reply-To: References: Message-ID: Hi, Yes ! I have actually added that functionality recently from Thibault Notargiacomo's code see bool rtk::ThreeDCircularProjectionGeometry::AddProjection ( const HomogeneousProjectionMatrixType & pMat) Note that the projection matrix must be for a 3D position in mm to a 2D position in mm. You can add pre-/post-matrices to go from mm to voxel. There is no command line tool to do it but you can easily create your command line tool to do it. This is tested in testing/rtkgeometryfrommatrixtest.cxx. Let me know if you need more info, Simon On Thu, Nov 17, 2016 at 11:08 AM, Freislederer, Philipp < Philipp.Freislederer at med.uni-muenchen.de> wrote: > Dear all, > > > > I currently have some issues in generating off-plane projections where I > think rtk might be helpful. > > I am trying to generate projections from an Brainlab ExacTrac geometry. > > What I am getting is a projection matrix generated by the system itself. > Using only this information I am able to project any voxel value in a CT > onto a panel. > > Now, in order to speed everything up a little and not re-implement > everything that has been done sufficiently already I am hoping to use > ?rtkforwardprojections?. > > The problem is I am not able to reproduce the Brainlab geometry using > ?rtksimulatedgeometry? from the projection matrix directly. > > I could calculate the room angle of the source to the panel from the > projection matrix but I am getting weird results when applying these on > something like plastimatch, so I think I have an error in there. > > > > Is there a way of creating a geometry simply from the projection matrix or > do I have to work around and calculate every parameter needed specifically? > > Maybe someone has some experience with this type of issue. > > > > Thanks in advance! > > > > Philipp > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Sat Nov 19 14:51:24 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Sat, 19 Nov 2016 19:51:24 +0000 Subject: [Rtk-users] Geometric calibration Message-ID: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ From simon.rit at creatis.insa-lyon.fr Tue Nov 22 02:01:19 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 22 Nov 2016 08:01:19 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: Message-ID: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper ). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > Hi RTK users, > > I'm interested in reconstructing images acquired by a fluoroscopy system > rotating around a knee phantom. Unfortunately, I've been unsuccessful so > far. I recognize some of the phantom in the reconstructed image, but it > contains double contours and the shape is deformed. > > I think the issue might be incorrect geometry specification. I have images > also including a phantom containing markers for which we know the > coordinates, which should allow us to calibrate the system. On the wiki on > image quality, I saw that some users had developed scripts to do the > calibration? Would someone be willing to share it? > > Kind regards, > Sepp > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: after.pdf Type: application/pdf Size: 5974 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: before.pdf Type: application/pdf Size: 5678 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: calib.py Type: text/x-python Size: 2488 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 23 12:44:11 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 23 Nov 2016 18:44:11 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Andreas, Today we had the RTK training and some users were looking for a XIM file reader. I pointed to your contributions but any chance to have it put in RTK soon? Thanks in advance, Simon On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit wrote: > Hi, > Thanks for sharing. There still seems to be some streak artefacts, do you > see the same in the Varian reconstruction? > I'm looking forward to the pull-request, I think we should try to make the > bzip2 optional. > Simon > > On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < > andreasg at phys.au.dk> wrote: > >> Thanks for the fast response Simon! >> >> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >> right all along! >> I just didn't get why it makes a difference. I think I do now, as the >> resulting image was flipped upside down and not left/right as I expected. >> [attached] >> >> The reconstruction is significantly better, I'll look into what should be >> included in the reader and what I should keep in my program to keep >> conformity with the other readers. Then I'll create a pull request. >> >> Just for the purpose of others hitting the same or a similar bug, I also >> attempted: >> I did the SART reconstruction with 10 iterations, lambda=0.3, and Joseph >> back/forward projection, *but with no* significant improvement [attached] >> >> And: >> If you want you can download the data set from: [Dropbox link to 460MB >> zip (I'll >> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >> is used along with the Scan.xml (Calibrations folder may be used in the >> future in my program, but I'm not sure if you can rely on the existence of >> the content). >> >> A MatLab XimReader is available: link >> (also >> available from Varian bitbucket along a with a python version and a >> C#->matlab plugin >> ). >> Otherwise my fork with the RTK-style reader is available from the same >> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >> so bzip2 is a new dependancy). >> >> Best regards >> Andreas >> >> >> __________________________________ >> >> Andreas Gravgaard Andersen >> >> Department of Oncology, >> >> Aarhus University Hospital >> >> N?rrebrogade 44, >> >> 8000, Aarhus C >> >> Mail: andreasg at phys.au.dk >> >> Cell: +45 3165 8140 >> >> >> >> 2016-09-16 16:13 GMT+02:00 Simon Rit : >> >>> Hi, >>> You can try any iterative reconstruction, they can also handle short >>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>> However, the nature of the artifacts indicate more a problem in the >>> geometry in my opinion. I have seen such errors when, for example, rotating >>> in the wrong direction. I can have a look if you share the dataset. >>> Cheers, >>> Simon >>> >>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>> andreasg at phys.au.dk> wrote: >>> >>>> Thanks for the suggestions, Simon and Cyril! >>>> >>>> I have been carefully looking though the geometry and from what I >>>> understand of the transformations matrices, the geometry looks correct/(as >>>> expected). >>>> >>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>> were because had used half-fan scans (full-arc). >>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>> artifacts occurs! >>>> >>>> Are there other (built-in) means of improving half-arc scans, than the >>>> parker short scan filter? >>>> >>>> Parker short scan does a decent job, but the result is still far from >>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>> >>>> Best regards >>>> Andreas >>>> >>>> >>>> __________________________________ >>>> >>>> Andreas Gravgaard Andersen >>>> >>>> Department of Oncology, >>>> >>>> Aarhus University Hospital >>>> >>>> N?rrebrogade 44, >>>> >>>> 8000, Aarhus C >>>> >>>> Mail: andreasg at phys.au.dk >>>> >>>> Cell: +45 3165 8140 >>>> >>>> >>>> >>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory : >>>> >>>>> One suggestion since it works with the Hnd projections: >>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>> Xim projections) and output two projection stack files and two geometry >>>>> files, then compare the projection stack files by subtracting one to the >>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>> are identical, then I do not see any reason why the reconstructions should >>>>> be different, so my guess is that you will find differences. >>>>> >>>>> >>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>> >>>>>> Hi, >>>>>> I have almost never worked with Varian data but it looks like a >>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>> projections which results in assigning a bad geometry to each >>>>>> projection. How did you name your projections? Maybe check that the >>>>>> order matches that of the RTK geometry file. Otherwise, there might be >>>>>> an issue in the creation of the geometry file itself. >>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>> code when you feel it's ready. >>>>>> Simon >>>>>> >>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>> wrote: >>>>>> >>>>>>> Dear RTK experts, >>>>>>> >>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>> format. I >>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>> available with RTK. >>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>> >>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>> in UI), >>>>>>> however when reconstructing with a regular FDK I get a reconstructed >>>>>>> image >>>>>>> that is smeared out around the high and low density areas [see >>>>>>> attached >>>>>>> image] >>>>>>> >>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>> Scripps >>>>>>> (~520 projections). Fixed detector and source (offset=0) with SID=2m, >>>>>>> SDD=3m. >>>>>>> >>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>> algorithm). >>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>> software works >>>>>>> perfectly. >>>>>>> >>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>> creates >>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>> If the first few projections are excluded, the following projection >>>>>>> will act >>>>>>> the same way. >>>>>>> >>>>>>> The projections are corrected for beam hardening and all the >>>>>>> projections >>>>>>> have the expected attenuation. >>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>> reconstruction >>>>>>> makes the same artifacts. >>>>>>> >>>>>>> Setting the value of the first and last projection to zero has the >>>>>>> same >>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>> not the >>>>>>> artifacts. >>>>>>> >>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>> >>>>>>> Best regards >>>>>>> Andreas >>>>>>> >>>>>>> __________________________________ >>>>>>> >>>>>>> Andreas Gravgaard Andersen >>>>>>> >>>>>>> Department of Oncology, >>>>>>> >>>>>>> Aarhus University Hospital >>>>>>> >>>>>>> N?rrebrogade 44, >>>>>>> >>>>>>> 8000, Aarhus C >>>>>>> >>>>>>> Mail: andreasg at phys.au.dk >>>>>>> >>>>>>> Cell: +45 3165 8140 >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Thu Nov 24 01:34:58 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Thu, 24 Nov 2016 06:34:58 +0000 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: , Message-ID: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Hi Simon, Thanks for the script. I was wondering if you could also share the csv or a dummy file? I'm unsure of what the second column contains. An offset distance to the rotation axis? Or the height? Which distance was known in your example? From the code it looks like the distance to the rotation axis? Sepp On 22 Nov 2016, at 08.01, Simon Rit > wrote: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt > wrote: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 24 01:44:42 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 24 Nov 2016 07:44:42 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> References: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Message-ID: Hi, Enclosed. Column 1 is platform angle, 2 is bb height, 3 is the u coordinate (in pixel) and 4 is the v coordinate (in pixel too). I had approximately measured the source-to-detector (270) and source-to-isocenter (210) distances but they were still optimized to have a better assessment. Simon On Thu, Nov 24, 2016 at 7:34 AM, Sepp de Raedt wrote: > Hi Simon, > > Thanks for the script. I was wondering if you could also share the csv or > a dummy file? I'm unsure of what the second column contains. An offset > distance to the rotation axis? Or the height? > > Which distance was known in your example? From the code it looks like the > distance to the rotation axis? > > Sepp > > On 22 Nov 2016, at 08.01, Simon Rit > wrote: > > Hi Sepp, > I did do a calibration script on a micro CT platform. The idea was that I > had a bb taken from 4 different view points at 4 different heights with a > known distance. Their projected position was segmented beforehand on the > projections and I tried to match the projections by optimizing the > calibration (which we see in before.pdf and after.pdf). I don't think it's > a good script, e.g., because I tried to find 8 parameters when 7 are > sufficient for my system (see, e.g., this paper > ). > But this gives you a starting point to develop your own script which will > hopefully be better. Please share if you do something from it! > Thanks, > Simon > > On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > >> Hi RTK users, >> >> I'm interested in reconstructing images acquired by a fluoroscopy system >> rotating around a knee phantom. Unfortunately, I've been unsuccessful so >> far. I recognize some of the phantom in the reconstructed image, but it >> contains double contours and the shape is deformed. >> >> I think the issue might be incorrect geometry specification. I have >> images also including a phantom containing markers for which we know the >> coordinates, which should allow us to calibrate the system. On the wiki on >> image quality, I saw that some users had developed scripts to do the >> calibration? Would someone be willing to share it? >> >> Kind regards, >> Sepp >> >> ______________________________________________________________________ >> This email has been scanned by the Symantec Email Security.cloud service. >> For more information please visit http://www.symanteccloud.com >> ______________________________________________________________________ >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > > > > > > > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CentroidPositions_H5_to_H25_90degstep.csv Type: text/csv Size: 321 bytes Desc: not available URL: From andreasg at phys.au.dk Fri Nov 25 10:25:55 2016 From: andreasg at phys.au.dk (Andreas Gravgaard Andersen) Date: Fri, 25 Nov 2016 16:25:55 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Simon, I have created a pull-request with the XIM file reader. I'm sorry for being late with the promised pull-request (there were a lot of merge conflicts, so it got postponed). I have cleaned it up, but it is still not flawless as mentioned in the pull-request-message. I have tried to keep the RTK coding-style by creating it as a modified HND file reader, but I have only a year of experience with C++, so I apologize if I've left some ugly code in there.. Best regards Andreas __________________________________ Andreas Gravgaard Andersen Department of Oncology, Aarhus University Hospital N?rrebrogade 44, 8000, Aarhus C Mail: andreasg at phys.au.dk Cell: +45 3165 8140 2016-11-23 18:44 GMT+01:00 Simon Rit : > Dear Andreas, > Today we had the RTK training and some users were looking for a XIM file > reader. I pointed to your contributions but any chance to have it put in > RTK soon? > Thanks in advance, > Simon > > On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit > wrote: > >> Hi, >> Thanks for sharing. There still seems to be some streak artefacts, do you >> see the same in the Varian reconstruction? >> I'm looking forward to the pull-request, I think we should try to make >> the bzip2 optional. >> Simon >> >> On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < >> andreasg at phys.au.dk> wrote: >> >>> Thanks for the fast response Simon! >>> >>> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >>> right all along! >>> I just didn't get why it makes a difference. I think I do now, as the >>> resulting image was flipped upside down and not left/right as I expected. >>> [attached] >>> >>> The reconstruction is significantly better, I'll look into what should >>> be included in the reader and what I should keep in my program to keep >>> conformity with the other readers. Then I'll create a pull request. >>> >>> Just for the purpose of others hitting the same or a similar bug, I also >>> attempted: >>> I did the SART reconstruction with 10 iterations, lambda=0.3, and >>> Joseph back/forward projection, *but with no* significant improvement >>> [attached] >>> >>> And: >>> If you want you can download the data set from: [Dropbox link to 460MB >>> zip (I'll >>> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >>> is used along with the Scan.xml (Calibrations folder may be used in the >>> future in my program, but I'm not sure if you can rely on the existence of >>> the content). >>> >>> A MatLab XimReader is available: link >>> (also >>> available from Varian bitbucket along a with a python version and a >>> C#->matlab plugin >>> ). >>> Otherwise my fork with the RTK-style reader is available from the same >>> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >>> so bzip2 is a new dependancy). >>> >>> Best regards >>> Andreas >>> >>> >>> __________________________________ >>> >>> Andreas Gravgaard Andersen >>> >>> Department of Oncology, >>> >>> Aarhus University Hospital >>> >>> N?rrebrogade 44, >>> >>> 8000, Aarhus C >>> >>> Mail: andreasg at phys.au.dk >>> >>> Cell: +45 3165 8140 >>> >>> >>> >>> 2016-09-16 16:13 GMT+02:00 Simon Rit : >>> >>>> Hi, >>>> You can try any iterative reconstruction, they can also handle short >>>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>>> However, the nature of the artifacts indicate more a problem in the >>>> geometry in my opinion. I have seen such errors when, for example, rotating >>>> in the wrong direction. I can have a look if you share the dataset. >>>> Cheers, >>>> Simon >>>> >>>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>>> andreasg at phys.au.dk> wrote: >>>> >>>>> Thanks for the suggestions, Simon and Cyril! >>>>> >>>>> I have been carefully looking though the geometry and from what I >>>>> understand of the transformations matrices, the geometry looks correct/(as >>>>> expected). >>>>> >>>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>>> were because had used half-fan scans (full-arc). >>>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>>> artifacts occurs! >>>>> >>>>> Are there other (built-in) means of improving half-arc scans, than the >>>>> parker short scan filter? >>>>> >>>>> Parker short scan does a decent job, but the result is still far from >>>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>>> >>>>> Best regards >>>>> Andreas >>>>> >>>>> >>>>> __________________________________ >>>>> >>>>> Andreas Gravgaard Andersen >>>>> >>>>> Department of Oncology, >>>>> >>>>> Aarhus University Hospital >>>>> >>>>> N?rrebrogade 44, >>>>> >>>>> 8000, Aarhus C >>>>> >>>>> Mail: andreasg at phys.au.dk >>>>> >>>>> Cell: +45 3165 8140 >>>>> >>>>> >>>>> >>>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory >>>>> : >>>>> >>>>>> One suggestion since it works with the Hnd projections: >>>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>>> Xim projections) and output two projection stack files and two geometry >>>>>> files, then compare the projection stack files by subtracting one to the >>>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>>> are identical, then I do not see any reason why the reconstructions should >>>>>> be different, so my guess is that you will find differences. >>>>>> >>>>>> >>>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>>> >>>>>>> Hi, >>>>>>> I have almost never worked with Varian data but it looks like a >>>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>>> projections which results in assigning a bad geometry to each >>>>>>> projection. How did you name your projections? Maybe check that the >>>>>>> order matches that of the RTK geometry file. Otherwise, there might >>>>>>> be >>>>>>> an issue in the creation of the geometry file itself. >>>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>>> code when you feel it's ready. >>>>>>> Simon >>>>>>> >>>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>>> wrote: >>>>>>> >>>>>>>> Dear RTK experts, >>>>>>>> >>>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>>> format. I >>>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>>> available with RTK. >>>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>>> >>>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>>> in UI), >>>>>>>> however when reconstructing with a regular FDK I get a >>>>>>>> reconstructed image >>>>>>>> that is smeared out around the high and low density areas [see >>>>>>>> attached >>>>>>>> image] >>>>>>>> >>>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>>> Scripps >>>>>>>> (~520 projections). Fixed detector and source (offset=0) with >>>>>>>> SID=2m, >>>>>>>> SDD=3m. >>>>>>>> >>>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>>> algorithm). >>>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>>> software works >>>>>>>> perfectly. >>>>>>>> >>>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>>> creates >>>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>>> If the first few projections are excluded, the following projection >>>>>>>> will act >>>>>>>> the same way. >>>>>>>> >>>>>>>> The projections are corrected for beam hardening and all the >>>>>>>> projections >>>>>>>> have the expected attenuation. >>>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>>> reconstruction >>>>>>>> makes the same artifacts. >>>>>>>> >>>>>>>> Setting the value of the first and last projection to zero has the >>>>>>>> same >>>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>>> not the >>>>>>>> artifacts. >>>>>>>> >>>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>>> >>>>>>>> Best regards >>>>>>>> Andreas >>>>>>>> >>>>>>>> __________________________________ >>>>>>>> >>>>>>>> Andreas Gravgaard Andersen >>>>>>>> >>>>>>>> Department of Oncology, >>>>>>>> >>>>>>>> Aarhus University Hospital >>>>>>>> >>>>>>>> N?rrebrogade 44, >>>>>>>> >>>>>>>> 8000, Aarhus C >>>>>>>> >>>>>>>> Mail: andreasg at phys.au.dk >>>>>>>> >>>>>>>> Cell: +45 3165 8140 >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rtk-users mailing list >>>>>>>> Rtk-users at public.kitware.com >>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From w_ettehadi at yahoo.com Tue Nov 1 12:50:12 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Tue, 1 Nov 2016 16:50:12 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> Message-ID: <1400014065.1872614.1478019012480@mail.yahoo.com> Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards,Vahid -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 02:53:39 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 07:53:39 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1400014065.1872614.1478019012480@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> Message-ID: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: > Hello RTK users and developers, > > I already implemented the RTK and reconstructed some images with the > FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. > Now, I am trying to develop a model-based image reconstruction for our > cone-beam micro-CT. I see already that some iterative algorithms like > ART and its modifications and conjugate-gradient (CG) method are > implemented in the RTK. I want to develop a model-based reconstruction > through the Newton/quasi-Newton optimizations methods. I was wondering > is it possible to extract the gradient of least square function from > implemented algorithms like CG module? Any recommendation will be > appreciated. > > Best Regards, > Vahid > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Wed Nov 2 04:01:30 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 08:01:30 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have tried but I am not getting where to give --division 4 in my code. Please find my code given below and please let me know where I need to change in my code to make it work. int _tmain(int argc, _TCHAR* argv[]) { #pragma region "Variable declaration" const double PI = 3.14159265358979323846; float *angles; int nProj = 349; typedef unsigned short pixelType; typedef float OutpixelType; const int dimension = 3; typedef itk::Image imageType; typedef itk::ImageRegionConstIterator ImageIteratorType; imageType::Pointer Projections = imageType::New(); #pragma endregion "Variable declaration" Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); imageType::SpacingType pSpacing; pSpacing[0] = 0.2960; pSpacing[1] = 0.2960; pSpacing[2] = 0.2960; Projections->SetSpacing(pSpacing); imageType::PointType pOrigin; pOrigin[0] = -212.972; pOrigin[1] = -212.972; pOrigin[2] = -212.972; //-158.50; Projections->SetOrigin(pOrigin); Projections->Update(); //Read angles. char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; angles = new float[nProj]; angles = readAngles(angles_file, angles); #pragma region"Geometry" // Geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); for (unsigned int noProj = 0; noProj < nProj; noProj++) { geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // } typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); geometryWriter->SetFilename("D:\\geo.xml"); geometryWriter->SetObject(geometry); geometryWriter->WriteFile(); geometry->Update(); #pragma endregion "Geometry" //Define output image type #ifdef USE_CUDA typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #else typedef itk::Image OutPutImageType; typedef rtk::ParkerShortScanImageFilter PSSFType; typedef rtk::FDKConeBeamReconstructionFilter FDKType; #endif //ScatterCorrection typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); ScatterCorrection->SetInput(Projections); //VarianObiRawImageFilter typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); //Create the output image typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; ConstantImageSourceType::PointType origin_p; ConstantImageSourceType::SizeType size_p; ConstantImageSourceType::SpacingType spacing_p; ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); origin_p[0] = -127.5; origin_p[1] = -127.5; origin_p[2] = -127.5; size_p[0] = 512; size_p[1] = 512; size_p[2] = 512; spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); projectionsSource->SetOrigin(origin_p); projectionsSource->SetSpacing(spacing_p); projectionsSource->SetSize(size_p); projectionsSource->SetConstant(0); // Short scan image filter PSSFType::Pointer pssf = PSSFType::New(); pssf->SetInput(AttenuationFilter->GetOutput()); pssf->SetGeometry(geometry); pssf->InPlaceOff(); std::cout << "short scan image filter success" << std::endl; FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput(0, projectionsSource->GetOutput()); feldkamp->SetInput(1, pssf->GetOutput()); feldkamp->SetGeometry(geometry); feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); feldkamp->GetRampFilter()->SetHammingFrequency(5.0); feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); feldkamp->SetGPUEnabled(1); feldkamp->SetNumberOfThreads(10000); #pragma region "Write volume" //Create a raw io for writing itk::RawImageIO::Pointer io; io = itk::RawImageIO::New(); for (unsigned int i = 0; i < dimension; i++) { io->SetDimensions(i, size_p[i]); io->SetSpacing(i, spacing_p[i]); io->SetOrigin(i, origin_p[i]); } io->SetHeaderSize(0); io->SetByteOrderToLittleEndian(); io->SetPixelType(itk::ImageIOBase::SCALAR); io->SetNumberOfComponents(1); io->SetNumberOfDimensions(3); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(feldkamp->GetOutput()); try { writer->Update(); } catch (itk::ExceptionObject & excp) { std::cerr << "Error while writing the image " << std::endl; std::cerr << excp << std::endl; getchar(); } #pragma endregion "WriteVolume" delete[] angles; return 0; } Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > I was able to perform a reconstruction from your header and geometry > file, using the following command lines: > > rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > --phantomscale "128,128,128" --like Output.mhd > > rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > The first computes projections through a Shepp & Logan phantom, with the > same size, spacing, origin, etc... as your projections, using your > geometry file geo.xml. > > The second line performs the FDK reconstruction. I had to use both the > "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > on a Geforce GTX 780). "--lowmem" loads the projections into memory by > subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > parts, reconstructs them one by one, then assembles the results. Can you > run the same commands and let us know whether you still encounter the > crash you mentioned ? If it works, you can use your own projection data > in the second command line instead of "simulatedprojections.mha". > > Best, > > Cyril > > On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > > Dear Sir, > > > > Please find the Header file in the attachment. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> We do not need the projections file, at least not for a first stage of > >> error tracking. We only need the header. > >> Try the following command line: > >> > >> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >> > >> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >> what we need, and it is a very light text file. The "proj.raw" contains > >> the pixel values, but at the moment we do not need them. We will create > >> our own proj.raw file, filled with zeros, which should be enough to > >> track down the error you encounter. > >> > >> Looking forward to receiving your file, > >> Cyril > >> > >> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>> Dear Sir, > >>> > >>> The single raw file of the projections is 1.4 GB and we are > not > >> able to send this big file to you. Can you please suggest other > alternatives > >> for this? > >>> Or can you provide us the PC configuration to solve the > issue? > >>> > >>> Let me know if any other clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Hello Zahid, > >>>> > >>>> We will need the header of your projections file, too (It is best if > you > >>>> have all your projections as a single .mhd and a single .raw file, so > it > >>>> should be 3-D image, and you send only the .mhd file). > >>>> > >>>> Regards, > >>>> Cyril > >>>> > >>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> > >>>>> I have only used RTK version 1.3.0. but in the error > >>>> message it is showing RTK version 1.2.0. > >>>>> Please find the attachment of the geometry file of > our > >>>> projections. > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> Without some more information, it's unlikely that we find the source > of > >>>>>> the problem. Here are a few things you can do to help us (and > therefore > >>>>>> yourself): > >>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > the > >>>>>> Cuda forward and back projection filters since v1.2.0, so your > problem > >>>>>> might disappear just by upgrading to the new version > >>>>>> - create a small example that reproduces your problem. You can, for > >>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>> example). And send us the script > >>>>>> - OR send us your geometry file and the header of your projections > file > >>>>>> (no need to send the projection data itself, we'll create a > zero-filled > >>>>>> stack of projections), and the command line that crashes > >>>>>> > >>>>>> Best regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Simon Rit, > >>>>>>> > >>>>>>> Please find the screen shot in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> Senior Design Engineer > >>>>>>> Mobile No. +91-9738379729 > >>>>>>> > >>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>> http://www.panaceamedical.com > >>>>>>> Bangalore - India. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>> Cc: rtk-users at public.kitware.com > >> [mailto:rtk-users at public.kitware.com], > >>>>>> saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>> memory > >>>>>>>> error. If you use the command line tool rtkfdk, you should first > make > >>>>>> sure > >>>>>>>> that you use the --lowmem option to stream the projection images. > If > >> it > >>>>>> is > >>>>>>>> no sufficient, you can split your volume using the --divisions. The > >>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of > >> RTK > >>>> on > >>>>>>>> our case studies webpage > >>>>>> . > >>>>>>>> Simon > >>>>>>>> > >>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>> > >>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>> > >>>>>>>>>> I am unable to do 1024x1024x1024 > reconstruction > >>>> using > >>>>>> RTK > >>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > shoot > >> of > >>>>>>>>> the > >>>>>>>>>> same. > >>>>>>>>>> > >>>>>>>>>> I am using the following items given below. > >>>>>>>>>> > >>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >> application > >>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>> 5. CUDA 7. > >>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>> > >>>>>>>>>> Please provide the solution of this and let me > >> know > >>>> if > >>>>>>>> any > >>>>>>>>>> other clarification is required. > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> Thanks & Regards > >>>>>>>>>> > >>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>> Senior Design Engineer > >>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>> > >>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>> Bangalore - India. > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> ____________________________________________________________ > >>>>>>>>> ________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> Rtk-users mailing list > >>>>>>> Rtk-users at public.kitware.com > >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 04:33:32 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 09:33:32 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> References: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Message-ID: <398170fb-a69e-9781-73d5-2a419542d06d@creatis.insa-lyon.fr> Dear Zahid, The --divisions is an option of the command-line application rtkfdk. It is not directly an option of the FDKConeBeamReconstructionFilter : rather, it is passed to a streaming filter at the end of the pipeline. Look for the following bit of code in rtkfdk.cxx : // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput( pfeldkamp ); streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); You can find information on how a streaming filter works on this page: https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html I hope it helps, Cyril On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have tried but I am not getting where to give --division 4 in my code. > > > Please find my code given below and please let me know where I need to change in my code to make it work. > > > int _tmain(int argc, _TCHAR* argv[]) > { > #pragma region "Variable declaration" > const double PI = 3.14159265358979323846; > float *angles; > int nProj = 349; > typedef unsigned short pixelType; > typedef float OutpixelType; > const int dimension = 3; > typedef itk::Image imageType; > typedef itk::ImageRegionConstIterator ImageIteratorType; > imageType::Pointer Projections = imageType::New(); > > #pragma endregion "Variable declaration" > > Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > imageType::SpacingType pSpacing; > pSpacing[0] = 0.2960; > pSpacing[1] = 0.2960; > pSpacing[2] = 0.2960; > Projections->SetSpacing(pSpacing); > > imageType::PointType pOrigin; > pOrigin[0] = -212.972; > pOrigin[1] = -212.972; > pOrigin[2] = -212.972; //-158.50; > Projections->SetOrigin(pOrigin); > > Projections->Update(); > > //Read angles. > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > angles = new float[nProj]; > angles = readAngles(angles_file, angles); > > #pragma region"Geometry" > // Geometry object > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > GeometryType::Pointer geometry = GeometryType::New(); > for (unsigned int noProj = 0; noProj < nProj; noProj++) > { > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // > } > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > geometryWriter->SetFilename("D:\\geo.xml"); > geometryWriter->SetObject(geometry); > geometryWriter->WriteFile(); > geometry->Update(); > #pragma endregion "Geometry" > > //Define output image type > > #ifdef USE_CUDA > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > #else > typedef itk::Image OutPutImageType; > typedef rtk::ParkerShortScanImageFilter PSSFType; > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > #endif > > //ScatterCorrection > typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); > ScatterCorrection->SetInput(Projections); > > //VarianObiRawImageFilter > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; > RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > //Create the output image > typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; > ConstantImageSourceType::PointType origin_p; > ConstantImageSourceType::SizeType size_p; > ConstantImageSourceType::SpacingType spacing_p; > ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); > origin_p[0] = -127.5; > origin_p[1] = -127.5; > origin_p[2] = -127.5; > size_p[0] = 512; > size_p[1] = 512; > size_p[2] = 512; > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > projectionsSource->SetOrigin(origin_p); > projectionsSource->SetSpacing(spacing_p); > projectionsSource->SetSize(size_p); > projectionsSource->SetConstant(0); > > // Short scan image filter > PSSFType::Pointer pssf = PSSFType::New(); > pssf->SetInput(AttenuationFilter->GetOutput()); > pssf->SetGeometry(geometry); > pssf->InPlaceOff(); > std::cout << "short scan image filter success" << std::endl; > > FDKType::Pointer feldkamp = FDKType::New(); > feldkamp->SetInput(0, projectionsSource->GetOutput()); > feldkamp->SetInput(1, pssf->GetOutput()); > feldkamp->SetGeometry(geometry); > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > feldkamp->SetGPUEnabled(1); > feldkamp->SetNumberOfThreads(10000); > > #pragma region "Write volume" > > //Create a raw io for writing > > itk::RawImageIO::Pointer io; > io = itk::RawImageIO::New(); > > for (unsigned int i = 0; i < dimension; i++) > { > io->SetDimensions(i, size_p[i]); > io->SetSpacing(i, spacing_p[i]); > io->SetOrigin(i, origin_p[i]); > } > io->SetHeaderSize(0); > io->SetByteOrderToLittleEndian(); > io->SetPixelType(itk::ImageIOBase::SCALAR); > io->SetNumberOfComponents(1); > io->SetNumberOfDimensions(3); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(feldkamp->GetOutput()); > > try > { > writer->Update(); > } > catch (itk::ExceptionObject & excp) > { > std::cerr << "Error while writing the image " << std::endl; > std::cerr << excp << std::endl; > getchar(); > } > #pragma endregion "WriteVolume" > delete[] angles; > return 0; > } > > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> I was able to perform a reconstruction from your header and geometry >> file, using the following command lines: >> >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> --phantomscale "128,128,128" --like Output.mhd >> >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> >> The first computes projections through a Shepp & Logan phantom, with the >> same size, spacing, origin, etc... as your projections, using your >> geometry file geo.xml. >> >> The second line performs the FDK reconstruction. I had to use both the >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> parts, reconstructs them one by one, then assembles the results. Can you >> run the same commands and let us know whether you still encounter the >> crash you mentioned ? If it works, you can use your own projection data >> in the second command line instead of "simulatedprojections.mha". >> >> Best, >> >> Cyril >> >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> >>> Dear Sir, >>> >>> Please find the Header file in the attachment. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> We do not need the projections file, at least not for a first stage of >>>> error tracking. We only need the header. >>>> Try the following command line: >>>> >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>> >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>> what we need, and it is a very light text file. The "proj.raw" contains >>>> the pixel values, but at the moment we do not need them. We will create >>>> our own proj.raw file, filled with zeros, which should be enough to >>>> track down the error you encounter. >>>> >>>> Looking forward to receiving your file, >>>> Cyril >>>> >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>> Dear Sir, >>>>> >>>>> The single raw file of the projections is 1.4 GB and we are >> not >>>> able to send this big file to you. Can you please suggest other >> alternatives >>>> for this? >>>>> Or can you provide us the PC configuration to solve the >> issue? >>>>> Let me know if any other clarification is required. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Hello Zahid, >>>>>> >>>>>> We will need the header of your projections file, too (It is best if >> you >>>>>> have all your projections as a single .mhd and a single .raw file, so >> it >>>>>> should be 3-D image, and you send only the .mhd file). >>>>>> >>>>>> Regards, >>>>>> Cyril >>>>>> >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>> Dear Cyril Mory, >>>>>>> >>>>>>> >>>>>>> I have only used RTK version 1.3.0. but in the error >>>>>> message it is showing RTK version 1.2.0. >>>>>>> Please find the attachment of the geometry file of >> our >>>>>> projections. >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> Without some more information, it's unlikely that we find the source >> of >>>>>>>> the problem. Here are a few things you can do to help us (and >> therefore >>>>>>>> yourself): >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >> the >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >> problem >>>>>>>> might disappear just by upgrading to the new version >>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>> example). And send us the script >>>>>>>> - OR send us your geometry file and the header of your projections >> file >>>>>>>> (no need to send the projection data itself, we'll create a >> zero-filled >>>>>>>> stack of projections), and the command line that crashes >>>>>>>> >>>>>>>> Best regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Simon Rit, >>>>>>>>> >>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> Senior Design Engineer >>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>> >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>> http://www.panaceamedical.com >>>>>>>>> Bangalore - India. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>> Cc: rtk-users at public.kitware.com >>>> [mailto:rtk-users at public.kitware.com], >>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>> memory >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >> make >>>>>>>> sure >>>>>>>>>> that you use the --lowmem option to stream the projection images. >> If >>>> it >>>>>>>> is >>>>>>>>>> no sufficient, you can split your volume using the --divisions. The >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of >>>> RTK >>>>>> on >>>>>>>>>> our case studies webpage >>>>>>>> . >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>> >>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>> >>>>>>>>>>>> I am unable to do 1024x1024x1024 >> reconstruction >>>>>> using >>>>>>>> RTK >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >> shoot >>>> of >>>>>>>>>>> the >>>>>>>>>>>> same. >>>>>>>>>>>> >>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>> >>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>> application >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>> >>>>>>>>>>>> Please provide the solution of this and let me >>>> know >>>>>> if >>>>>>>>>> any >>>>>>>>>>>> other clarification is required. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>> >>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>> >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>> Bangalore - India. >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>> ________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rtk-users mailing list >>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 06:57:15 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 10:57:15 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. Please check my modified file writer code given below. // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput(feldkamp->GetOutput()); streamerBP->SetNumberOfStreamDivisions(4); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(streamerBP->GetOutput()); writer->SetNumberOfStreamDivisions(4); Please let me know if any clarification is required. Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The --divisions is an option of the command-line application rtkfdk. It > is not directly an option of the FDKConeBeamReconstructionFilter : > rather, it is passed to a streaming filter at the end of the pipeline. > Look for the following bit of code in rtkfdk.cxx : > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter CPUOutputImageType> StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput( pfeldkamp ); > streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > > You can find information on how a streaming filter works on this page: > > https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > I hope it helps, > > Cyril > > On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have tried but I am not getting where to give > --division 4 in my code. > > > > > > Please find my code given below and please let me know > where I need to change in my code to make it work. > > > > > > int _tmain(int argc, _TCHAR* argv[]) > > { > > #pragma region "Variable declaration" > > const double PI = 3.14159265358979323846; > > float *angles; > > int nProj = 349; > > typedef unsigned short pixelType; > > typedef float OutpixelType; > > const int dimension = 3; > > typedef itk::Image imageType; > > typedef itk::ImageRegionConstIterator ImageIteratorType; > > imageType::Pointer Projections = imageType::New(); > > > > #pragma endregion "Variable declaration" > > > > Projections = > ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > > imageType::SpacingType pSpacing; > > pSpacing[0] = 0.2960; > > pSpacing[1] = 0.2960; > > pSpacing[2] = 0.2960; > > Projections->SetSpacing(pSpacing); > > > > imageType::PointType pOrigin; > > pOrigin[0] = -212.972; > > pOrigin[1] = -212.972; > > pOrigin[2] = -212.972; //-158.50; > > Projections->SetOrigin(pOrigin); > > > > Projections->Update(); > > > > //Read angles. > > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > angles = new float[nProj]; > > angles = readAngles(angles_file, angles); > > > > #pragma region"Geometry" > > // Geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > for (unsigned int noProj = 0; noProj < nProj; noProj++) > > { > > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); > // 136 half fan //2.07 Kidwai // > > } > > > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > GeometryWriterType; > > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > > geometryWriter->SetFilename("D:\\geo.xml"); > > geometryWriter->SetObject(geometry); > > geometryWriter->WriteFile(); > > geometry->Update(); > > #pragma endregion "Geometry" > > > > //Define output image type > > > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef itk::Image OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter PSSFType; > > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > > #endif > > > > //ScatterCorrection > > typedef rtk::BoellaardScatterCorrectionImageFilter > BoellaardScatterCorrectionImageFilterType; > > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > BoellaardScatterCorrectionImageFilterType::New(); > > ScatterCorrection->SetInput(Projections); > > > > //VarianObiRawImageFilter > > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > RawImageFilterType; > > RawImageFilterType::Pointer AttenuationFilter = > RawImageFilterType::New(); > > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > > > //Create the output image > > typedef rtk::ConstantImageSource< OutPutImageType > > ConstantImageSourceType; > > ConstantImageSourceType::PointType origin_p; > > ConstantImageSourceType::SizeType size_p; > > ConstantImageSourceType::SpacingType spacing_p; > > ConstantImageSourceType::Pointer projectionsSource = > ConstantImageSourceType::New(); > > origin_p[0] = -127.5; > > origin_p[1] = -127.5; > > origin_p[2] = -127.5; > > size_p[0] = 512; > > size_p[1] = 512; > > size_p[2] = 512; > > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > > > projectionsSource->SetOrigin(origin_p); > > projectionsSource->SetSpacing(spacing_p); > > projectionsSource->SetSize(size_p); > > projectionsSource->SetConstant(0); > > > > // Short scan image filter > > PSSFType::Pointer pssf = PSSFType::New(); > > pssf->SetInput(AttenuationFilter->GetOutput()); > > pssf->SetGeometry(geometry); > > pssf->InPlaceOff(); > > std::cout << "short scan image filter success" << std::endl; > > > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput(0, projectionsSource->GetOutput()); > > feldkamp->SetInput(1, pssf->GetOutput()); > > feldkamp->SetGeometry(geometry); > > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > feldkamp->SetGPUEnabled(1); > > feldkamp->SetNumberOfThreads(10000); > > > > #pragma region "Write volume" > > > > //Create a raw io for writing > > > > itk::RawImageIO::Pointer io; > > io = itk::RawImageIO::New(); > > > > for (unsigned int i = 0; i < dimension; i++) > > { > > io->SetDimensions(i, size_p[i]); > > io->SetSpacing(i, spacing_p[i]); > > io->SetOrigin(i, origin_p[i]); > > } > > io->SetHeaderSize(0); > > io->SetByteOrderToLittleEndian(); > > io->SetPixelType(itk::ImageIOBase::SCALAR); > > io->SetNumberOfComponents(1); > > io->SetNumberOfDimensions(3); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(feldkamp->GetOutput()); > > > > try > > { > > writer->Update(); > > } > > catch (itk::ExceptionObject & excp) > > { > > std::cerr << "Error while writing the image " << std::endl; > > std::cerr << excp << std::endl; > > getchar(); > > } > > #pragma endregion "WriteVolume" > > delete[] angles; > > return 0; > > } > > > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> I was able to perform a reconstruction from your header and geometry > >> file, using the following command lines: > >> > >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >> --phantomscale "128,128,128" --like Output.mhd > >> > >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >> > >> The first computes projections through a Shepp & Logan phantom, with the > >> same size, spacing, origin, etc... as your projections, using your > >> geometry file geo.xml. > >> > >> The second line performs the FDK reconstruction. I had to use both the > >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >> parts, reconstructs them one by one, then assembles the results. Can you > >> run the same commands and let us know whether you still encounter the > >> crash you mentioned ? If it works, you can use your own projection data > >> in the second command line instead of "simulatedprojections.mha". > >> > >> Best, > >> > >> Cyril > >> > >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >> > >>> Dear Sir, > >>> > >>> Please find the Header file in the attachment. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> We do not need the projections file, at least not for a first stage of > >>>> error tracking. We only need the header. > >>>> Try the following command line: > >>>> > >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>> > >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>> what we need, and it is a very light text file. The "proj.raw" contains > >>>> the pixel values, but at the moment we do not need them. We will create > >>>> our own proj.raw file, filled with zeros, which should be enough to > >>>> track down the error you encounter. > >>>> > >>>> Looking forward to receiving your file, > >>>> Cyril > >>>> > >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Sir, > >>>>> > >>>>> The single raw file of the projections is 1.4 GB and we > are > >> not > >>>> able to send this big file to you. Can you please suggest other > >> alternatives > >>>> for this? > >>>>> Or can you provide us the PC configuration to solve the > >> issue? > >>>>> Let me know if any other clarification is required. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Hello Zahid, > >>>>>> > >>>>>> We will need the header of your projections file, too (It is best if > >> you > >>>>>> have all your projections as a single .mhd and a single .raw file, so > >> it > >>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>> > >>>>>> Regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Cyril Mory, > >>>>>>> > >>>>>>> > >>>>>>> I have only used RTK version 1.3.0. but in the > error > >>>>>> message it is showing RTK version 1.2.0. > >>>>>>> Please find the attachment of the geometry file > of > >> our > >>>>>> projections. > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> Without some more information, it's unlikely that we find the > source > >> of > >>>>>>>> the problem. Here are a few things you can do to help us (and > >> therefore > >>>>>>>> yourself): > >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > >> the > >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >> problem > >>>>>>>> might disappear just by upgrading to the new version > >>>>>>>> - create a small example that reproduces your problem. You can, for > >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>> example). And send us the script > >>>>>>>> - OR send us your geometry file and the header of your projections > >> file > >>>>>>>> (no need to send the projection data itself, we'll create a > >> zero-filled > >>>>>>>> stack of projections), and the command line that crashes > >>>>>>>> > >>>>>>>> Best regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Simon Rit, > >>>>>>>>> > >>>>>>>>> Please find the screen shot in the attachment. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> Senior Design Engineer > >>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>> > >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>> http://www.panaceamedical.com > >>>>>>>>> Bangalore - India. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>> Cc: rtk-users at public.kitware.com > >>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>>>> memory > >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first > >> make > >>>>>>>> sure > >>>>>>>>>> that you use the --lowmem option to stream the projection images. > >> If > >>>> it > >>>>>>>> is > >>>>>>>>>> no sufficient, you can split your volume using the --divisions. > The > >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > of > >>>> RTK > >>>>>> on > >>>>>>>>>> our case studies webpage > >>>>>>>> . > >>>>>>>>>> Simon > >>>>>>>>>> > >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>> > >>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>> > >>>>>>>>>>>> I am unable to do 1024x1024x1024 > >> reconstruction > >>>>>> using > >>>>>>>> RTK > >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >> shoot > >>>> of > >>>>>>>>>>> the > >>>>>>>>>>>> same. > >>>>>>>>>>>> > >>>>>>>>>>>> I am using the following items given below. > >>>>>>>>>>>> > >>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>> application > >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>> > >>>>>>>>>>>> Please provide the solution of this and let > me > >>>> know > >>>>>> if > >>>>>>>>>> any > >>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>> > >>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>> > >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>> ________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 08:27:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 13:27:18 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> References: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Message-ID: <84154ed0-3cb8-abf7-c253-3162d78bf7b7@creatis.insa-lyon.fr> I see two errors: Remove this line writer->SetNumberOfStreamDivisions(4); since only the streaming filter, not the write filter, needs to know about the number of divisions. And change the filename to "D:\\Output.mhd" It will write both the .mhd and the .raw files. I hope it helps, Cyril On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. > > Please check my modified file writer code given below. > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput(feldkamp->GetOutput()); > streamerBP->SetNumberOfStreamDivisions(4); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(streamerBP->GetOutput()); > writer->SetNumberOfStreamDivisions(4); > > > Please let me know if any clarification is required. > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> The --divisions is an option of the command-line application rtkfdk. It >> is not directly an option of the FDKConeBeamReconstructionFilter : >> rather, it is passed to a streaming filter at the end of the pipeline. >> Look for the following bit of code in rtkfdk.cxx : >> >> // Streaming depending on streaming capability of writer >> typedef itk::StreamingImageFilter> CPUOutputImageType> StreamerType; >> StreamerType::Pointer streamerBP = StreamerType::New(); >> streamerBP->SetInput( pfeldkamp ); >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >> >> You can find information on how a streaming filter works on this page: >> >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> >> I hope it helps, >> >> Cyril >> >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have tried but I am not getting where to give >> --division 4 in my code. >>> >>> Please find my code given below and please let me know >> where I need to change in my code to make it work. >>> >>> int _tmain(int argc, _TCHAR* argv[]) >>> { >>> #pragma region "Variable declaration" >>> const double PI = 3.14159265358979323846; >>> float *angles; >>> int nProj = 349; >>> typedef unsigned short pixelType; >>> typedef float OutpixelType; >>> const int dimension = 3; >>> typedef itk::Image imageType; >>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>> imageType::Pointer Projections = imageType::New(); >>> >>> #pragma endregion "Variable declaration" >>> >>> Projections = >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); >>> imageType::SpacingType pSpacing; >>> pSpacing[0] = 0.2960; >>> pSpacing[1] = 0.2960; >>> pSpacing[2] = 0.2960; >>> Projections->SetSpacing(pSpacing); >>> >>> imageType::PointType pOrigin; >>> pOrigin[0] = -212.972; >>> pOrigin[1] = -212.972; >>> pOrigin[2] = -212.972; //-158.50; >>> Projections->SetOrigin(pOrigin); >>> >>> Projections->Update(); >>> >>> //Read angles. >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>> angles = new float[nProj]; >>> angles = readAngles(angles_file, angles); >>> >>> #pragma region"Geometry" >>> // Geometry object >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> GeometryType::Pointer geometry = GeometryType::New(); >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>> { >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); >> // 136 half fan //2.07 Kidwai // >>> } >>> >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> GeometryWriterType; >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>> geometryWriter->SetFilename("D:\\geo.xml"); >>> geometryWriter->SetObject(geometry); >>> geometryWriter->WriteFile(); >>> geometry->Update(); >>> #pragma endregion "Geometry" >>> >>> //Define output image type >>> >>> #ifdef USE_CUDA >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> #else >>> typedef itk::Image OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>> #endif >>> >>> //ScatterCorrection >>> typedef rtk::BoellaardScatterCorrectionImageFilter >> BoellaardScatterCorrectionImageFilterType; >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >> BoellaardScatterCorrectionImageFilterType::New(); >>> ScatterCorrection->SetInput(Projections); >>> >>> //VarianObiRawImageFilter >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> RawImageFilterType; >>> RawImageFilterType::Pointer AttenuationFilter = >> RawImageFilterType::New(); >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>> >>> //Create the output image >>> typedef rtk::ConstantImageSource< OutPutImageType > >> ConstantImageSourceType; >>> ConstantImageSourceType::PointType origin_p; >>> ConstantImageSourceType::SizeType size_p; >>> ConstantImageSourceType::SpacingType spacing_p; >>> ConstantImageSourceType::Pointer projectionsSource = >> ConstantImageSourceType::New(); >>> origin_p[0] = -127.5; >>> origin_p[1] = -127.5; >>> origin_p[2] = -127.5; >>> size_p[0] = 512; >>> size_p[1] = 512; >>> size_p[2] = 512; >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>> >>> projectionsSource->SetOrigin(origin_p); >>> projectionsSource->SetSpacing(spacing_p); >>> projectionsSource->SetSize(size_p); >>> projectionsSource->SetConstant(0); >>> >>> // Short scan image filter >>> PSSFType::Pointer pssf = PSSFType::New(); >>> pssf->SetInput(AttenuationFilter->GetOutput()); >>> pssf->SetGeometry(geometry); >>> pssf->InPlaceOff(); >>> std::cout << "short scan image filter success" << std::endl; >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>> feldkamp->SetInput(1, pssf->GetOutput()); >>> feldkamp->SetGeometry(geometry); >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>> feldkamp->SetGPUEnabled(1); >>> feldkamp->SetNumberOfThreads(10000); >>> >>> #pragma region "Write volume" >>> >>> //Create a raw io for writing >>> >>> itk::RawImageIO::Pointer io; >>> io = itk::RawImageIO::New(); >>> >>> for (unsigned int i = 0; i < dimension; i++) >>> { >>> io->SetDimensions(i, size_p[i]); >>> io->SetSpacing(i, spacing_p[i]); >>> io->SetOrigin(i, origin_p[i]); >>> } >>> io->SetHeaderSize(0); >>> io->SetByteOrderToLittleEndian(); >>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>> io->SetNumberOfComponents(1); >>> io->SetNumberOfDimensions(3); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(feldkamp->GetOutput()); >>> >>> try >>> { >>> writer->Update(); >>> } >>> catch (itk::ExceptionObject & excp) >>> { >>> std::cerr << "Error while writing the image " << std::endl; >>> std::cerr << excp << std::endl; >>> getchar(); >>> } >>> #pragma endregion "WriteVolume" >>> delete[] angles; >>> return 0; >>> } >>> >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> I was able to perform a reconstruction from your header and geometry >>>> file, using the following command lines: >>>> >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>> --phantomscale "128,128,128" --like Output.mhd >>>> >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>> >>>> The first computes projections through a Shepp & Logan phantom, with the >>>> same size, spacing, origin, etc... as your projections, using your >>>> geometry file geo.xml. >>>> >>>> The second line performs the FDK reconstruction. I had to use both the >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>> parts, reconstructs them one by one, then assembles the results. Can you >>>> run the same commands and let us know whether you still encounter the >>>> crash you mentioned ? If it works, you can use your own projection data >>>> in the second command line instead of "simulatedprojections.mha". >>>> >>>> Best, >>>> >>>> Cyril >>>> >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>> >>>>> Dear Sir, >>>>> >>>>> Please find the Header file in the attachment. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> We do not need the projections file, at least not for a first stage of >>>>>> error tracking. We only need the header. >>>>>> Try the following command line: >>>>>> >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>> >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>> what we need, and it is a very light text file. The "proj.raw" contains >>>>>> the pixel values, but at the moment we do not need them. We will create >>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>> track down the error you encounter. >>>>>> >>>>>> Looking forward to receiving your file, >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>> Dear Sir, >>>>>>> >>>>>>> The single raw file of the projections is 1.4 GB and we >> are >>>> not >>>>>> able to send this big file to you. Can you please suggest other >>>> alternatives >>>>>> for this? >>>>>>> Or can you provide us the PC configuration to solve the >>>> issue? >>>>>>> Let me know if any other clarification is required. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Hello Zahid, >>>>>>>> >>>>>>>> We will need the header of your projections file, too (It is best if >>>> you >>>>>>>> have all your projections as a single .mhd and a single .raw file, so >>>> it >>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>> >>>>>>>> Regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Cyril Mory, >>>>>>>>> >>>>>>>>> >>>>>>>>> I have only used RTK version 1.3.0. but in the >> error >>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>> Please find the attachment of the geometry file >> of >>>> our >>>>>>>> projections. >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> >>>>>>>>>> Without some more information, it's unlikely that we find the >> source >>>> of >>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>> therefore >>>>>>>>>> yourself): >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >>>> the >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>> problem >>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>> example). And send us the script >>>>>>>>>> - OR send us your geometry file and the header of your projections >>>> file >>>>>>>>>> (no need to send the projection data itself, we'll create a >>>> zero-filled >>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>> >>>>>>>>>> Best regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>> >>>>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> Senior Design Engineer >>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>> >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>> Bangalore - India. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>>>> memory >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >>>> make >>>>>>>>>> sure >>>>>>>>>>>> that you use the --lowmem option to stream the projection images. >>>> If >>>>>> it >>>>>>>>>> is >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >> The >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >> of >>>>>> RTK >>>>>>>> on >>>>>>>>>>>> our case studies webpage >>>>>>>>>> . >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>> reconstruction >>>>>>>> using >>>>>>>>>> RTK >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>> shoot >>>>>> of >>>>>>>>>>>>> the >>>>>>>>>>>>>> same. >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>>>> >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>> application >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Please provide the solution of this and let >> me >>>>>> know >>>>>>>> if >>>>>>>>>>>> any >>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>> >>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>> >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url >> : >>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>> ________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>> >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>>>> >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 09:37:23 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 13:37:23 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. Please suggest us for further process. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > I see two errors: > > Remove this line > > writer->SetNumberOfStreamDivisions(4); > > since only the streaming filter, not the write filter, needs to know > about the number of divisions. > And change the filename to > > "D:\\Output.mhd" > > It will write both the .mhd and the .raw files. > > I hope it helps, > Cyril > > On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have modified my file writer code and used > StreamingImageFilter. Now its not giving any error message but the final > output is 0 byte for 1024 volume. It working fine for 512 volume. > > > > Please check my modified file writer code given below. > > > > // Streaming depending on streaming capability of writer > > typedef itk::StreamingImageFilter > StreamerType; > > StreamerType::Pointer streamerBP = StreamerType::New(); > > streamerBP->SetInput(feldkamp->GetOutput()); > > streamerBP->SetNumberOfStreamDivisions(4); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(streamerBP->GetOutput()); > > writer->SetNumberOfStreamDivisions(4); > > > > > > Please let me know if any clarification is required. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> The --divisions is an option of the command-line application rtkfdk. It > >> is not directly an option of the FDKConeBeamReconstructionFilter : > >> rather, it is passed to a streaming filter at the end of the pipeline. > >> Look for the following bit of code in rtkfdk.cxx : > >> > >> // Streaming depending on streaming capability of writer > >> typedef itk::StreamingImageFilter >> CPUOutputImageType> StreamerType; > >> StreamerType::Pointer streamerBP = StreamerType::New(); > >> streamerBP->SetInput( pfeldkamp ); > >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >> > >> You can find information on how a streaming filter works on this page: > >> > >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >> > >> I hope it helps, > >> > >> Cyril > >> > >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have tried but I am not getting where to give > >> --division 4 in my code. > >>> > >>> Please find my code given below and please let me know > >> where I need to change in my code to make it work. > >>> > >>> int _tmain(int argc, _TCHAR* argv[]) > >>> { > >>> #pragma region "Variable declaration" > >>> const double PI = 3.14159265358979323846; > >>> float *angles; > >>> int nProj = 349; > >>> typedef unsigned short pixelType; > >>> typedef float OutpixelType; > >>> const int dimension = 3; > >>> typedef itk::Image imageType; > >>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>> imageType::Pointer Projections = imageType::New(); > >>> > >>> #pragma endregion "Variable declaration" > >>> > >>> Projections = > >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > nProj); > >>> imageType::SpacingType pSpacing; > >>> pSpacing[0] = 0.2960; > >>> pSpacing[1] = 0.2960; > >>> pSpacing[2] = 0.2960; > >>> Projections->SetSpacing(pSpacing); > >>> > >>> imageType::PointType pOrigin; > >>> pOrigin[0] = -212.972; > >>> pOrigin[1] = -212.972; > >>> pOrigin[2] = -212.972; //-158.50; > >>> Projections->SetOrigin(pOrigin); > >>> > >>> Projections->Update(); > >>> > >>> //Read angles. > >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>> angles = new float[nProj]; > >>> angles = readAngles(angles_file, angles); > >>> > >>> #pragma region"Geometry" > >>> // Geometry object > >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>> GeometryType::Pointer geometry = GeometryType::New(); > >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>> { > >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > 0); > >> // 136 half fan //2.07 Kidwai // > >>> } > >>> > >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >> GeometryWriterType; > >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > >>> geometryWriter->SetFilename("D:\\geo.xml"); > >>> geometryWriter->SetObject(geometry); > >>> geometryWriter->WriteFile(); > >>> geometry->Update(); > >>> #pragma endregion "Geometry" > >>> > >>> //Define output image type > >>> > >>> #ifdef USE_CUDA > >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>> #else > >>> typedef itk::Image OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; > >>> #endif > >>> > >>> //ScatterCorrection > >>> typedef rtk::BoellaardScatterCorrectionImageFilter > > >> BoellaardScatterCorrectionImageFilterType; > >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > >> BoellaardScatterCorrectionImageFilterType::New(); > >>> ScatterCorrection->SetInput(Projections); > >>> > >>> //VarianObiRawImageFilter > >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >> RawImageFilterType; > >>> RawImageFilterType::Pointer AttenuationFilter = > >> RawImageFilterType::New(); > >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>> > >>> //Create the output image > >>> typedef rtk::ConstantImageSource< OutPutImageType > > >> ConstantImageSourceType; > >>> ConstantImageSourceType::PointType origin_p; > >>> ConstantImageSourceType::SizeType size_p; > >>> ConstantImageSourceType::SpacingType spacing_p; > >>> ConstantImageSourceType::Pointer projectionsSource = > >> ConstantImageSourceType::New(); > >>> origin_p[0] = -127.5; > >>> origin_p[1] = -127.5; > >>> origin_p[2] = -127.5; > >>> size_p[0] = 512; > >>> size_p[1] = 512; > >>> size_p[2] = 512; > >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>> > >>> projectionsSource->SetOrigin(origin_p); > >>> projectionsSource->SetSpacing(spacing_p); > >>> projectionsSource->SetSize(size_p); > >>> projectionsSource->SetConstant(0); > >>> > >>> // Short scan image filter > >>> PSSFType::Pointer pssf = PSSFType::New(); > >>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>> pssf->SetGeometry(geometry); > >>> pssf->InPlaceOff(); > >>> std::cout << "short scan image filter success" << std::endl; > >>> > >>> FDKType::Pointer feldkamp = FDKType::New(); > >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>> feldkamp->SetInput(1, pssf->GetOutput()); > >>> feldkamp->SetGeometry(geometry); > >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>> feldkamp->SetGPUEnabled(1); > >>> feldkamp->SetNumberOfThreads(10000); > >>> > >>> #pragma region "Write volume" > >>> > >>> //Create a raw io for writing > >>> > >>> itk::RawImageIO::Pointer io; > >>> io = itk::RawImageIO::New(); > >>> > >>> for (unsigned int i = 0; i < dimension; i++) > >>> { > >>> io->SetDimensions(i, size_p[i]); > >>> io->SetSpacing(i, spacing_p[i]); > >>> io->SetOrigin(i, origin_p[i]); > >>> } > >>> io->SetHeaderSize(0); > >>> io->SetByteOrderToLittleEndian(); > >>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>> io->SetNumberOfComponents(1); > >>> io->SetNumberOfDimensions(3); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(feldkamp->GetOutput()); > >>> > >>> try > >>> { > >>> writer->Update(); > >>> } > >>> catch (itk::ExceptionObject & excp) > >>> { > >>> std::cerr << "Error while writing the image " << std::endl; > >>> std::cerr << excp << std::endl; > >>> getchar(); > >>> } > >>> #pragma endregion "WriteVolume" > >>> delete[] angles; > >>> return 0; > >>> } > >>> > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> I was able to perform a reconstruction from your header and geometry > >>>> file, using the following command lines: > >>>> > >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>> --phantomscale "128,128,128" --like Output.mhd > >>>> > >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > --hardware > >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>> > >>>> The first computes projections through a Shepp & Logan phantom, with > the > >>>> same size, spacing, origin, etc... as your projections, using your > >>>> geometry file geo.xml. > >>>> > >>>> The second line performs the FDK reconstruction. I had to use both the > >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>> parts, reconstructs them one by one, then assembles the results. Can > you > >>>> run the same commands and let us know whether you still encounter the > >>>> crash you mentioned ? If it works, you can use your own projection data > >>>> in the second command line instead of "simulatedprojections.mha". > >>>> > >>>> Best, > >>>> > >>>> Cyril > >>>> > >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>> > >>>>> Dear Sir, > >>>>> > >>>>> Please find the Header file in the attachment. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> We do not need the projections file, at least not for a first stage > of > >>>>>> error tracking. We only need the header. > >>>>>> Try the following command line: > >>>>>> > >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>> > >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>>>> what we need, and it is a very light text file. The "proj.raw" > contains > >>>>>> the pixel values, but at the moment we do not need them. We will > create > >>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>> track down the error you encounter. > >>>>>> > >>>>>> Looking forward to receiving your file, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> The single raw file of the projections is 1.4 GB and > we > >> are > >>>> not > >>>>>> able to send this big file to you. Can you please suggest other > >>>> alternatives > >>>>>> for this? > >>>>>>> Or can you provide us the PC configuration to solve > the > >>>> issue? > >>>>>>> Let me know if any other clarification is required. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Hello Zahid, > >>>>>>>> > >>>>>>>> We will need the header of your projections file, too (It is best > if > >>>> you > >>>>>>>> have all your projections as a single .mhd and a single .raw file, > so > >>>> it > >>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>> > >>>>>>>> Regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Cyril Mory, > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> I have only used RTK version 1.3.0. but in the > >> error > >>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>> Please find the attachment of the geometry > file > >> of > >>>> our > >>>>>>>> projections. > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> > >>>>>>>>>> Without some more information, it's unlikely that we find the > >> source > >>>> of > >>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>> therefore > >>>>>>>>>> yourself): > >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes > in > >>>> the > >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>> problem > >>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>> - create a small example that reproduces your problem. You can, > for > >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > logan > >>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>>>> example). And send us the script > >>>>>>>>>> - OR send us your geometry file and the header of your > projections > >>>> file > >>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>> zero-filled > >>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>> > >>>>>>>>>> Best regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>> > >>>>>>>>>>> Please find the screen shot in the > attachment. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>> > >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > CUDA > >>>>>>>> memory > >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > first > >>>> make > >>>>>>>>>> sure > >>>>>>>>>>>> that you use the --lowmem option to stream the projection > images. > >>>> If > >>>>>> it > >>>>>>>>>> is > >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. > >> The > >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > >> of > >>>>>> RTK > >>>>>>>> on > >>>>>>>>>>>> our case studies webpage > >>>>>>>>>> . > >>>>>>>>>>>> Simon > >>>>>>>>>>>> > >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>> reconstruction > >>>>>>>> using > >>>>>>>>>> RTK > >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >>>> shoot > >>>>>> of > >>>>>>>>>>>>> the > >>>>>>>>>>>>>> same. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am using the following items given > below. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>>>> application > >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Please provide the solution of this and > let > >> me > >>>>>> know > >>>>>>>> if > >>>>>>>>>>>> any > >>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, > >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > >> : > >>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>> ________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>> > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: RTK_Error.png Type: image/png Size: 57211 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 10:00:50 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 15:00:50 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> References: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Message-ID: <94e0045d-ef88-726d-9b7b-8b5ebf5ac067@creatis.insa-lyon.fr> Dear Zahid, The output looks correct. If the command line solution I suggested in a previous email works, the best way to move forward would be to compare your code and that of rtkfdk.cxx, and where it differs, make sure you have not introduced an error. Cyril On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. > > Please suggest us for further process. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> I see two errors: >> >> Remove this line >> >> writer->SetNumberOfStreamDivisions(4); >> >> since only the streaming filter, not the write filter, needs to know >> about the number of divisions. >> And change the filename to >> >> "D:\\Output.mhd" >> >> It will write both the .mhd and the .raw files. >> >> I hope it helps, >> Cyril >> >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have modified my file writer code and used >> StreamingImageFilter. Now its not giving any error message but the final >> output is 0 byte for 1024 volume. It working fine for 512 volume. >>> Please check my modified file writer code given below. >>> >>> // Streaming depending on streaming capability of writer >>> typedef itk::StreamingImageFilter >> StreamerType; >>> StreamerType::Pointer streamerBP = StreamerType::New(); >>> streamerBP->SetInput(feldkamp->GetOutput()); >>> streamerBP->SetNumberOfStreamDivisions(4); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(streamerBP->GetOutput()); >>> writer->SetNumberOfStreamDivisions(4); >>> >>> >>> Please let me know if any clarification is required. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> The --divisions is an option of the command-line application rtkfdk. It >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >>>> rather, it is passed to a streaming filter at the end of the pipeline. >>>> Look for the following bit of code in rtkfdk.cxx : >>>> >>>> // Streaming depending on streaming capability of writer >>>> typedef itk::StreamingImageFilter>>> CPUOutputImageType> StreamerType; >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >>>> streamerBP->SetInput( pfeldkamp ); >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >>>> >>>> You can find information on how a streaming filter works on this page: >>>> >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >>>> >>>> I hope it helps, >>>> >>>> Cyril >>>> >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>>>> Dear Cyril Mory, >>>>> >>>>> I have tried but I am not getting where to give >>>> --division 4 in my code. >>>>> Please find my code given below and please let me know >>>> where I need to change in my code to make it work. >>>>> int _tmain(int argc, _TCHAR* argv[]) >>>>> { >>>>> #pragma region "Variable declaration" >>>>> const double PI = 3.14159265358979323846; >>>>> float *angles; >>>>> int nProj = 349; >>>>> typedef unsigned short pixelType; >>>>> typedef float OutpixelType; >>>>> const int dimension = 3; >>>>> typedef itk::Image imageType; >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>>>> imageType::Pointer Projections = imageType::New(); >>>>> >>>>> #pragma endregion "Variable declaration" >>>>> >>>>> Projections = >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> nProj); >>>>> imageType::SpacingType pSpacing; >>>>> pSpacing[0] = 0.2960; >>>>> pSpacing[1] = 0.2960; >>>>> pSpacing[2] = 0.2960; >>>>> Projections->SetSpacing(pSpacing); >>>>> >>>>> imageType::PointType pOrigin; >>>>> pOrigin[0] = -212.972; >>>>> pOrigin[1] = -212.972; >>>>> pOrigin[2] = -212.972; //-158.50; >>>>> Projections->SetOrigin(pOrigin); >>>>> >>>>> Projections->Update(); >>>>> >>>>> //Read angles. >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>>>> angles = new float[nProj]; >>>>> angles = readAngles(angles_file, angles); >>>>> >>>>> #pragma region"Geometry" >>>>> // Geometry object >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>>>> { >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, >> 0); >>>> // 136 half fan //2.07 Kidwai // >>>>> } >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >>>> GeometryWriterType; >>>>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >>>>> geometryWriter->SetObject(geometry); >>>>> geometryWriter->WriteFile(); >>>>> geometry->Update(); >>>>> #pragma endregion "Geometry" >>>>> >>>>> //Define output image type >>>>> >>>>> #ifdef USE_CUDA >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> #else >>>>> typedef itk::Image OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>>>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>>>> #endif >>>>> >>>>> //ScatterCorrection >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter>>> BoellaardScatterCorrectionImageFilterType; >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >>>> BoellaardScatterCorrectionImageFilterType::New(); >>>>> ScatterCorrection->SetInput(Projections); >>>>> >>>>> //VarianObiRawImageFilter >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >>>> RawImageFilterType; >>>>> RawImageFilterType::Pointer AttenuationFilter = >>>> RawImageFilterType::New(); >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>>>> >>>>> //Create the output image >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >>>> ConstantImageSourceType; >>>>> ConstantImageSourceType::PointType origin_p; >>>>> ConstantImageSourceType::SizeType size_p; >>>>> ConstantImageSourceType::SpacingType spacing_p; >>>>> ConstantImageSourceType::Pointer projectionsSource = >>>> ConstantImageSourceType::New(); >>>>> origin_p[0] = -127.5; >>>>> origin_p[1] = -127.5; >>>>> origin_p[2] = -127.5; >>>>> size_p[0] = 512; >>>>> size_p[1] = 512; >>>>> size_p[2] = 512; >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>>>> >>>>> projectionsSource->SetOrigin(origin_p); >>>>> projectionsSource->SetSpacing(spacing_p); >>>>> projectionsSource->SetSize(size_p); >>>>> projectionsSource->SetConstant(0); >>>>> >>>>> // Short scan image filter >>>>> PSSFType::Pointer pssf = PSSFType::New(); >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >>>>> pssf->SetGeometry(geometry); >>>>> pssf->InPlaceOff(); >>>>> std::cout << "short scan image filter success" << std::endl; >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >>>>> feldkamp->SetGeometry(geometry); >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>>>> feldkamp->SetGPUEnabled(1); >>>>> feldkamp->SetNumberOfThreads(10000); >>>>> >>>>> #pragma region "Write volume" >>>>> >>>>> //Create a raw io for writing >>>>> >>>>> itk::RawImageIO::Pointer io; >>>>> io = itk::RawImageIO::New(); >>>>> >>>>> for (unsigned int i = 0; i < dimension; i++) >>>>> { >>>>> io->SetDimensions(i, size_p[i]); >>>>> io->SetSpacing(i, spacing_p[i]); >>>>> io->SetOrigin(i, origin_p[i]); >>>>> } >>>>> io->SetHeaderSize(0); >>>>> io->SetByteOrderToLittleEndian(); >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>>>> io->SetNumberOfComponents(1); >>>>> io->SetNumberOfDimensions(3); >>>>> >>>>> //create a writer and write reconstructed file >>>>> itk::ImageFileWriter::Pointer writer; >>>>> writer = itk::ImageFileWriter::New(); >>>>> writer->SetFileName("D:\\Output.raw"); >>>>> writer->SetImageIO(io); >>>>> writer->SetInput(feldkamp->GetOutput()); >>>>> >>>>> try >>>>> { >>>>> writer->Update(); >>>>> } >>>>> catch (itk::ExceptionObject & excp) >>>>> { >>>>> std::cerr << "Error while writing the image " << std::endl; >>>>> std::cerr << excp << std::endl; >>>>> getchar(); >>>>> } >>>>> #pragma endregion "WriteVolume" >>>>> delete[] angles; >>>>> return 0; >>>>> } >>>>> >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> Senior Design Engineer >>>>> Mobile No. +91-9738379729 >>>>> >>>>> Panacea Medical Technologies Pvt. Ltd. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>> http://www.panaceamedical.com >>>>> Bangalore - India. >>>>> >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> I was able to perform a reconstruction from your header and geometry >>>>>> file, using the following command lines: >>>>>> >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>>>> --phantomscale "128,128,128" --like Output.mhd >>>>>> >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> --hardware >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>>>> >>>>>> The first computes projections through a Shepp & Logan phantom, with >> the >>>>>> same size, spacing, origin, etc... as your projections, using your >>>>>> geometry file geo.xml. >>>>>> >>>>>> The second line performs the FDK reconstruction. I had to use both the >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>>>> parts, reconstructs them one by one, then assembles the results. Can >> you >>>>>> run the same commands and let us know whether you still encounter the >>>>>> crash you mentioned ? If it works, you can use your own projection data >>>>>> in the second command line instead of "simulatedprojections.mha". >>>>>> >>>>>> Best, >>>>>> >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>>>> >>>>>>> Dear Sir, >>>>>>> >>>>>>> Please find the Header file in the attachment. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> We do not need the projections file, at least not for a first stage >> of >>>>>>>> error tracking. We only need the header. >>>>>>>> Try the following command line: >>>>>>>> >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>>>> >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> contains >>>>>>>> the pixel values, but at the moment we do not need them. We will >> create >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>>>> track down the error you encounter. >>>>>>>> >>>>>>>> Looking forward to receiving your file, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Sir, >>>>>>>>> >>>>>>>>> The single raw file of the projections is 1.4 GB and >> we >>>> are >>>>>> not >>>>>>>> able to send this big file to you. Can you please suggest other >>>>>> alternatives >>>>>>>> for this? >>>>>>>>> Or can you provide us the PC configuration to solve >> the >>>>>> issue? >>>>>>>>> Let me know if any other clarification is required. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Hello Zahid, >>>>>>>>>> >>>>>>>>>> We will need the header of your projections file, too (It is best >> if >>>>>> you >>>>>>>>>> have all your projections as a single .mhd and a single .raw file, >> so >>>>>> it >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Cyril Mory, >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I have only used RTK version 1.3.0. but in the >>>> error >>>>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>>>> Please find the attachment of the geometry >> file >>>> of >>>>>> our >>>>>>>>>> projections. >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >>>> Simon >>>>>>>> Rit >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> >>>>>>>>>>>> Without some more information, it's unlikely that we find the >>>> source >>>>>> of >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>>>> therefore >>>>>>>>>>>> yourself): >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes >> in >>>>>> the >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>>>> problem >>>>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>>>> - create a small example that reproduces your problem. You can, >> for >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> logan >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>>>> example). And send us the script >>>>>>>>>>>> - OR send us your geometry file and the header of your >> projections >>>>>> file >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >>>>>> zero-filled >>>>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>>>> >>>>>>>>>>>> Best regards, >>>>>>>>>>>> Cyril >>>>>>>>>>>> >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>>>> >>>>>>>>>>>>> Please find the screen shot in the >> attachment. >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>> >>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>> >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a >> CUDA >>>>>>>>>> memory >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> first >>>>>> make >>>>>>>>>>>> sure >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> images. >>>>>> If >>>>>>>> it >>>>>>>>>>>> is >>>>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >>>> The >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >>>> of >>>>>>>> RTK >>>>>>>>>> on >>>>>>>>>>>>>> our case studies webpage >>>>>>>>>>>> . >>>>>>>>>>>>>> Simon >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>>>> reconstruction >>>>>>>>>> using >>>>>>>>>>>> RTK >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>>>> shoot >>>>>>>> of >>>>>>>>>>>>>>> the >>>>>>>>>>>>>>>> same. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am using the following items given >> below. >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>>>> application >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Please provide the solution of this and >> let >>>> me >>>>>>>> know >>>>>>>>>> if >>>>>>>>>>>>>> any >>>>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >>>> : >>>>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>>>> ________________ >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> This email and any files transmitted with it are confidential >>>> and >>>>>>>>>>>> intended >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >>>>>>>>>>>> addressed. >>>>>>>>>>>>>>> If you have received this email in error please notify the >>>> system >>>>>>>>>>>> manager. >>>>>>>>>>>>>>> Please note that any views or opinions presented in this email >>>> are >>>>>>>>>>>> solely >>>>>>>>>>>>>>> those of the author and do not necessarily represent those of >>>> the >>>>>>>>>>>> company. >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >>>> attachments >>>>>>>> for >>>>>>>>>>>> the >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>>>> damage >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>>>> >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >>> >>> >> >> > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Wed Nov 2 22:38:38 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 02:38:38 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Message-ID: <24189134.77160.1478140718379@mail.yahoo.com> Hello Simon and Cyril,Thanks for the reply.You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do.Thanks again for the reply. @Cyril:Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards,Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 02:05:51 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 06:05:51 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103060551.f7bfa0c3@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, Thank you for your help. We are able to reconstruct 1024 volume now. But the reconstruction time is around 4 minutes. Can you please help us to reduce the reconstruction time? We are using NVIDIA TITAN X GPU which has 12 GB memory. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The output looks correct. > > If the command line solution I suggested in a previous email works, the > best way to move forward would be to compare your code and that of > rtkfdk.cxx, and where it differs, make sure you have not introduced an > error. > > Cyril > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have done the same but the Output.mhd file is still 0 > KB for 1024 volume. Please find the attachment of the status of the output > displayed. > > > > Please suggest us for further process. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> I see two errors: > >> > >> Remove this line > >> > >> writer->SetNumberOfStreamDivisions(4); > >> > >> since only the streaming filter, not the write filter, needs to know > >> about the number of divisions. > >> And change the filename to > >> > >> "D:\\Output.mhd" > >> > >> It will write both the .mhd and the .raw files. > >> > >> I hope it helps, > >> Cyril > >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have modified my file writer code and used > >> StreamingImageFilter. Now its not giving any error message but the final > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > >>> Please check my modified file writer code given below. > >>> > >>> // Streaming depending on streaming capability of writer > >>> typedef itk::StreamingImageFilter > >> StreamerType; > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>> streamerBP->SetInput(feldkamp->GetOutput()); > >>> streamerBP->SetNumberOfStreamDivisions(4); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(streamerBP->GetOutput()); > >>> writer->SetNumberOfStreamDivisions(4); > >>> > >>> > >>> Please let me know if any clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> The --divisions is an option of the command-line application rtkfdk. It > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > >>>> rather, it is passed to a streaming filter at the end of the pipeline. > >>>> Look for the following bit of code in rtkfdk.cxx : > >>>> > >>>> // Streaming depending on streaming capability of writer > >>>> typedef itk::StreamingImageFilter >>>> CPUOutputImageType> StreamerType; > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>>> streamerBP->SetInput( pfeldkamp ); > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >>>> > >>>> You can find information on how a streaming filter works on this page: > >>>> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >>>> > >>>> I hope it helps, > >>>> > >>>> Cyril > >>>> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> I have tried but I am not getting where to give > >>>> --division 4 in my code. > >>>>> Please find my code given below and please let me > know > >>>> where I need to change in my code to make it work. > >>>>> int _tmain(int argc, _TCHAR* argv[]) > >>>>> { > >>>>> #pragma region "Variable declaration" > >>>>> const double PI = 3.14159265358979323846; > >>>>> float *angles; > >>>>> int nProj = 349; > >>>>> typedef unsigned short pixelType; > >>>>> typedef float OutpixelType; > >>>>> const int dimension = 3; > >>>>> typedef itk::Image imageType; > >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>>>> imageType::Pointer Projections = imageType::New(); > >>>>> > >>>>> #pragma endregion "Variable declaration" > >>>>> > >>>>> Projections = > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > >> nProj); > >>>>> imageType::SpacingType pSpacing; > >>>>> pSpacing[0] = 0.2960; > >>>>> pSpacing[1] = 0.2960; > >>>>> pSpacing[2] = 0.2960; > >>>>> Projections->SetSpacing(pSpacing); > >>>>> > >>>>> imageType::PointType pOrigin; > >>>>> pOrigin[0] = -212.972; > >>>>> pOrigin[1] = -212.972; > >>>>> pOrigin[2] = -212.972; //-158.50; > >>>>> Projections->SetOrigin(pOrigin); > >>>>> > >>>>> Projections->Update(); > >>>>> > >>>>> //Read angles. > >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>>>> angles = new float[nProj]; > >>>>> angles = readAngles(angles_file, angles); > >>>>> > >>>>> #pragma region"Geometry" > >>>>> // Geometry object > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>>>> { > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > >> 0); > >>>> // 136 half fan //2.07 Kidwai // > >>>>> } > >>>>> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >>>> GeometryWriterType; > >>>>> GeometryWriterType::Pointer geometryWriter = > GeometryWriterType::New(); > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > >>>>> geometryWriter->SetObject(geometry); > >>>>> geometryWriter->WriteFile(); > >>>>> geometry->Update(); > >>>>> #pragma endregion "Geometry" > >>>>> > >>>>> //Define output image type > >>>>> > >>>>> #ifdef USE_CUDA > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>>>> #else > >>>>> typedef itk::Image OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > FDKType; > >>>>> #endif > >>>>> > >>>>> //ScatterCorrection > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter imageType > >>>> BoellaardScatterCorrectionImageFilterType; > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection > = > >>>> BoellaardScatterCorrectionImageFilterType::New(); > >>>>> ScatterCorrection->SetInput(Projections); > >>>>> > >>>>> //VarianObiRawImageFilter > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >>>> RawImageFilterType; > >>>>> RawImageFilterType::Pointer AttenuationFilter = > >>>> RawImageFilterType::New(); > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>>>> > >>>>> //Create the output image > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > >>>> ConstantImageSourceType; > >>>>> ConstantImageSourceType::PointType origin_p; > >>>>> ConstantImageSourceType::SizeType size_p; > >>>>> ConstantImageSourceType::SpacingType spacing_p; > >>>>> ConstantImageSourceType::Pointer projectionsSource = > >>>> ConstantImageSourceType::New(); > >>>>> origin_p[0] = -127.5; > >>>>> origin_p[1] = -127.5; > >>>>> origin_p[2] = -127.5; > >>>>> size_p[0] = 512; > >>>>> size_p[1] = 512; > >>>>> size_p[2] = 512; > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>>>> > >>>>> projectionsSource->SetOrigin(origin_p); > >>>>> projectionsSource->SetSpacing(spacing_p); > >>>>> projectionsSource->SetSize(size_p); > >>>>> projectionsSource->SetConstant(0); > >>>>> > >>>>> // Short scan image filter > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>>>> pssf->SetGeometry(geometry); > >>>>> pssf->InPlaceOff(); > >>>>> std::cout << "short scan image filter success" << std::endl; > >>>>> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > >>>>> feldkamp->SetGeometry(geometry); > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>>>> feldkamp->SetGPUEnabled(1); > >>>>> feldkamp->SetNumberOfThreads(10000); > >>>>> > >>>>> #pragma region "Write volume" > >>>>> > >>>>> //Create a raw io for writing > >>>>> > >>>>> itk::RawImageIO::Pointer io; > >>>>> io = itk::RawImageIO::New(); > >>>>> > >>>>> for (unsigned int i = 0; i < dimension; i++) > >>>>> { > >>>>> io->SetDimensions(i, size_p[i]); > >>>>> io->SetSpacing(i, spacing_p[i]); > >>>>> io->SetOrigin(i, origin_p[i]); > >>>>> } > >>>>> io->SetHeaderSize(0); > >>>>> io->SetByteOrderToLittleEndian(); > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>>>> io->SetNumberOfComponents(1); > >>>>> io->SetNumberOfDimensions(3); > >>>>> > >>>>> //create a writer and write reconstructed file > >>>>> itk::ImageFileWriter::Pointer writer; > >>>>> writer = itk::ImageFileWriter::New(); > >>>>> writer->SetFileName("D:\\Output.raw"); > >>>>> writer->SetImageIO(io); > >>>>> writer->SetInput(feldkamp->GetOutput()); > >>>>> > >>>>> try > >>>>> { > >>>>> writer->Update(); > >>>>> } > >>>>> catch (itk::ExceptionObject & excp) > >>>>> { > >>>>> std::cerr << "Error while writing the image " << std::endl; > >>>>> std::cerr << excp << std::endl; > >>>>> getchar(); > >>>>> } > >>>>> #pragma endregion "WriteVolume" > >>>>> delete[] angles; > >>>>> return 0; > >>>>> } > >>>>> > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> Senior Design Engineer > >>>>> Mobile No. +91-9738379729 > >>>>> > >>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>> http://www.panaceamedical.com > >>>>> Bangalore - India. > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> I was able to perform a reconstruction from your header and geometry > >>>>>> file, using the following command lines: > >>>>>> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>>>> --phantomscale "128,128,128" --like Output.mhd > >>>>>> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > >> --hardware > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>>>> > >>>>>> The first computes projections through a Shepp & Logan phantom, with > >> the > >>>>>> same size, spacing, origin, etc... as your projections, using your > >>>>>> geometry file geo.xml. > >>>>>> > >>>>>> The second line performs the FDK reconstruction. I had to use both > the > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > (3GB, > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > by > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>>>> parts, reconstructs them one by one, then assembles the results. Can > >> you > >>>>>> run the same commands and let us know whether you still encounter the > >>>>>> crash you mentioned ? If it works, you can use your own projection > data > >>>>>> in the second command line instead of "simulatedprojections.mha". > >>>>>> > >>>>>> Best, > >>>>>> > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>>>> > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> Please find the Header file in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> We do not need the projections file, at least not for a first stage > >> of > >>>>>>>> error tracking. We only need the header. > >>>>>>>> Try the following command line: > >>>>>>>> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>>>> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file > is > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > >> contains > >>>>>>>> the pixel values, but at the moment we do not need them. We will > >> create > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>>>> track down the error you encounter. > >>>>>>>> > >>>>>>>> Looking forward to receiving your file, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Sir, > >>>>>>>>> > >>>>>>>>> The single raw file of the projections is 1.4 GB > and > >> we > >>>> are > >>>>>> not > >>>>>>>> able to send this big file to you. Can you please suggest other > >>>>>> alternatives > >>>>>>>> for this? > >>>>>>>>> Or can you provide us the PC configuration to solve > >> the > >>>>>> issue? > >>>>>>>>> Let me know if any other clarification is required. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Hello Zahid, > >>>>>>>>>> > >>>>>>>>>> We will need the header of your projections file, too (It is best > >> if > >>>>>> you > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > file, > >> so > >>>>>> it > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>>>> > >>>>>>>>>> Regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Cyril Mory, > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> I have only used RTK version 1.3.0. but in > the > >>>> error > >>>>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>>>> Please find the attachment of the geometry > >> file > >>>> of > >>>>>> our > >>>>>>>>>> projections. > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >>>> Simon > >>>>>>>> Rit > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > >>>> source > >>>>>> of > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>>>> therefore > >>>>>>>>>>>> yourself): > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > changes > >> in > >>>>>> the > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>>>> problem > >>>>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>>>> - create a small example that reproduces your problem. You can, > >> for > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > >> logan > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > an > >>>>>>>>>>>> example). And send us the script > >>>>>>>>>>>> - OR send us your geometry file and the header of your > >> projections > >>>>>> file > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>>>> zero-filled > >>>>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>>>> > >>>>>>>>>>>> Best regards, > >>>>>>>>>>>> Cyril > >>>>>>>>>>>> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>>>> > >>>>>>>>>>>>> Please find the screen shot in the > >> attachment. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>> > >>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > >> CUDA > >>>>>>>>>> memory > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > >> first > >>>>>> make > >>>>>>>>>>>> sure > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > >> images. > >>>>>> If > >>>>>>>> it > >>>>>>>>>>>> is > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > --divisions. > >>>> The > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > use > >>>> of > >>>>>>>> RTK > >>>>>>>>>> on > >>>>>>>>>>>>>> our case studies webpage > >>>>>>>>>>>> . > >>>>>>>>>>>>>> Simon > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>>>> reconstruction > >>>>>>>>>> using > >>>>>>>>>>>> RTK > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > screen > >>>>>> shoot > >>>>>>>> of > >>>>>>>>>>>>>>> the > >>>>>>>>>>>>>>>> same. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am using the following items given > >> below. > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > console > >>>>>>>> application > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Please provide the solution of this > and > >> let > >>>> me > >>>>>>>> know > >>>>>>>>>> if > >>>>>>>>>>>>>> any > >>>>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > >> Url > >>>> : > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>>>> ________________ > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> This email and any files transmitted with it are > confidential > >>>> and > >>>>>>>>>>>> intended > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they > >> are > >>>>>>>>>>>> addressed. > >>>>>>>>>>>>>>> If you have received this email in error please notify the > >>>> system > >>>>>>>>>>>> manager. > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > email > >>>> are > >>>>>>>>>>>> solely > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > of > >>>> the > >>>>>>>>>>>> company. > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > >>>> attachments > >>>>>>>> for > >>>>>>>>>>>> the > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > >>>>>> damage > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>>>> > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Thu Nov 3 02:23:25 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 3 Nov 2016 07:23:25 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <24189134.77160.1478140718379@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> Message-ID: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): {\begin{aligned}&\mathbf {r} _{0}:=\mathbf {b} -\mathbf {Ax} _{0}\\&\mathbf {p} _{0}:=\mathbf {r} _{0}\\&k:=0\\&{\hbox{repeat}}\\&\qquad \alpha _{k}:={\frac {\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}{\mathbf {p} _{k}^{\mathsf {T}}\mathbf {Ap} _{k}}}\\&\qquad \mathbf {x} _{k+1}:=\mathbf {x} _{k}+\alpha _{k}\mathbf {p} _{k}\\&\qquad \mathbf {r} _{k+1}:=\mathbf {r} _{k}-\alpha _{k}\mathbf {Ap} _{k}\\&\qquad {\hbox{if }}r_{k+1}{\hbox{ is sufficiently small then exit loop}}\\&\qquad \beta _{k}:={\frac {\mathbf {r} _{k+1}^{\mathsf {T}}\mathbf {r} _{k+1}}{\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}}\\&\qquad \mathbf {p} _{k+1}:=\mathbf {r} _{k+1}+\beta _{k}\mathbf {p} _{k}\\&\qquad k:=k+1\\&{\hbox{end repeat}}\\&{\hbox{The result is }}\mathbf {x} _{k+1}\end{aligned}} In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: > Hello Simon and Cyril, > Thanks for the reply. > You are right Simon. I did not notice it too in the literature. The > main problem as you said is the storage. Actually I developed the > conjugate gradient (CG), quasi-Newton and Newton optimization methods > for optical tomography and I intended to apply them to the CT > reconstruction as well. I implemented the Newton's methods > (Gauss-Newton and Levenberg-Marquardt) in a > Jacobian-Free-Newton-Krylov approaches to avoid the matrix > multiplication of Jacobians (sensitivity). It means we only need to > store the Jacobian matrix for the these methods (the matrix R that > Cyril was mentioned), that is still a big matrix for practical > problems in CT reconstruction. For the quasi-Newton I adapted an > L-BFGS algorithm that only need the 3 or 8 last iterations of the > gradient vector to calculate the Hessian matrix. In my case, the > L-BFGS and Newton's methods was much faster than the CG as you know > because of using the second order derivative (hessian matrix). I saw > in your last paper you implement the conjugate gradient method, so I > thought it might be easy to extract the gradient vector from CG > modules and solve the cost function within the quasi-Newton/Newton > methods. I will look at the codes to see what I can do. > Thanks again for the reply. > > @Cyril: > Please correct me if I am wrong. you mean the output of > backProjectionFilter is the gradient of defined cost function? > > Regards, > Vahid > > > On Wednesday, November 2, 2016 2:53 AM, Cyril Mory > wrote: > > > Hi Vahid, > Welcome to RTK :) > Indeed, there are several iterative methods already implemented in > RTK, but none of the filters allows you to easily extract the gradient > of the least squares function there are minimizing. > If you need to minimize the classical non-regularized tomographic cost > function, ie || R f - p ||?, with R the forward projection operator, f > the volume you are looking for, and p the measured projections, my > best advice would be to copy some part of the pipeline of > rtkSARTConeBeamReconstructionFilter to get the job done, ie the > following part (copy-paste this into webgraphviz.com) > > digraph SARTConeBeamReconstructionFilter { > > Input0 [ label="Input 0 (Volume)"]; > Input0 [shape=Mdiamond]; > Input1 [label="Input 1 (Projections)"]; > Input1 [shape=Mdiamond]; > > node [shape=box]; > ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref > rtk::ForwardProjectionImageFilter"]; > Extract [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref > itk::MultiplyImageFilter"]; > AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; > Subtract [ label="itk::SubtractImageFilter" URL="\ref > itk::SubtractImageFilter"]; > MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" > URL="\ref itk::MultiplyImageFilter"]; > Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref > itk::DivideOrZeroOutImageFilter"]; > GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" > URL="\ref itk::MultiplyImageFilter", style=dashed]; > Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref > rtk::DisplacedDetectorImageFilter"]; > ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref > rtk::RayBoxIntersectionImageFilter"]; > ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref > rtk::BackProjectionImageFilter"]; > OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; > OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; > Input0 -> OutofInput0 [arrowhead=none]; > OutofInput0 -> ForwardProject; > ConstantVolume -> BeforeBP [arrowhead=none]; > BeforeBP -> BackProjection; > Extract -> AfterExtract[arrowhead=none]; > AfterExtract -> MultiplyByZero; > AfterExtract -> Subtract; > MultiplyByZero -> ForwardProject; > Input1 -> Extract; > ForwardProject -> Subtract; > Subtract -> MultiplyByLambda; > MultiplyByLambda -> Divide; > Divide -> GatingWeight; > GatingWeight -> Displaced; > ConstantProjectionStack -> ExtractConstantProjection; > ExtractConstantProjection -> RayBox; > RayBox -> Divide; > Displaced -> BackProjection; > BackProjection -> OutofBP [arrowhead=none]; > } > > As you can see, it is a very large part of the SART reconstruction > filter, so yoiu might be better off just copying the whole > SARTConeBeamReconstructionFilter and modifying it. > > Of course, you could also look into ITK's cost function class, and see > if one of the classes inherited from it suits your needs, implement > your cost function this way, and use ITK's off-the-shelf solvers to > minimize it. See the inheritance diagram in > https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if > you want to try this approach. > > Best regards, > Cyril > > On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >> Hello RTK users and developers, >> >> I already implemented the RTK and reconstructed some images with the >> FDK algorithm implemented in RTK. It works well. Thanks to RTK >> developers. >> Now, I am trying to develop a model-based image reconstruction for >> our cone-beam micro-CT. I see already that some iterative algorithms >> like ART and its modifications and conjugate-gradient (CG) method are >> implemented in the RTK. I want to develop a model-based >> reconstruction through the Newton/quasi-Newton optimizations methods. >> I was wondering is it possible to extract the gradient of least >> square function from implemented algorithms like CG module? Any >> recommendation will be appreciated. >> >> Best Regards, >> Vahid >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 10:21:11 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 14:21:11 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. The RTKScatterGlareCorrectionImageFilter code is given below. //rtkLagCorrectionImageFilter typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); LagCorrection->SetInput(Projections); //rtkScatterGlareCorrectionImageFilter typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Cyril Mory, > > > Thank you for your help. We are able to reconstruct 1024 > volume now. > > But the reconstruction time is around 4 minutes. Can you > please help us to reduce the reconstruction time? > > We are using NVIDIA TITAN X GPU which has 12 GB memory. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > Dear Zahid, > > > > The output looks correct. > > > > If the command line solution I suggested in a previous email works, the > > best way to move forward would be to compare your code and that of > > rtkfdk.cxx, and where it differs, make sure you have not introduced an > > error. > > > > Cyril > > > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > > Dear Cyril Mory, > > > > > > I have done the same but the Output.mhd file is still 0 > > KB for 1024 volume. Please find the attachment of the status of the output > > displayed. > > > > > > Please suggest us for further process. > > > > > > > > > Thanks & Regards > > > > > > Zahid Hasan Ansari > > > > > > > > > > > > > > > ----- Original Message ----- > > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > > [mailto:simon.rit at creatis.insa-lyon.fr] > > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > > > > >> I see two errors: > > >> > > >> Remove this line > > >> > > >> writer->SetNumberOfStreamDivisions(4); > > >> > > >> since only the streaming filter, not the write filter, needs to know > > >> about the number of divisions. > > >> And change the filename to > > >> > > >> "D:\\Output.mhd" > > >> > > >> It will write both the .mhd and the .raw files. > > >> > > >> I hope it helps, > > >> Cyril > > >> > > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > >>> Dear Cyril Mory, > > >>> > > >>> I have modified my file writer code and used > > >> StreamingImageFilter. Now its not giving any error message but the > final > > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > > >>> Please check my modified file writer code given > below. > > >>> > > >>> // Streaming depending on streaming capability of writer > > >>> typedef itk::StreamingImageFilter > > >> StreamerType; > > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>> streamerBP->SetInput(feldkamp->GetOutput()); > > >>> streamerBP->SetNumberOfStreamDivisions(4); > > >>> > > >>> //create a writer and write reconstructed file > > >>> itk::ImageFileWriter::Pointer writer; > > >>> writer = itk::ImageFileWriter::New(); > > >>> writer->SetFileName("D:\\Output.raw"); > > >>> writer->SetImageIO(io); > > >>> writer->SetInput(streamerBP->GetOutput()); > > >>> writer->SetNumberOfStreamDivisions(4); > > >>> > > >>> > > >>> Please let me know if any clarification is required. > > >>> > > >>> > > >>> Thanks & Regards > > >>> > > >>> Zahid Hasan Ansari > > >>> Senior Design Engineer > > >>> Mobile No. +91-9738379729 > > >>> > > >>> Panacea Medical Technologies Pvt. Ltd. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >> http://www.panaceamedical.com > > >>> Bangalore - India. > > >>> > > >>> > > >>> > > >>> > > >>> ----- Original Message ----- > > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > > Rit > > >> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>> > > >>> > > >>>> Dear Zahid, > > >>>> > > >>>> The --divisions is an option of the command-line application rtkfdk. > It > > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > > >>>> rather, it is passed to a streaming filter at the end of the > pipeline. > > >>>> Look for the following bit of code in rtkfdk.cxx : > > >>>> > > >>>> // Streaming depending on streaming capability of writer > > >>>> typedef itk::StreamingImageFilter > >>>> CPUOutputImageType> StreamerType; > > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>>> streamerBP->SetInput( pfeldkamp ); > > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg > ); > > >>>> > > >>>> You can find information on how a streaming filter works on this > page: > > >>>> > > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > >>>> > > >>>> I hope it helps, > > >>>> > > >>>> Cyril > > >>>> > > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > >>>>> Dear Cyril Mory, > > >>>>> > > >>>>> I have tried but I am not getting where to give > > >>>> --division 4 in my code. > > >>>>> Please find my code given below and please let me > > know > > >>>> where I need to change in my code to make it work. > > >>>>> int _tmain(int argc, _TCHAR* argv[]) > > >>>>> { > > >>>>> #pragma region "Variable declaration" > > >>>>> const double PI = 3.14159265358979323846; > > >>>>> float *angles; > > >>>>> int nProj = 349; > > >>>>> typedef unsigned short pixelType; > > >>>>> typedef float OutpixelType; > > >>>>> const int dimension = 3; > > >>>>> typedef itk::Image imageType; > > >>>>> typedef itk::ImageRegionConstIterator > ImageIteratorType; > > >>>>> imageType::Pointer Projections = imageType::New(); > > >>>>> > > >>>>> #pragma endregion "Variable declaration" > > >>>>> > > >>>>> Projections = > > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > > >> nProj); > > >>>>> imageType::SpacingType pSpacing; > > >>>>> pSpacing[0] = 0.2960; > > >>>>> pSpacing[1] = 0.2960; > > >>>>> pSpacing[2] = 0.2960; > > >>>>> Projections->SetSpacing(pSpacing); > > >>>>> > > >>>>> imageType::PointType pOrigin; > > >>>>> pOrigin[0] = -212.972; > > >>>>> pOrigin[1] = -212.972; > > >>>>> pOrigin[2] = -212.972; //-158.50; > > >>>>> Projections->SetOrigin(pOrigin); > > >>>>> > > >>>>> Projections->Update(); > > >>>>> > > >>>>> //Read angles. > > >>>>> char *angles_file = > "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > >>>>> angles = new float[nProj]; > > >>>>> angles = readAngles(angles_file, angles); > > >>>>> > > >>>>> #pragma region"Geometry" > > >>>>> // Geometry object > > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > > >>>>> { > > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, > 0, > > >> 0); > > >>>> // 136 half fan //2.07 Kidwai // > > >>>>> } > > >>>>> > > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > > >>>> GeometryWriterType; > > >>>>> GeometryWriterType::Pointer geometryWriter = > > GeometryWriterType::New(); > > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > > >>>>> geometryWriter->SetObject(geometry); > > >>>>> geometryWriter->WriteFile(); > > >>>>> geometry->Update(); > > >>>>> #pragma endregion "Geometry" > > >>>>> > > >>>>> //Define output image type > > >>>>> > > >>>>> #ifdef USE_CUDA > > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > > PSSFType; > > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > >>>>> #else > > >>>>> typedef itk::Image OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter > PSSFType; > > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > > FDKType; > > >>>>> #endif > > >>>>> > > >>>>> //ScatterCorrection > > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter > imageType > > >>>> BoellaardScatterCorrectionImageFilterType; > > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer > ScatterCorrection > > = > > >>>> BoellaardScatterCorrectionImageFilterType::New(); > > >>>>> ScatterCorrection->SetInput(Projections); > > >>>>> > > >>>>> //VarianObiRawImageFilter > > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > > >>>> RawImageFilterType; > > >>>>> RawImageFilterType::Pointer AttenuationFilter = > > >>>> RawImageFilterType::New(); > > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > >>>>> > > >>>>> //Create the output image > > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > > >>>> ConstantImageSourceType; > > >>>>> ConstantImageSourceType::PointType origin_p; > > >>>>> ConstantImageSourceType::SizeType size_p; > > >>>>> ConstantImageSourceType::SpacingType spacing_p; > > >>>>> ConstantImageSourceType::Pointer projectionsSource = > > >>>> ConstantImageSourceType::New(); > > >>>>> origin_p[0] = -127.5; > > >>>>> origin_p[1] = -127.5; > > >>>>> origin_p[2] = -127.5; > > >>>>> size_p[0] = 512; > > >>>>> size_p[1] = 512; > > >>>>> size_p[2] = 512; > > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > >>>>> > > >>>>> projectionsSource->SetOrigin(origin_p); > > >>>>> projectionsSource->SetSpacing(spacing_p); > > >>>>> projectionsSource->SetSize(size_p); > > >>>>> projectionsSource->SetConstant(0); > > >>>>> > > >>>>> // Short scan image filter > > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > > >>>>> pssf->SetGeometry(geometry); > > >>>>> pssf->InPlaceOff(); > > >>>>> std::cout << "short scan image filter success" << std::endl; > > >>>>> > > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > > >>>>> feldkamp->SetGeometry(geometry); > > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > >>>>> feldkamp->SetGPUEnabled(1); > > >>>>> feldkamp->SetNumberOfThreads(10000); > > >>>>> > > >>>>> #pragma region "Write volume" > > >>>>> > > >>>>> //Create a raw io for writing > > >>>>> > > >>>>> itk::RawImageIO::Pointer io; > > >>>>> io = itk::RawImageIO::New(); > > >>>>> > > >>>>> for (unsigned int i = 0; i < dimension; i++) > > >>>>> { > > >>>>> io->SetDimensions(i, size_p[i]); > > >>>>> io->SetSpacing(i, spacing_p[i]); > > >>>>> io->SetOrigin(i, origin_p[i]); > > >>>>> } > > >>>>> io->SetHeaderSize(0); > > >>>>> io->SetByteOrderToLittleEndian(); > > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > > >>>>> io->SetNumberOfComponents(1); > > >>>>> io->SetNumberOfDimensions(3); > > >>>>> > > >>>>> //create a writer and write reconstructed file > > >>>>> itk::ImageFileWriter::Pointer writer; > > >>>>> writer = itk::ImageFileWriter::New(); > > >>>>> writer->SetFileName("D:\\Output.raw"); > > >>>>> writer->SetImageIO(io); > > >>>>> writer->SetInput(feldkamp->GetOutput()); > > >>>>> > > >>>>> try > > >>>>> { > > >>>>> writer->Update(); > > >>>>> } > > >>>>> catch (itk::ExceptionObject & excp) > > >>>>> { > > >>>>> std::cerr << "Error while writing the image " << std::endl; > > >>>>> std::cerr << excp << std::endl; > > >>>>> getchar(); > > >>>>> } > > >>>>> #pragma endregion "WriteVolume" > > >>>>> delete[] angles; > > >>>>> return 0; > > >>>>> } > > >>>>> > > >>>>> > > >>>>> > > >>>>> Thanks & Regards > > >>>>> > > >>>>> Zahid Hasan Ansari > > >>>>> Senior Design Engineer > > >>>>> Mobile No. +91-9738379729 > > >>>>> > > >>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >>>> http://www.panaceamedical.com > > >>>>> Bangalore - India. > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> ----- Original Message ----- > > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > > >> Rit > > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>> > > >>>>> > > >>>>>> Dear Zahid, > > >>>>>> > > >>>>>> I was able to perform a reconstruction from your header and > geometry > > >>>>>> file, using the following command lines: > > >>>>>> > > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > > >>>>>> --phantomscale "128,128,128" --like Output.mhd > > >>>>>> > > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > > >> --hardware > > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > >>>>>> > > >>>>>> The first computes projections through a Shepp & Logan phantom, > with > > >> the > > >>>>>> same size, spacing, origin, etc... as your projections, using your > > >>>>>> geometry file geo.xml. > > >>>>>> > > >>>>>> The second line performs the FDK reconstruction. I had to use both > > the > > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > > (3GB, > > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > > by > > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > > >>>>>> parts, reconstructs them one by one, then assembles the results. > Can > > >> you > > >>>>>> run the same commands and let us know whether you still encounter > the > > >>>>>> crash you mentioned ? If it works, you can use your own projection > > data > > >>>>>> in the second command line instead of "simulatedprojections.mha". > > >>>>>> > > >>>>>> Best, > > >>>>>> > > >>>>>> Cyril > > >>>>>> > > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > >>>>>> > > >>>>>>> Dear Sir, > > >>>>>>> > > >>>>>>> Please find the Header file in the attachment. > > >>>>>>> > > >>>>>>> > > >>>>>>> Thanks & Regards > > >>>>>>> > > >>>>>>> Zahid Hasan Ansari > > >>>>>>> > > >>>>>>> > > >>>>>>> ----- Original Message ----- > > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > Simon > > >>>> Rit > > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>> > > >>>>>>> > > >>>>>>>> Dear Zahid, > > >>>>>>>> > > >>>>>>>> We do not need the projections file, at least not for a first > stage > > >> of > > >>>>>>>> error tracking. We only need the header. > > >>>>>>>> Try the following command line: > > >>>>>>>> > > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > > >>>>>>>> > > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" > file > > is > > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > > >> contains > > >>>>>>>> the pixel values, but at the moment we do not need them. We will > > >> create > > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough > to > > >>>>>>>> track down the error you encounter. > > >>>>>>>> > > >>>>>>>> Looking forward to receiving your file, > > >>>>>>>> Cyril > > >>>>>>>> > > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > > >>>>>>>>> Dear Sir, > > >>>>>>>>> > > >>>>>>>>> The single raw file of the projections is 1.4 GB > > and > > >> we > > >>>> are > > >>>>>> not > > >>>>>>>> able to send this big file to you. Can you please suggest other > > >>>>>> alternatives > > >>>>>>>> for this? > > >>>>>>>>> Or can you provide us the PC configuration to > solve > > >> the > > >>>>>> issue? > > >>>>>>>>> Let me know if any other clarification is > required. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> Thanks & Regards > > >>>>>>>>> > > >>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> ----- Original Message ----- > > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > >> Simon > > >>>>>> Rit > > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>>> Hello Zahid, > > >>>>>>>>>> > > >>>>>>>>>> We will need the header of your projections file, too (It is > best > > >> if > > >>>>>> you > > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > > file, > > >> so > > >>>>>> it > > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > > >>>>>>>>>> > > >>>>>>>>>> Regards, > > >>>>>>>>>> Cyril > > >>>>>>>>>> > > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>> Dear Cyril Mory, > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> I have only used RTK version 1.3.0. but > in > > the > > >>>> error > > >>>>>>>>>> message it is showing RTK version 1.2.0. > > >>>>>>>>>>> Please find the attachment of the > geometry > > >> file > > >>>> of > > >>>>>> our > > >>>>>>>>>> projections. > > >>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>> > > >>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com], > > >>>> Simon > > >>>>>>>> Rit > > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, > saimahesh.m at panaceamedical.com > > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>> > > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > > >>>> source > > >>>>>> of > > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > > >>>>>> therefore > > >>>>>>>>>>>> yourself): > > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > > changes > > >> in > > >>>>>> the > > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so > your > > >>>>>> problem > > >>>>>>>>>>>> might disappear just by upgrading to the new version > > >>>>>>>>>>>> - create a small example that reproduces your problem. You > can, > > >> for > > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > > >> logan > > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look > at > > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > > an > > >>>>>>>>>>>> example). And send us the script > > >>>>>>>>>>>> - OR send us your geometry file and the header of your > > >> projections > > >>>>>> file > > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > > >>>>>> zero-filled > > >>>>>>>>>>>> stack of projections), and the command line that crashes > > >>>>>>>>>>>> > > >>>>>>>>>>>> Best regards, > > >>>>>>>>>>>> Cyril > > >>>>>>>>>>>> > > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>>>> Dear Simon Rit, > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Please find the screen shot in the > > >> attachment. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > > : > > >>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>>>> To: Zahid Hasan Ansari > > [mailto:zahidhasan.a at panaceamedical.com] > > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > > >>>>>>>> [mailto:rtk-users at public.kitware.com], > > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is > a > > >> CUDA > > >>>>>>>>>> memory > > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > > >> first > > >>>>>> make > > >>>>>>>>>>>> sure > > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > > >> images. > > >>>>>> If > > >>>>>>>> it > > >>>>>>>>>>>> is > > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > > --divisions. > > >>>> The > > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > > use > > >>>> of > > >>>>>>>> RTK > > >>>>>>>>>> on > > >>>>>>>>>>>>>> our case studies webpage > > >>>>>>>>>>>> . > > >>>>>>>>>>>>>> Simon > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Dear Sir\Madam, > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > > >>>>>> reconstruction > > >>>>>>>>>> using > > >>>>>>>>>>>> RTK > > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > > screen > > >>>>>> shoot > > >>>>>>>> of > > >>>>>>>>>>>>>>> the > > >>>>>>>>>>>>>>>> same. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am using the following items > given > > >> below. > > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > > console > > >>>>>>>> application > > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > > >>>>>>>>>>>>>>>> 5. CUDA 7. > > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Please provide the solution of this > > and > > >> let > > >>>> me > > >>>>>>>> know > > >>>>>>>>>> if > > >>>>>>>>>>>>>> any > > >>>>>>>>>>>>>>>> other clarification is required. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, > > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 > | > > >> Url > > >>>> : > > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>>>> > ____________________________________________________________ > > >>>>>>>>>>>>>>> ________________ > > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> This email and any files transmitted with it are > > confidential > > >>>> and > > >>>>>>>>>>>> intended > > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom > they > > >> are > > >>>>>>>>>>>> addressed. > > >>>>>>>>>>>>>>> If you have received this email in error please notify the > > >>>> system > > >>>>>>>>>>>> manager. > > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > > email > > >>>> are > > >>>>>>>>>>>> solely > > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > > of > > >>>> the > > >>>>>>>>>>>> company. > > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > > >>>> attachments > > >>>>>>>> for > > >>>>>>>>>>>> the > > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > > any > > >>>>>> damage > > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> This email and any files transmitted with it are > confidential > > >> and > > >>>>>>>>>> intended > > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > > are > > >>>>>>>>>> addressed. > > >>>>>>>>>>>>> If you have received this email in error please notify the > > >> system > > >>>>>>>>>> manager. > > >>>>>>>>>>>>> Please note that any views or opinions presented in this > email > > >> are > > >>>>>>>>>> solely > > >>>>>>>>>>>>> those of the author and do not necessarily represent those > of > > >> the > > >>>>>>>>>> company. > > >>>>>>>>>>>>> Finally, the recipient should check this email and any > > >> attachments > > >>>>>> for > > >>>>>>>>>> the > > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > > >>>> damage > > >>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>> ________________________________________ > > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > Area > > >>>>>> Phase > > >>>>>>>> 1, > > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > Industrial > > >>>>>> Area, > > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>> > > >>>>>>>>>>> This email and any files transmitted with it are confidential > > and > > >>>>>>>> intended > > >>>>>>>>>>> solely for the use of the individual or entity to whom they > are > > >>>>>>>> addressed. > > >>>>>>>>>>> If you have received this email in error please notify the > > system > > >>>>>>>> manager. > > >>>>>>>>>>> Please note that any views or opinions presented in this email > > are > > >>>>>>>> solely > > >>>>>>>>>>> those of the author and do not necessarily represent those of > > the > > >>>>>>>> company. > > >>>>>>>>>>> Finally, the recipient should check this email and any > > attachments > > >>>> for > > >>>>>>>> the > > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > > >> damage > > >>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>> > > >>>>>>>>> ________________________________________ > > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > > >>>> Phase > > >>>>>> 1, > > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > > >>>> Area, > > >>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>> > > >>>>>>>>> This email and any files transmitted with it are confidential > and > > >>>>>> intended > > >>>>>>>>> solely for the use of the individual or entity to whom they are > > >>>>>> addressed. > > >>>>>>>>> If you have received this email in error please notify the > system > > >>>>>> manager. > > >>>>>>>>> Please note that any views or opinions presented in this email > are > > >>>>>> solely > > >>>>>>>>> those of the author and do not necessarily represent those of > the > > >>>>>> company. > > >>>>>>>>> Finally, the recipient should check this email and any > attachments > > >> for > > >>>>>> the > > >>>>>>>>> presence of viruses. The company accepts no liability for any > > damage > > >>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>> ________________________________________ > > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > >> Phase > > >>>> 1, > > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > >> Area, > > >>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>> Fax : + 91 80 42428710 > > >>>>>>> Url : http://www.panaceamedical.com > > >>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>> > > >>>>>>> This email and any files transmitted with it are confidential and > > >>>> intended > > >>>>>>> solely for the use of the individual or entity to whom they are > > >>>> addressed. > > >>>>>>> If you have received this email in error please notify the system > > >>>> manager. > > >>>>>>> Please note that any views or opinions presented in this email are > > >>>> solely > > >>>>>>> those of the author and do not necessarily represent those of the > > >>>> company. > > >>>>>>> Finally, the recipient should check this email and any attachments > > for > > >>>> the > > >>>>>>> presence of viruses. The company accepts no liability for any > damage > > >>>>>>> caused by any virus transmitted by this email. > > >>>>>>> > > >>>>> ________________________________________ > > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>> Fax : + 91 80 42428710 > > >>>>> Url : http://www.panaceamedical.com > > >>>>> > > >> > > > ____________________________________________________________________________ > > >>>>> PMT EMAIL DISCLAIMER: > > >>>>> > > >>>>> This email and any files transmitted with it are confidential and > > >> intended > > >>>>> solely for the use of the individual or entity to whom they are > > >> addressed. > > >>>>> If you have received this email in error please notify the system > > >> manager. > > >>>>> Please note that any views or opinions presented in this email are > > >> solely > > >>>>> those of the author and do not necessarily represent those of the > > >> company. > > >>>>> Finally, the recipient should check this email and any attachments > for > > >> the > > >>>>> presence of viruses. The company accepts no liability for any damage > > >>>>> caused by any virus transmitted by this email. > > >>>>> > > >>>>> > > >>>>> > > >>>> > > >>> ________________________________________ > > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 > > >>> Fax : + 91 80 42428710 > > >>> Url : http://www.panaceamedical.com > > >>> > > >> > > > ____________________________________________________________________________ > > >>> PMT EMAIL DISCLAIMER: > > >>> > > >>> This email and any files transmitted with it are confidential and > > intended > > >>> solely for the use of the individual or entity to whom they are > > addressed. > > >>> If you have received this email in error please notify the system > > manager. > > >>> Please note that any views or opinions presented in this email are > > solely > > >>> those of the author and do not necessarily represent those of the > > company. > > >>> Finally, the recipient should check this email and any attachments for > > the > > >>> presence of viruses. The company accepts no liability for any damage > > >>> caused by any virus transmitted by this email. > > >>> > > >>> > > >>> > > >>> > > >>> > > >> > > >> > > > > > > ________________________________________ > > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > > Malur - 563130. Kolar District. INDIA. > > > > > > Tel : +91 80 4242 8700 / 2845 4785 > > > Fax : + 91 80 42428710 > > > Url : http://www.panaceamedical.com > > > > > > ____________________________________________________________________________ > > > PMT EMAIL DISCLAIMER: > > > > > > This email and any files transmitted with it are confidential and > intended > > > solely for the use of the individual or entity to whom they are > addressed. > > > If you have received this email in error please notify the system > manager. > > > Please note that any views or opinions presented in this email are > solely > > > those of the author and do not necessarily represent those of the > company. > > > Finally, the recipient should check this email and any attachments for > the > > > presence of viruses. The company accepts no liability for any damage > > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: ScatterGlareError.png Type: image/png Size: 121487 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 3 10:28:49 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 3 Nov 2016 15:28:49 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> References: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Message-ID: Hi, I think you should look at the applications before posting a question on the mailing list. There is a rtkscatterglarecorrection tool, look at rtkscatterglarecorrection.cxx. You must init the coefficients. I'll add a check to make the error message more readable but please, take the time to look at all the examples available in applications before posting a question. Thanks, Simon On Thu, Nov 3, 2016 at 3:21 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > > We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. > > The RTKScatterGlareCorrectionImageFilter code is given below. > > //rtkLagCorrectionImageFilter > typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; > LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); > LagCorrection->SetInput(Projections); > > //rtkScatterGlareCorrectionImageFilter > typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; > ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); > ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); > > > > > > Thanks & Regards > > Zahid Hasan Ansari > > > > ----- Original Message ----- > From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Cyril Mory, >> >> >> Thank you for your help. We are able to reconstruct 1024 >> volume now. >> >> But the reconstruction time is around 4 minutes. Can you >> please help us to reduce the reconstruction time? >> >> We are using NVIDIA TITAN X GPU which has 12 GB memory. >> >> >> Thanks & Regards >> >> Zahid Hasan Ansari >> >> >> >> >> ----- Original Message ----- >> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> >> >> > Dear Zahid, >> > >> > The output looks correct. >> > >> > If the command line solution I suggested in a previous email works, the >> > best way to move forward would be to compare your code and that of >> > rtkfdk.cxx, and where it differs, make sure you have not introduced an >> > error. >> > >> > Cyril >> > >> > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: >> > > Dear Cyril Mory, >> > > >> > > I have done the same but the Output.mhd file is still 0 >> > KB for 1024 volume. Please find the attachment of the status of the output >> > displayed. >> > > >> > > Please suggest us for further process. >> > > >> > > >> > > Thanks & Regards >> > > >> > > Zahid Hasan Ansari >> > > >> > > >> > > >> > > >> > > ----- Original Message ----- >> > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >> > [mailto:simon.rit at creatis.insa-lyon.fr] >> > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > > >> > > >> > >> I see two errors: >> > >> >> > >> Remove this line >> > >> >> > >> writer->SetNumberOfStreamDivisions(4); >> > >> >> > >> since only the streaming filter, not the write filter, needs to know >> > >> about the number of divisions. >> > >> And change the filename to >> > >> >> > >> "D:\\Output.mhd" >> > >> >> > >> It will write both the .mhd and the .raw files. >> > >> >> > >> I hope it helps, >> > >> Cyril >> > >> >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >> > >>> Dear Cyril Mory, >> > >>> >> > >>> I have modified my file writer code and used >> > >> StreamingImageFilter. Now its not giving any error message but the >> final >> > >> output is 0 byte for 1024 volume. It working fine for 512 volume. >> > >>> Please check my modified file writer code given >> below. >> > >>> >> > >>> // Streaming depending on streaming capability of writer >> > >>> typedef itk::StreamingImageFilter >> > >> StreamerType; >> > >>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>> streamerBP->SetInput(feldkamp->GetOutput()); >> > >>> streamerBP->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> //create a writer and write reconstructed file >> > >>> itk::ImageFileWriter::Pointer writer; >> > >>> writer = itk::ImageFileWriter::New(); >> > >>> writer->SetFileName("D:\\Output.raw"); >> > >>> writer->SetImageIO(io); >> > >>> writer->SetInput(streamerBP->GetOutput()); >> > >>> writer->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> >> > >>> Please let me know if any clarification is required. >> > >>> >> > >>> >> > >>> Thanks & Regards >> > >>> >> > >>> Zahid Hasan Ansari >> > >>> Senior Design Engineer >> > >>> Mobile No. +91-9738379729 >> > >>> >> > >>> Panacea Medical Technologies Pvt. Ltd. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >> http://www.panaceamedical.com >> > >>> Bangalore - India. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> ----- Original Message ----- >> > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> > Rit >> > >> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>> >> > >>> >> > >>>> Dear Zahid, >> > >>>> >> > >>>> The --divisions is an option of the command-line application rtkfdk. >> It >> > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >> > >>>> rather, it is passed to a streaming filter at the end of the >> pipeline. >> > >>>> Look for the following bit of code in rtkfdk.cxx : >> > >>>> >> > >>>> // Streaming depending on streaming capability of writer >> > >>>> typedef itk::StreamingImageFilter> > >>>> CPUOutputImageType> StreamerType; >> > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>>> streamerBP->SetInput( pfeldkamp ); >> > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg >> ); >> > >>>> >> > >>>> You can find information on how a streaming filter works on this >> page: >> > >>>> >> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> > >>>> >> > >>>> I hope it helps, >> > >>>> >> > >>>> Cyril >> > >>>> >> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >> > >>>>> Dear Cyril Mory, >> > >>>>> >> > >>>>> I have tried but I am not getting where to give >> > >>>> --division 4 in my code. >> > >>>>> Please find my code given below and please let me >> > know >> > >>>> where I need to change in my code to make it work. >> > >>>>> int _tmain(int argc, _TCHAR* argv[]) >> > >>>>> { >> > >>>>> #pragma region "Variable declaration" >> > >>>>> const double PI = 3.14159265358979323846; >> > >>>>> float *angles; >> > >>>>> int nProj = 349; >> > >>>>> typedef unsigned short pixelType; >> > >>>>> typedef float OutpixelType; >> > >>>>> const int dimension = 3; >> > >>>>> typedef itk::Image imageType; >> > >>>>> typedef itk::ImageRegionConstIterator >> ImageIteratorType; >> > >>>>> imageType::Pointer Projections = imageType::New(); >> > >>>>> >> > >>>>> #pragma endregion "Variable declaration" >> > >>>>> >> > >>>>> Projections = >> > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> > >> nProj); >> > >>>>> imageType::SpacingType pSpacing; >> > >>>>> pSpacing[0] = 0.2960; >> > >>>>> pSpacing[1] = 0.2960; >> > >>>>> pSpacing[2] = 0.2960; >> > >>>>> Projections->SetSpacing(pSpacing); >> > >>>>> >> > >>>>> imageType::PointType pOrigin; >> > >>>>> pOrigin[0] = -212.972; >> > >>>>> pOrigin[1] = -212.972; >> > >>>>> pOrigin[2] = -212.972; //-158.50; >> > >>>>> Projections->SetOrigin(pOrigin); >> > >>>>> >> > >>>>> Projections->Update(); >> > >>>>> >> > >>>>> //Read angles. >> > >>>>> char *angles_file = >> "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >> > >>>>> angles = new float[nProj]; >> > >>>>> angles = readAngles(angles_file, angles); >> > >>>>> >> > >>>>> #pragma region"Geometry" >> > >>>>> // Geometry object >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> > >>>>> GeometryType::Pointer geometry = GeometryType::New(); >> > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >> > >>>>> { >> > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, >> 0, >> > >> 0); >> > >>>> // 136 half fan //2.07 Kidwai // >> > >>>>> } >> > >>>>> >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> > >>>> GeometryWriterType; >> > >>>>> GeometryWriterType::Pointer geometryWriter = >> > GeometryWriterType::New(); >> > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >> > >>>>> geometryWriter->SetObject(geometry); >> > >>>>> geometryWriter->WriteFile(); >> > >>>>> geometry->Update(); >> > >>>>> #pragma endregion "Geometry" >> > >>>>> >> > >>>>> //Define output image type >> > >>>>> >> > >>>>> #ifdef USE_CUDA >> > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > >> PSSFType; >> > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> > >>>>> #else >> > >>>>> typedef itk::Image OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter >> PSSFType; >> > >>>>> typedef rtk::FDKConeBeamReconstructionFilter >> > FDKType; >> > >>>>> #endif >> > >>>>> >> > >>>>> //ScatterCorrection >> > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter> > imageType >> > >>>> BoellaardScatterCorrectionImageFilterType; >> > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer >> ScatterCorrection >> > = >> > >>>> BoellaardScatterCorrectionImageFilterType::New(); >> > >>>>> ScatterCorrection->SetInput(Projections); >> > >>>>> >> > >>>>> //VarianObiRawImageFilter >> > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> > >>>> RawImageFilterType; >> > >>>>> RawImageFilterType::Pointer AttenuationFilter = >> > >>>> RawImageFilterType::New(); >> > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >> > >>>>> >> > >>>>> //Create the output image >> > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >> > >>>> ConstantImageSourceType; >> > >>>>> ConstantImageSourceType::PointType origin_p; >> > >>>>> ConstantImageSourceType::SizeType size_p; >> > >>>>> ConstantImageSourceType::SpacingType spacing_p; >> > >>>>> ConstantImageSourceType::Pointer projectionsSource = >> > >>>> ConstantImageSourceType::New(); >> > >>>>> origin_p[0] = -127.5; >> > >>>>> origin_p[1] = -127.5; >> > >>>>> origin_p[2] = -127.5; >> > >>>>> size_p[0] = 512; >> > >>>>> size_p[1] = 512; >> > >>>>> size_p[2] = 512; >> > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >> > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >> > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >> > >>>>> >> > >>>>> projectionsSource->SetOrigin(origin_p); >> > >>>>> projectionsSource->SetSpacing(spacing_p); >> > >>>>> projectionsSource->SetSize(size_p); >> > >>>>> projectionsSource->SetConstant(0); >> > >>>>> >> > >>>>> // Short scan image filter >> > >>>>> PSSFType::Pointer pssf = PSSFType::New(); >> > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >> > >>>>> pssf->SetGeometry(geometry); >> > >>>>> pssf->InPlaceOff(); >> > >>>>> std::cout << "short scan image filter success" << std::endl; >> > >>>>> >> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); >> > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >> > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >> > >>>>> feldkamp->SetGeometry(geometry); >> > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >> > >>>>> feldkamp->SetGPUEnabled(1); >> > >>>>> feldkamp->SetNumberOfThreads(10000); >> > >>>>> >> > >>>>> #pragma region "Write volume" >> > >>>>> >> > >>>>> //Create a raw io for writing >> > >>>>> >> > >>>>> itk::RawImageIO::Pointer io; >> > >>>>> io = itk::RawImageIO::New(); >> > >>>>> >> > >>>>> for (unsigned int i = 0; i < dimension; i++) >> > >>>>> { >> > >>>>> io->SetDimensions(i, size_p[i]); >> > >>>>> io->SetSpacing(i, spacing_p[i]); >> > >>>>> io->SetOrigin(i, origin_p[i]); >> > >>>>> } >> > >>>>> io->SetHeaderSize(0); >> > >>>>> io->SetByteOrderToLittleEndian(); >> > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >> > >>>>> io->SetNumberOfComponents(1); >> > >>>>> io->SetNumberOfDimensions(3); >> > >>>>> >> > >>>>> //create a writer and write reconstructed file >> > >>>>> itk::ImageFileWriter::Pointer writer; >> > >>>>> writer = itk::ImageFileWriter::New(); >> > >>>>> writer->SetFileName("D:\\Output.raw"); >> > >>>>> writer->SetImageIO(io); >> > >>>>> writer->SetInput(feldkamp->GetOutput()); >> > >>>>> >> > >>>>> try >> > >>>>> { >> > >>>>> writer->Update(); >> > >>>>> } >> > >>>>> catch (itk::ExceptionObject & excp) >> > >>>>> { >> > >>>>> std::cerr << "Error while writing the image " << std::endl; >> > >>>>> std::cerr << excp << std::endl; >> > >>>>> getchar(); >> > >>>>> } >> > >>>>> #pragma endregion "WriteVolume" >> > >>>>> delete[] angles; >> > >>>>> return 0; >> > >>>>> } >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> Thanks & Regards >> > >>>>> >> > >>>>> Zahid Hasan Ansari >> > >>>>> Senior Design Engineer >> > >>>>> Mobile No. +91-9738379729 >> > >>>>> >> > >>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >>>> http://www.panaceamedical.com >> > >>>>> Bangalore - India. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> ----- Original Message ----- >> > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >> > >> Rit >> > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>> >> > >>>>> >> > >>>>>> Dear Zahid, >> > >>>>>> >> > >>>>>> I was able to perform a reconstruction from your header and >> geometry >> > >>>>>> file, using the following command lines: >> > >>>>>> >> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> > >>>>>> --phantomscale "128,128,128" --like Output.mhd >> > >>>>>> >> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> > >> --hardware >> > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> > >>>>>> >> > >>>>>> The first computes projections through a Shepp & Logan phantom, >> with >> > >> the >> > >>>>>> same size, spacing, origin, etc... as your projections, using your >> > >>>>>> geometry file geo.xml. >> > >>>>>> >> > >>>>>> The second line performs the FDK reconstruction. I had to use both >> > the >> > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory >> > (3GB, >> > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory >> > by >> > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> > >>>>>> parts, reconstructs them one by one, then assembles the results. >> Can >> > >> you >> > >>>>>> run the same commands and let us know whether you still encounter >> the >> > >>>>>> crash you mentioned ? If it works, you can use your own projection >> > data >> > >>>>>> in the second command line instead of "simulatedprojections.mha". >> > >>>>>> >> > >>>>>> Best, >> > >>>>>> >> > >>>>>> Cyril >> > >>>>>> >> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> > >>>>>> >> > >>>>>>> Dear Sir, >> > >>>>>>> >> > >>>>>>> Please find the Header file in the attachment. >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> Thanks & Regards >> > >>>>>>> >> > >>>>>>> Zahid Hasan Ansari >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> ----- Original Message ----- >> > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > Simon >> > >>>> Rit >> > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>> >> > >>>>>>> >> > >>>>>>>> Dear Zahid, >> > >>>>>>>> >> > >>>>>>>> We do not need the projections file, at least not for a first >> stage >> > >> of >> > >>>>>>>> error tracking. We only need the header. >> > >>>>>>>> Try the following command line: >> > >>>>>>>> >> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >> > >>>>>>>> >> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" >> file >> > is >> > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> > >> contains >> > >>>>>>>> the pixel values, but at the moment we do not need them. We will >> > >> create >> > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough >> to >> > >>>>>>>> track down the error you encounter. >> > >>>>>>>> >> > >>>>>>>> Looking forward to receiving your file, >> > >>>>>>>> Cyril >> > >>>>>>>> >> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >> > >>>>>>>>> Dear Sir, >> > >>>>>>>>> >> > >>>>>>>>> The single raw file of the projections is 1.4 GB >> > and >> > >> we >> > >>>> are >> > >>>>>> not >> > >>>>>>>> able to send this big file to you. Can you please suggest other >> > >>>>>> alternatives >> > >>>>>>>> for this? >> > >>>>>>>>> Or can you provide us the PC configuration to >> solve >> > >> the >> > >>>>>> issue? >> > >>>>>>>>> Let me know if any other clarification is >> required. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> Thanks & Regards >> > >>>>>>>>> >> > >>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> ----- Original Message ----- >> > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > >> Simon >> > >>>>>> Rit >> > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>>> Hello Zahid, >> > >>>>>>>>>> >> > >>>>>>>>>> We will need the header of your projections file, too (It is >> best >> > >> if >> > >>>>>> you >> > >>>>>>>>>> have all your projections as a single .mhd and a single .raw >> > file, >> > >> so >> > >>>>>> it >> > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >> > >>>>>>>>>> >> > >>>>>>>>>> Regards, >> > >>>>>>>>>> Cyril >> > >>>>>>>>>> >> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>> Dear Cyril Mory, >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> I have only used RTK version 1.3.0. but >> in >> > the >> > >>>> error >> > >>>>>>>>>> message it is showing RTK version 1.2.0. >> > >>>>>>>>>>> Please find the attachment of the >> geometry >> > >> file >> > >>>> of >> > >>>>>> our >> > >>>>>>>>>> projections. >> > >>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>> >> > >>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>>>> To: Zahid Hasan Ansari >> [mailto:zahidhasan.a at panaceamedical.com], >> > >>>> Simon >> > >>>>>>>> Rit >> > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, >> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the >> > >>>> source >> > >>>>>> of >> > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >> > >>>>>> therefore >> > >>>>>>>>>>>> yourself): >> > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable >> > changes >> > >> in >> > >>>>>> the >> > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so >> your >> > >>>>>> problem >> > >>>>>>>>>>>> might disappear just by upgrading to the new version >> > >>>>>>>>>>>> - create a small example that reproduces your problem. You >> can, >> > >> for >> > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> > >> logan >> > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look >> at >> > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need >> > an >> > >>>>>>>>>>>> example). And send us the script >> > >>>>>>>>>>>> - OR send us your geometry file and the header of your >> > >> projections >> > >>>>>> file >> > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >> > >>>>>> zero-filled >> > >>>>>>>>>>>> stack of projections), and the command line that crashes >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Best regards, >> > >>>>>>>>>>>> Cyril >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>>>> Dear Simon Rit, >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Please find the screen shot in the >> > >> attachment. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >> > : >> > >>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>>>> To: Zahid Hasan Ansari >> > [mailto:zahidhasan.a at panaceamedical.com] >> > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >> > >>>>>>>> [mailto:rtk-users at public.kitware.com], >> > >>>>>>>>>>>> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is >> a >> > >> CUDA >> > >>>>>>>>>> memory >> > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> > >> first >> > >>>>>> make >> > >>>>>>>>>>>> sure >> > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> > >> images. >> > >>>>>> If >> > >>>>>>>> it >> > >>>>>>>>>>>> is >> > >>>>>>>>>>>>>> no sufficient, you can split your volume using the >> > --divisions. >> > >>>> The >> > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >> > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the >> > use >> > >>>> of >> > >>>>>>>> RTK >> > >>>>>>>>>> on >> > >>>>>>>>>>>>>> our case studies webpage >> > >>>>>>>>>>>> . >> > >>>>>>>>>>>>>> Simon >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >> > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Dear Sir\Madam, >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >> > >>>>>> reconstruction >> > >>>>>>>>>> using >> > >>>>>>>>>>>> RTK >> > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the >> > screen >> > >>>>>> shoot >> > >>>>>>>> of >> > >>>>>>>>>>>>>>> the >> > >>>>>>>>>>>>>>>> same. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am using the following items >> given >> > >> below. >> > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >> > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >> > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit >> > console >> > >>>>>>>> application >> > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >> > >>>>>>>>>>>>>>>> 5. CUDA 7. >> > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >> > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Please provide the solution of this >> > and >> > >> let >> > >>>> me >> > >>>>>>>> know >> > >>>>>>>>>> if >> > >>>>>>>>>>>>>> any >> > >>>>>>>>>>>>>>>> other clarification is required. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> > EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, >> > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 >> | >> > >> Url >> > >>>> : >> > >>>>>>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>>>> >> ____________________________________________________________ >> > >>>>>>>>>>>>>>> ________________ >> > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> This email and any files transmitted with it are >> > confidential >> > >>>> and >> > >>>>>>>>>>>> intended >> > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom >> they >> > >> are >> > >>>>>>>>>>>> addressed. >> > >>>>>>>>>>>>>>> If you have received this email in error please notify the >> > >>>> system >> > >>>>>>>>>>>> manager. >> > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this >> > email >> > >>>> are >> > >>>>>>>>>>>> solely >> > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those >> > of >> > >>>> the >> > >>>>>>>>>>>> company. >> > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >>>> attachments >> > >>>>>>>> for >> > >>>>>>>>>>>> the >> > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> > any >> > >>>>>> damage >> > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> This email and any files transmitted with it are >> confidential >> > >> and >> > >>>>>>>>>> intended >> > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> > are >> > >>>>>>>>>> addressed. >> > >>>>>>>>>>>>> If you have received this email in error please notify the >> > >> system >> > >>>>>>>>>> manager. >> > >>>>>>>>>>>>> Please note that any views or opinions presented in this >> email >> > >> are >> > >>>>>>>>>> solely >> > >>>>>>>>>>>>> those of the author and do not necessarily represent those >> of >> > >> the >> > >>>>>>>>>> company. >> > >>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >> attachments >> > >>>>>> for >> > >>>>>>>>>> the >> > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> any >> > >>>> damage >> > >>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > Area >> > >>>>>> Phase >> > >>>>>>>> 1, >> > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > Industrial >> > >>>>>> Area, >> > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>> >> > >>>>>>>>>>> This email and any files transmitted with it are confidential >> > and >> > >>>>>>>> intended >> > >>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >> > >>>>>>>> addressed. >> > >>>>>>>>>>> If you have received this email in error please notify the >> > system >> > >>>>>>>> manager. >> > >>>>>>>>>>> Please note that any views or opinions presented in this email >> > are >> > >>>>>>>> solely >> > >>>>>>>>>>> those of the author and do not necessarily represent those of >> > the >> > >>>>>>>> company. >> > >>>>>>>>>>> Finally, the recipient should check this email and any >> > attachments >> > >>>> for >> > >>>>>>>> the >> > >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> > >> damage >> > >>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>> >> > >>>>>>>>> ________________________________________ >> > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >> > >>>> Phase >> > >>>>>> 1, >> > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >> > >>>> Area, >> > >>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>> >> > >>>>>>>>> This email and any files transmitted with it are confidential >> and >> > >>>>>> intended >> > >>>>>>>>> solely for the use of the individual or entity to whom they are >> > >>>>>> addressed. >> > >>>>>>>>> If you have received this email in error please notify the >> system >> > >>>>>> manager. >> > >>>>>>>>> Please note that any views or opinions presented in this email >> are >> > >>>>>> solely >> > >>>>>>>>> those of the author and do not necessarily represent those of >> the >> > >>>>>> company. >> > >>>>>>>>> Finally, the recipient should check this email and any >> attachments >> > >> for >> > >>>>>> the >> > >>>>>>>>> presence of viruses. The company accepts no liability for any >> > damage >> > >>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>> ________________________________________ >> > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > >> Phase >> > >>>> 1, >> > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > >> Area, >> > >>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>> Fax : + 91 80 42428710 >> > >>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>> >> > >>>>>>> This email and any files transmitted with it are confidential and >> > >>>> intended >> > >>>>>>> solely for the use of the individual or entity to whom they are >> > >>>> addressed. >> > >>>>>>> If you have received this email in error please notify the system >> > >>>> manager. >> > >>>>>>> Please note that any views or opinions presented in this email are >> > >>>> solely >> > >>>>>>> those of the author and do not necessarily represent those of the >> > >>>> company. >> > >>>>>>> Finally, the recipient should check this email and any attachments >> > for >> > >>>> the >> > >>>>>>> presence of viruses. The company accepts no liability for any >> damage >> > >>>>>>> caused by any virus transmitted by this email. >> > >>>>>>> >> > >>>>> ________________________________________ >> > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>> Fax : + 91 80 42428710 >> > >>>>> Url : http://www.panaceamedical.com >> > >>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>> PMT EMAIL DISCLAIMER: >> > >>>>> >> > >>>>> This email and any files transmitted with it are confidential and >> > >> intended >> > >>>>> solely for the use of the individual or entity to whom they are >> > >> addressed. >> > >>>>> If you have received this email in error please notify the system >> > >> manager. >> > >>>>> Please note that any views or opinions presented in this email are >> > >> solely >> > >>>>> those of the author and do not necessarily represent those of the >> > >> company. >> > >>>>> Finally, the recipient should check this email and any attachments >> for >> > >> the >> > >>>>> presence of viruses. The company accepts no liability for any damage >> > >>>>> caused by any virus transmitted by this email. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>> >> > >>> ________________________________________ >> > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>> Fax : + 91 80 42428710 >> > >>> Url : http://www.panaceamedical.com >> > >>> >> > >> >> > >> ____________________________________________________________________________ >> > >>> PMT EMAIL DISCLAIMER: >> > >>> >> > >>> This email and any files transmitted with it are confidential and >> > intended >> > >>> solely for the use of the individual or entity to whom they are >> > addressed. >> > >>> If you have received this email in error please notify the system >> > manager. >> > >>> Please note that any views or opinions presented in this email are >> > solely >> > >>> those of the author and do not necessarily represent those of the >> > company. >> > >>> Finally, the recipient should check this email and any attachments for >> > the >> > >>> presence of viruses. The company accepts no liability for any damage >> > >>> caused by any virus transmitted by this email. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > >> >> > >> >> > > >> > > ________________________________________ >> > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >> > Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> > Malur - 563130. Kolar District. INDIA. >> > > >> > > Tel : +91 80 4242 8700 / 2845 4785 >> > > Fax : + 91 80 42428710 >> > > Url : http://www.panaceamedical.com >> > > >> > >> ____________________________________________________________________________ >> > > PMT EMAIL DISCLAIMER: >> > > >> > > This email and any files transmitted with it are confidential and >> intended >> > > solely for the use of the individual or entity to whom they are >> addressed. >> > > If you have received this email in error please notify the system >> manager. >> > > Please note that any views or opinions presented in this email are >> solely >> > > those of the author and do not necessarily represent those of the >> company. >> > > Finally, the recipient should check this email and any attachments for >> the >> > > presence of viruses. The company accepts no liability for any damage >> > > caused by any virus transmitted by this email. >> > > >> > >> > >> > > > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Thu Nov 3 16:10:31 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 20:10:31 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Message-ID: <1775591917.651990.1478203831679@mail.yahoo.com> OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right?About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question:I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards,Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Fri Nov 4 02:31:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 4 Nov 2016 07:31:18 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1775591917.651990.1478203831679@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> Message-ID: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: > OK. good. Thank Cyril to clarify it to me. To implement the Newton's > methods instead of multiplication of R with R^T, we need the > multiplication of Jacobian/Sensitivity (R here) matrix with vector > variable (here x) and the gradient vector (here multiplication of R > with -r). I think it is possible to implement the Newton optimization > methods with the current modules as I think we could extract the R and > f dot product and R and r dot product. Am I right? > About the displayed algorithms, I think the gradient vector is dot > product of matrix A (Jacobian) with the minus residual vector (-r). > > One more question: > I already developed my codes in python. Do you think it is easy to > wrap your modules in python? I don't have experience in these subject. > > Regards, > Vahid > > > On Thursday, November 3, 2016 2:23 AM, Cyril Mory > wrote: > > > Hello Vahid, > Thank you for this insight on Newton's methods. Yes, the output of the > backprojection filter, in SART, is the gradient of the cost function. > You may have noticed that the pipeline performs a division of the > forward projection by something coming from > "RayBoxIntersectionFilter". This is to normalize the forward > projection, so that R^T R f ~= blurry f. If you don't do it, you'll > have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, > and your algorithm will quickly diverge. > You could try to extract the gradient from the conjugate gradient > filter as well, but it is significantly more tricky: first, the CG > filter was implemented from the following algorithm, taken from > wikipedia (which embeds the normalization I was mentioning earlier): > In this algorithm, it is not clear to me what exactly is the gradient > of the cost function. I would say it is something like "- r_k", but > I'm not sure. Second, as you see, the CG filter needs an operator A, > which may differ from one problem to another, so this operator is > implemented in a separate filter, which in your case would be > rtkReconstructionConjugateGradientOperator, with the laplacian > regularization parameter gamma set to 0. > Note that we never actually store the system matrix R. Instead, the > interpolation coefficient it contains are re-computed on the fly > everytime we forward project. And the same holds for backprojection, > i.e the matrix R^T. > Best, > Cyril > > On 11/03/2016 03:38 AM, vahid ettehadi wrote: >> Hello Simon and Cyril, >> Thanks for the reply. >> You are right Simon. I did not notice it too in the literature. The >> main problem as you said is the storage. Actually I developed the >> conjugate gradient (CG), quasi-Newton and Newton optimization methods >> for optical tomography and I intended to apply them to the CT >> reconstruction as well. I implemented the Newton's methods >> (Gauss-Newton and Levenberg-Marquardt) in a >> Jacobian-Free-Newton-Krylov approaches to avoid the matrix >> multiplication of Jacobians (sensitivity). It means we only need to >> store the Jacobian matrix for the these methods (the matrix R that >> Cyril was mentioned), that is still a big matrix for practical >> problems in CT reconstruction. For the quasi-Newton I adapted an >> L-BFGS algorithm that only need the 3 or 8 last iterations of the >> gradient vector to calculate the Hessian matrix. In my case, the >> L-BFGS and Newton's methods was much faster than the CG as you know >> because of using the second order derivative (hessian matrix). I saw >> in your last paper you implement the conjugate gradient method, so I >> thought it might be easy to extract the gradient vector from CG >> modules and solve the cost function within the quasi-Newton/Newton >> methods. I will look at the codes to see what I can do. >> Thanks again for the reply. >> >> @Cyril: >> Please correct me if I am wrong. you mean the output of >> backProjectionFilter is the gradient of defined cost function? >> >> Regards, >> Vahid >> >> >> On Wednesday, November 2, 2016 2:53 AM, Cyril Mory >> >> wrote: >> >> >> Hi Vahid, >> Welcome to RTK :) >> Indeed, there are several iterative methods already implemented in >> RTK, but none of the filters allows you to easily extract the >> gradient of the least squares function there are minimizing. >> If you need to minimize the classical non-regularized tomographic >> cost function, ie || R f - p ||?, with R the forward projection >> operator, f the volume you are looking for, and p the measured >> projections, my best advice would be to copy some part of the >> pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, >> ie the following part (copy-paste this into webgraphviz.com) >> >> digraph SARTConeBeamReconstructionFilter { >> >> Input0 [ label="Input 0 (Volume)"]; >> Input0 [shape=Mdiamond]; >> Input1 [label="Input 1 (Projections)"]; >> Input1 [shape=Mdiamond]; >> >> node [shape=box]; >> ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref >> rtk::ForwardProjectionImageFilter"]; >> Extract [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref >> itk::MultiplyImageFilter"]; >> AfterExtract [label="", fixedsize="false", width=0, height=0, >> shape=none]; >> Subtract [ label="itk::SubtractImageFilter" URL="\ref >> itk::SubtractImageFilter"]; >> MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" >> URL="\ref itk::MultiplyImageFilter"]; >> Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref >> itk::DivideOrZeroOutImageFilter"]; >> GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" >> URL="\ref itk::MultiplyImageFilter", style=dashed]; >> Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref >> rtk::DisplacedDetectorImageFilter"]; >> ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref >> rtk::RayBoxIntersectionImageFilter"]; >> ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref >> rtk::BackProjectionImageFilter"]; >> OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; >> OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; >> Input0 -> OutofInput0 [arrowhead=none]; >> OutofInput0 -> ForwardProject; >> ConstantVolume -> BeforeBP [arrowhead=none]; >> BeforeBP -> BackProjection; >> Extract -> AfterExtract[arrowhead=none]; >> AfterExtract -> MultiplyByZero; >> AfterExtract -> Subtract; >> MultiplyByZero -> ForwardProject; >> Input1 -> Extract; >> ForwardProject -> Subtract; >> Subtract -> MultiplyByLambda; >> MultiplyByLambda -> Divide; >> Divide -> GatingWeight; >> GatingWeight -> Displaced; >> ConstantProjectionStack -> ExtractConstantProjection; >> ExtractConstantProjection -> RayBox; >> RayBox -> Divide; >> Displaced -> BackProjection; >> BackProjection -> OutofBP [arrowhead=none]; >> } >> >> As you can see, it is a very large part of the SART reconstruction >> filter, so yoiu might be better off just copying the whole >> SARTConeBeamReconstructionFilter and modifying it. >> >> Of course, you could also look into ITK's cost function class, and >> see if one of the classes inherited from it suits your needs, >> implement your cost function this way, and use ITK's off-the-shelf >> solvers to minimize it. See the inheritance diagram in >> https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if >> you want to try this approach. >> >> Best regards, >> Cyril >> >> On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >>> Hello RTK users and developers, >>> >>> I already implemented the RTK and reconstructed some images with the >>> FDK algorithm implemented in RTK. It works well. Thanks to RTK >>> developers. >>> Now, I am trying to develop a model-based image reconstruction for >>> our cone-beam micro-CT. I see already that some iterative algorithms >>> like ART and its modifications and conjugate-gradient (CG) method >>> are implemented in the RTK. I want to develop a model-based >>> reconstruction through the Newton/quasi-Newton optimizations >>> methods. I was wondering is it possible to extract the gradient of >>> least square function from implemented algorithms like CG module? >>> Any recommendation will be appreciated. >>> >>> Best Regards, >>> Vahid >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Fri Nov 4 16:42:08 2016 From: julien.jomier at kitware.com (Julien Jomier) Date: Fri, 4 Nov 2016 21:42:08 +0100 Subject: [Rtk-users] SimpleRTK + Matlab In-Reply-To: References: <06d4327e-9fd4-bf08-565d-5304f577b521@creatis.insa-lyon.fr> Message-ID: <89255846-9a06-a625-45f1-88d140c0013d@kitware.com> Hi Arvid, Sorry for the late reply. We successfully build the latest RTK with ITK 4.11.0 on Visual Studio 2013 with static libraries (BUILD_SHARED_LIBS set to OFF). I have just pushed a fix to SimpleRTK to build as shared libraries. Note that you would need to have ITK built as shared libraries as well. Let us know if you still have any issues, Julien On 23/09/2016 10:29, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi again. > > I've been spending some more time with this, and feel I learned a little > bit more. I have now tested this on several machines with several > compiler versions (more or less all of them) and serveral cmake versions > - all with Windows 7. > > I can actually reproduce the successful build you linked to, but this > can only be done if you do not include any of the language wrappings, > like in the build you linked to. Enable any of them, and the build will > break. (see attachment) > > I suspect it must have been working in the past, but since none of them > are included in your test there have been a breaking change, and none of > them work anymore. > > I am still trying to tweak then projects manually to build SimpleRTK > with some sort of language support, but still without any luck. > > best > > Arvid > > On Tue, Sep 20, 2016 at 4:19 PM, Simon Rit > > > wrote: > > Hi, > Sorry, I won't be able to help but I'd advise to tick on WRAP_PYTHON > only at first in cmake, not the other languages (i.e., tick off > WRAP_LUA). > I can't solve your problem but Kitware is going to look into an > upgrade of SimpleRTK in the coming days, I'll ask them if they know > what is the issue. If you look here: > http://my.cdash.org/viewNotes.php?buildid=1052065 > > this is a nightly build of SimpleRTK on Windows and it seems to > work. I don't see why it wouldn't work for you. > Simon > > On Tue, Sep 20, 2016 at 2:17 PM, Arvid Piehl Lauritsen B?ttiger > > wrote: > > Hi again. > > I understand, but could you please help me get in contact with > the person who knows something about the windows build (if any), > I think there is something wrong. > > I have been investigating the build problems I had and found > that in the sub folder "SimpleRTK-build" there is a solutions > file with SimpleRTK. I opened it up and found the projects which > I had problems building: "SimpleRTKCommon", > "SimpleRTKBasicFilters0", "SimpleRTKBasicFilters1" etc. > > When I then tried to build SimpleRTKCommon manually it just > compiled without any problems. However, when I followed up by > building "SimpleRTKBasicFilters0" it gave me an error which > stated that it couldn't find "SimpleRTKCommon-0.9.lib" - which I > just build. > > After some more investigation I realized that the > SimpleRTKCommon is set to build a dynamic linked library (DLL), > and SimpleRTKBasicFilters0 expects it to be a static linked > library (LIB). After changing SimpleRTKCommon to be build as a > static library - and changing the output location - I could > build SimpleRTKBasicFilters0. > > However, SimpleRTKBasicFilters0 is also build as an DLL, but > changing that to a LIB as well I could build > SimpleRTKBasicFilters1, then SimpleRTKBasicFilters2 and then > SimpleRTKBasicFilters3. You get the point. > > I'm unsure if the intention is to build them as static or > dynamic libraries, but in any case the current build > configuration doesn't work - on my setup at least. > > However, I should note than for some reason the "lua5" project > did build successfully out of the box. Whatever it does > differently works. > > best > > Arvid > > > > On Tue, Sep 20, 2016 at 7:33 AM, Simon Rit > > wrote: > > I'm not an msvc specialist but your first line suggests that > you have pasted only part of the log: > > 20> Done Building Project > "C:\Users\aplb\Work\RTK\RTK1.2-bin-vs13\SimpleRTK-build\ALL_BUILD.vcxproj" > (default targets) -- FAILED. > > What you need to find out is why this build failed. If the > build fails, the linking cannot work. > Cheers, > Simon > > > On 19/09/2016 19:44, Arvid Piehl Lauritsen B?ttiger wrote: >> I did a complete rebuild, and here is the end of the >> output: http://pastebin.com/hvQ33WWg >> >> I have to admit I'm not sure what to make of it. I should >> note that I'm trying to compile the version I just pulled >> from git earlier today, since the other version I normally >> work with is really old. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 6:50 PM, Simon Rit >> > > wrote: >> >> SimpleRTKCommon is a library generated when compiling. >> Don't you have another error before that which >> explains why it did not compile? >> Simon >> >> On Mon, Sep 19, 2016 at 2:30 PM, Arvid Piehl Lauritsen >> B?ttiger > > wrote: >> >> Hi again. >> >> I've been trying to get it working. However, I did >> run into some problems compiling SimpleRTK. The >> main issue seems to be that it depends on >> SimpleRTKCommon - which I do not have. >> >> Here is the last few lines from VS2013 >> >> > 5>LINK : fatal error LNK1181: cannot open input >> file '..\..\..\lib\Debug\SimpleRTKCommon-0.9.lib' >> [C:\Users\aplb\Work\RTK\RTK1.2- >> > >> bin-vs13\SimpleRTK-build\Code\IO\src\SimpleRTKIO.vcxproj] >> > 5> >> > 5> 0 Warning(s) >> > 5> 2 Error(s) >> > 5> >> > 5> Time Elapsed 00:00:25.26 >> > ========== Build: 4 succeeded, 1 failed, 0 >> up-to-date, 0 skipped ========== >> >> I'm not quite sure what is going on, because the >> only reference I can find to SimpleRTKCommon is >> the CMakeLists.txt on github: >> https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/CMakeLists.txt >> >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:19 AM, Simon Rit >> > > wrote: >> >> The latest MacOS. It's nice if you can test it >> on other platforms, I'll try to run it on >> Linux but I have to upgrade matlab first (I >> think python calls are available starting with >> Matlab 2014). >> Simon >> >> On Mon, Sep 19, 2016 at 11:14 AM, Arvid Piehl >> Lauritsen B?ttiger > > wrote: >> >> Dear Simon >> >> This look very interesting! Which platform >> did you successfully execute this on? >> I will give it a try at once (on windows) >> and let you know if I run into any problems. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:05 AM, Simon >> Rit > > >> wrote: >> >> Dear RTK users, >> I have quickly tested calling the >> SimpleRTK python lib from Matlab and >> it seems to work well: >> http://wiki.openrtk.org/index.php/SimpleRTK#Matlab >> >> Therefore, I don't think we have to >> work on Matlab wrappings but let us >> know if you think otherwise. >> Future works include a simple >> installation mechanism for >> pre-compiled SimpleRTK libraries. >> We'll keep you posted! >> Simon >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> >> >> >> >> > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From w_ettehadi at yahoo.com Mon Nov 7 16:53:54 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Mon, 7 Nov 2016 21:53:54 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Message-ID: <1477848112.17731.1478555634307@mail.yahoo.com> Thanks Cyril for your time and advises. Vahid On Friday, November 4, 2016 2:31 AM, Cyril Mory wrote: Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right? About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question: I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards, Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Philipp.Freislederer at med.uni-muenchen.de Thu Nov 17 05:08:09 2016 From: Philipp.Freislederer at med.uni-muenchen.de (Freislederer, Philipp) Date: Thu, 17 Nov 2016 10:08:09 +0000 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac Message-ID: Dear all, I currently have some issues in generating off-plane projections where I think rtk might be helpful. I am trying to generate projections from an Brainlab ExacTrac geometry. What I am getting is a projection matrix generated by the system itself. Using only this information I am able to project any voxel value in a CT onto a panel. Now, in order to speed everything up a little and not re-implement everything that has been done sufficiently already I am hoping to use 'rtkforwardprojections'. The problem is I am not able to reproduce the Brainlab geometry using 'rtksimulatedgeometry' from the projection matrix directly. I could calculate the room angle of the source to the panel from the projection matrix but I am getting weird results when applying these on something like plastimatch, so I think I have an error in there. Is there a way of creating a geometry simply from the projection matrix or do I have to work around and calculate every parameter needed specifically? Maybe someone has some experience with this type of issue. Thanks in advance! Philipp -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 17 05:27:14 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 17 Nov 2016 11:27:14 +0100 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac In-Reply-To: References: Message-ID: Hi, Yes ! I have actually added that functionality recently from Thibault Notargiacomo's code see bool rtk::ThreeDCircularProjectionGeometry::AddProjection ( const HomogeneousProjectionMatrixType & pMat) Note that the projection matrix must be for a 3D position in mm to a 2D position in mm. You can add pre-/post-matrices to go from mm to voxel. There is no command line tool to do it but you can easily create your command line tool to do it. This is tested in testing/rtkgeometryfrommatrixtest.cxx. Let me know if you need more info, Simon On Thu, Nov 17, 2016 at 11:08 AM, Freislederer, Philipp < Philipp.Freislederer at med.uni-muenchen.de> wrote: > Dear all, > > > > I currently have some issues in generating off-plane projections where I > think rtk might be helpful. > > I am trying to generate projections from an Brainlab ExacTrac geometry. > > What I am getting is a projection matrix generated by the system itself. > Using only this information I am able to project any voxel value in a CT > onto a panel. > > Now, in order to speed everything up a little and not re-implement > everything that has been done sufficiently already I am hoping to use > ?rtkforwardprojections?. > > The problem is I am not able to reproduce the Brainlab geometry using > ?rtksimulatedgeometry? from the projection matrix directly. > > I could calculate the room angle of the source to the panel from the > projection matrix but I am getting weird results when applying these on > something like plastimatch, so I think I have an error in there. > > > > Is there a way of creating a geometry simply from the projection matrix or > do I have to work around and calculate every parameter needed specifically? > > Maybe someone has some experience with this type of issue. > > > > Thanks in advance! > > > > Philipp > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Sat Nov 19 14:51:24 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Sat, 19 Nov 2016 19:51:24 +0000 Subject: [Rtk-users] Geometric calibration Message-ID: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ From simon.rit at creatis.insa-lyon.fr Tue Nov 22 02:01:19 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 22 Nov 2016 08:01:19 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: Message-ID: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper ). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > Hi RTK users, > > I'm interested in reconstructing images acquired by a fluoroscopy system > rotating around a knee phantom. Unfortunately, I've been unsuccessful so > far. I recognize some of the phantom in the reconstructed image, but it > contains double contours and the shape is deformed. > > I think the issue might be incorrect geometry specification. I have images > also including a phantom containing markers for which we know the > coordinates, which should allow us to calibrate the system. On the wiki on > image quality, I saw that some users had developed scripts to do the > calibration? Would someone be willing to share it? > > Kind regards, > Sepp > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: after.pdf Type: application/pdf Size: 5974 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: before.pdf Type: application/pdf Size: 5678 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: calib.py Type: text/x-python Size: 2488 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 23 12:44:11 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 23 Nov 2016 18:44:11 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Andreas, Today we had the RTK training and some users were looking for a XIM file reader. I pointed to your contributions but any chance to have it put in RTK soon? Thanks in advance, Simon On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit wrote: > Hi, > Thanks for sharing. There still seems to be some streak artefacts, do you > see the same in the Varian reconstruction? > I'm looking forward to the pull-request, I think we should try to make the > bzip2 optional. > Simon > > On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < > andreasg at phys.au.dk> wrote: > >> Thanks for the fast response Simon! >> >> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >> right all along! >> I just didn't get why it makes a difference. I think I do now, as the >> resulting image was flipped upside down and not left/right as I expected. >> [attached] >> >> The reconstruction is significantly better, I'll look into what should be >> included in the reader and what I should keep in my program to keep >> conformity with the other readers. Then I'll create a pull request. >> >> Just for the purpose of others hitting the same or a similar bug, I also >> attempted: >> I did the SART reconstruction with 10 iterations, lambda=0.3, and Joseph >> back/forward projection, *but with no* significant improvement [attached] >> >> And: >> If you want you can download the data set from: [Dropbox link to 460MB >> zip (I'll >> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >> is used along with the Scan.xml (Calibrations folder may be used in the >> future in my program, but I'm not sure if you can rely on the existence of >> the content). >> >> A MatLab XimReader is available: link >> (also >> available from Varian bitbucket along a with a python version and a >> C#->matlab plugin >> ). >> Otherwise my fork with the RTK-style reader is available from the same >> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >> so bzip2 is a new dependancy). >> >> Best regards >> Andreas >> >> >> __________________________________ >> >> Andreas Gravgaard Andersen >> >> Department of Oncology, >> >> Aarhus University Hospital >> >> N?rrebrogade 44, >> >> 8000, Aarhus C >> >> Mail: andreasg at phys.au.dk >> >> Cell: +45 3165 8140 >> >> >> >> 2016-09-16 16:13 GMT+02:00 Simon Rit : >> >>> Hi, >>> You can try any iterative reconstruction, they can also handle short >>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>> However, the nature of the artifacts indicate more a problem in the >>> geometry in my opinion. I have seen such errors when, for example, rotating >>> in the wrong direction. I can have a look if you share the dataset. >>> Cheers, >>> Simon >>> >>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>> andreasg at phys.au.dk> wrote: >>> >>>> Thanks for the suggestions, Simon and Cyril! >>>> >>>> I have been carefully looking though the geometry and from what I >>>> understand of the transformations matrices, the geometry looks correct/(as >>>> expected). >>>> >>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>> were because had used half-fan scans (full-arc). >>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>> artifacts occurs! >>>> >>>> Are there other (built-in) means of improving half-arc scans, than the >>>> parker short scan filter? >>>> >>>> Parker short scan does a decent job, but the result is still far from >>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>> >>>> Best regards >>>> Andreas >>>> >>>> >>>> __________________________________ >>>> >>>> Andreas Gravgaard Andersen >>>> >>>> Department of Oncology, >>>> >>>> Aarhus University Hospital >>>> >>>> N?rrebrogade 44, >>>> >>>> 8000, Aarhus C >>>> >>>> Mail: andreasg at phys.au.dk >>>> >>>> Cell: +45 3165 8140 >>>> >>>> >>>> >>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory : >>>> >>>>> One suggestion since it works with the Hnd projections: >>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>> Xim projections) and output two projection stack files and two geometry >>>>> files, then compare the projection stack files by subtracting one to the >>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>> are identical, then I do not see any reason why the reconstructions should >>>>> be different, so my guess is that you will find differences. >>>>> >>>>> >>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>> >>>>>> Hi, >>>>>> I have almost never worked with Varian data but it looks like a >>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>> projections which results in assigning a bad geometry to each >>>>>> projection. How did you name your projections? Maybe check that the >>>>>> order matches that of the RTK geometry file. Otherwise, there might be >>>>>> an issue in the creation of the geometry file itself. >>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>> code when you feel it's ready. >>>>>> Simon >>>>>> >>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>> wrote: >>>>>> >>>>>>> Dear RTK experts, >>>>>>> >>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>> format. I >>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>> available with RTK. >>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>> >>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>> in UI), >>>>>>> however when reconstructing with a regular FDK I get a reconstructed >>>>>>> image >>>>>>> that is smeared out around the high and low density areas [see >>>>>>> attached >>>>>>> image] >>>>>>> >>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>> Scripps >>>>>>> (~520 projections). Fixed detector and source (offset=0) with SID=2m, >>>>>>> SDD=3m. >>>>>>> >>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>> algorithm). >>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>> software works >>>>>>> perfectly. >>>>>>> >>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>> creates >>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>> If the first few projections are excluded, the following projection >>>>>>> will act >>>>>>> the same way. >>>>>>> >>>>>>> The projections are corrected for beam hardening and all the >>>>>>> projections >>>>>>> have the expected attenuation. >>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>> reconstruction >>>>>>> makes the same artifacts. >>>>>>> >>>>>>> Setting the value of the first and last projection to zero has the >>>>>>> same >>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>> not the >>>>>>> artifacts. >>>>>>> >>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>> >>>>>>> Best regards >>>>>>> Andreas >>>>>>> >>>>>>> __________________________________ >>>>>>> >>>>>>> Andreas Gravgaard Andersen >>>>>>> >>>>>>> Department of Oncology, >>>>>>> >>>>>>> Aarhus University Hospital >>>>>>> >>>>>>> N?rrebrogade 44, >>>>>>> >>>>>>> 8000, Aarhus C >>>>>>> >>>>>>> Mail: andreasg at phys.au.dk >>>>>>> >>>>>>> Cell: +45 3165 8140 >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Thu Nov 24 01:34:58 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Thu, 24 Nov 2016 06:34:58 +0000 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: , Message-ID: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Hi Simon, Thanks for the script. I was wondering if you could also share the csv or a dummy file? I'm unsure of what the second column contains. An offset distance to the rotation axis? Or the height? Which distance was known in your example? From the code it looks like the distance to the rotation axis? Sepp On 22 Nov 2016, at 08.01, Simon Rit > wrote: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt > wrote: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 24 01:44:42 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 24 Nov 2016 07:44:42 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> References: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Message-ID: Hi, Enclosed. Column 1 is platform angle, 2 is bb height, 3 is the u coordinate (in pixel) and 4 is the v coordinate (in pixel too). I had approximately measured the source-to-detector (270) and source-to-isocenter (210) distances but they were still optimized to have a better assessment. Simon On Thu, Nov 24, 2016 at 7:34 AM, Sepp de Raedt wrote: > Hi Simon, > > Thanks for the script. I was wondering if you could also share the csv or > a dummy file? I'm unsure of what the second column contains. An offset > distance to the rotation axis? Or the height? > > Which distance was known in your example? From the code it looks like the > distance to the rotation axis? > > Sepp > > On 22 Nov 2016, at 08.01, Simon Rit > wrote: > > Hi Sepp, > I did do a calibration script on a micro CT platform. The idea was that I > had a bb taken from 4 different view points at 4 different heights with a > known distance. Their projected position was segmented beforehand on the > projections and I tried to match the projections by optimizing the > calibration (which we see in before.pdf and after.pdf). I don't think it's > a good script, e.g., because I tried to find 8 parameters when 7 are > sufficient for my system (see, e.g., this paper > ). > But this gives you a starting point to develop your own script which will > hopefully be better. Please share if you do something from it! > Thanks, > Simon > > On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > >> Hi RTK users, >> >> I'm interested in reconstructing images acquired by a fluoroscopy system >> rotating around a knee phantom. Unfortunately, I've been unsuccessful so >> far. I recognize some of the phantom in the reconstructed image, but it >> contains double contours and the shape is deformed. >> >> I think the issue might be incorrect geometry specification. I have >> images also including a phantom containing markers for which we know the >> coordinates, which should allow us to calibrate the system. On the wiki on >> image quality, I saw that some users had developed scripts to do the >> calibration? Would someone be willing to share it? >> >> Kind regards, >> Sepp >> >> ______________________________________________________________________ >> This email has been scanned by the Symantec Email Security.cloud service. >> For more information please visit http://www.symanteccloud.com >> ______________________________________________________________________ >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > > > > > > > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CentroidPositions_H5_to_H25_90degstep.csv Type: text/csv Size: 321 bytes Desc: not available URL: From andreasg at phys.au.dk Fri Nov 25 10:25:55 2016 From: andreasg at phys.au.dk (Andreas Gravgaard Andersen) Date: Fri, 25 Nov 2016 16:25:55 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Simon, I have created a pull-request with the XIM file reader. I'm sorry for being late with the promised pull-request (there were a lot of merge conflicts, so it got postponed). I have cleaned it up, but it is still not flawless as mentioned in the pull-request-message. I have tried to keep the RTK coding-style by creating it as a modified HND file reader, but I have only a year of experience with C++, so I apologize if I've left some ugly code in there.. Best regards Andreas __________________________________ Andreas Gravgaard Andersen Department of Oncology, Aarhus University Hospital N?rrebrogade 44, 8000, Aarhus C Mail: andreasg at phys.au.dk Cell: +45 3165 8140 2016-11-23 18:44 GMT+01:00 Simon Rit : > Dear Andreas, > Today we had the RTK training and some users were looking for a XIM file > reader. I pointed to your contributions but any chance to have it put in > RTK soon? > Thanks in advance, > Simon > > On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit > wrote: > >> Hi, >> Thanks for sharing. There still seems to be some streak artefacts, do you >> see the same in the Varian reconstruction? >> I'm looking forward to the pull-request, I think we should try to make >> the bzip2 optional. >> Simon >> >> On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < >> andreasg at phys.au.dk> wrote: >> >>> Thanks for the fast response Simon! >>> >>> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >>> right all along! >>> I just didn't get why it makes a difference. I think I do now, as the >>> resulting image was flipped upside down and not left/right as I expected. >>> [attached] >>> >>> The reconstruction is significantly better, I'll look into what should >>> be included in the reader and what I should keep in my program to keep >>> conformity with the other readers. Then I'll create a pull request. >>> >>> Just for the purpose of others hitting the same or a similar bug, I also >>> attempted: >>> I did the SART reconstruction with 10 iterations, lambda=0.3, and >>> Joseph back/forward projection, *but with no* significant improvement >>> [attached] >>> >>> And: >>> If you want you can download the data set from: [Dropbox link to 460MB >>> zip (I'll >>> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >>> is used along with the Scan.xml (Calibrations folder may be used in the >>> future in my program, but I'm not sure if you can rely on the existence of >>> the content). >>> >>> A MatLab XimReader is available: link >>> (also >>> available from Varian bitbucket along a with a python version and a >>> C#->matlab plugin >>> ). >>> Otherwise my fork with the RTK-style reader is available from the same >>> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >>> so bzip2 is a new dependancy). >>> >>> Best regards >>> Andreas >>> >>> >>> __________________________________ >>> >>> Andreas Gravgaard Andersen >>> >>> Department of Oncology, >>> >>> Aarhus University Hospital >>> >>> N?rrebrogade 44, >>> >>> 8000, Aarhus C >>> >>> Mail: andreasg at phys.au.dk >>> >>> Cell: +45 3165 8140 >>> >>> >>> >>> 2016-09-16 16:13 GMT+02:00 Simon Rit : >>> >>>> Hi, >>>> You can try any iterative reconstruction, they can also handle short >>>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>>> However, the nature of the artifacts indicate more a problem in the >>>> geometry in my opinion. I have seen such errors when, for example, rotating >>>> in the wrong direction. I can have a look if you share the dataset. >>>> Cheers, >>>> Simon >>>> >>>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>>> andreasg at phys.au.dk> wrote: >>>> >>>>> Thanks for the suggestions, Simon and Cyril! >>>>> >>>>> I have been carefully looking though the geometry and from what I >>>>> understand of the transformations matrices, the geometry looks correct/(as >>>>> expected). >>>>> >>>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>>> were because had used half-fan scans (full-arc). >>>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>>> artifacts occurs! >>>>> >>>>> Are there other (built-in) means of improving half-arc scans, than the >>>>> parker short scan filter? >>>>> >>>>> Parker short scan does a decent job, but the result is still far from >>>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>>> >>>>> Best regards >>>>> Andreas >>>>> >>>>> >>>>> __________________________________ >>>>> >>>>> Andreas Gravgaard Andersen >>>>> >>>>> Department of Oncology, >>>>> >>>>> Aarhus University Hospital >>>>> >>>>> N?rrebrogade 44, >>>>> >>>>> 8000, Aarhus C >>>>> >>>>> Mail: andreasg at phys.au.dk >>>>> >>>>> Cell: +45 3165 8140 >>>>> >>>>> >>>>> >>>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory >>>>> : >>>>> >>>>>> One suggestion since it works with the Hnd projections: >>>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>>> Xim projections) and output two projection stack files and two geometry >>>>>> files, then compare the projection stack files by subtracting one to the >>>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>>> are identical, then I do not see any reason why the reconstructions should >>>>>> be different, so my guess is that you will find differences. >>>>>> >>>>>> >>>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>>> >>>>>>> Hi, >>>>>>> I have almost never worked with Varian data but it looks like a >>>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>>> projections which results in assigning a bad geometry to each >>>>>>> projection. How did you name your projections? Maybe check that the >>>>>>> order matches that of the RTK geometry file. Otherwise, there might >>>>>>> be >>>>>>> an issue in the creation of the geometry file itself. >>>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>>> code when you feel it's ready. >>>>>>> Simon >>>>>>> >>>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>>> wrote: >>>>>>> >>>>>>>> Dear RTK experts, >>>>>>>> >>>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>>> format. I >>>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>>> available with RTK. >>>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>>> >>>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>>> in UI), >>>>>>>> however when reconstructing with a regular FDK I get a >>>>>>>> reconstructed image >>>>>>>> that is smeared out around the high and low density areas [see >>>>>>>> attached >>>>>>>> image] >>>>>>>> >>>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>>> Scripps >>>>>>>> (~520 projections). Fixed detector and source (offset=0) with >>>>>>>> SID=2m, >>>>>>>> SDD=3m. >>>>>>>> >>>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>>> algorithm). >>>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>>> software works >>>>>>>> perfectly. >>>>>>>> >>>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>>> creates >>>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>>> If the first few projections are excluded, the following projection >>>>>>>> will act >>>>>>>> the same way. >>>>>>>> >>>>>>>> The projections are corrected for beam hardening and all the >>>>>>>> projections >>>>>>>> have the expected attenuation. >>>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>>> reconstruction >>>>>>>> makes the same artifacts. >>>>>>>> >>>>>>>> Setting the value of the first and last projection to zero has the >>>>>>>> same >>>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>>> not the >>>>>>>> artifacts. >>>>>>>> >>>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>>> >>>>>>>> Best regards >>>>>>>> Andreas >>>>>>>> >>>>>>>> __________________________________ >>>>>>>> >>>>>>>> Andreas Gravgaard Andersen >>>>>>>> >>>>>>>> Department of Oncology, >>>>>>>> >>>>>>>> Aarhus University Hospital >>>>>>>> >>>>>>>> N?rrebrogade 44, >>>>>>>> >>>>>>>> 8000, Aarhus C >>>>>>>> >>>>>>>> Mail: andreasg at phys.au.dk >>>>>>>> >>>>>>>> Cell: +45 3165 8140 >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rtk-users mailing list >>>>>>>> Rtk-users at public.kitware.com >>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From w_ettehadi at yahoo.com Tue Nov 1 12:50:12 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Tue, 1 Nov 2016 16:50:12 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> Message-ID: <1400014065.1872614.1478019012480@mail.yahoo.com> Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards,Vahid -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 02:53:39 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 07:53:39 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1400014065.1872614.1478019012480@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> Message-ID: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: > Hello RTK users and developers, > > I already implemented the RTK and reconstructed some images with the > FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. > Now, I am trying to develop a model-based image reconstruction for our > cone-beam micro-CT. I see already that some iterative algorithms like > ART and its modifications and conjugate-gradient (CG) method are > implemented in the RTK. I want to develop a model-based reconstruction > through the Newton/quasi-Newton optimizations methods. I was wondering > is it possible to extract the gradient of least square function from > implemented algorithms like CG module? Any recommendation will be > appreciated. > > Best Regards, > Vahid > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Wed Nov 2 04:01:30 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 08:01:30 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have tried but I am not getting where to give --division 4 in my code. Please find my code given below and please let me know where I need to change in my code to make it work. int _tmain(int argc, _TCHAR* argv[]) { #pragma region "Variable declaration" const double PI = 3.14159265358979323846; float *angles; int nProj = 349; typedef unsigned short pixelType; typedef float OutpixelType; const int dimension = 3; typedef itk::Image imageType; typedef itk::ImageRegionConstIterator ImageIteratorType; imageType::Pointer Projections = imageType::New(); #pragma endregion "Variable declaration" Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); imageType::SpacingType pSpacing; pSpacing[0] = 0.2960; pSpacing[1] = 0.2960; pSpacing[2] = 0.2960; Projections->SetSpacing(pSpacing); imageType::PointType pOrigin; pOrigin[0] = -212.972; pOrigin[1] = -212.972; pOrigin[2] = -212.972; //-158.50; Projections->SetOrigin(pOrigin); Projections->Update(); //Read angles. char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; angles = new float[nProj]; angles = readAngles(angles_file, angles); #pragma region"Geometry" // Geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); for (unsigned int noProj = 0; noProj < nProj; noProj++) { geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // } typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); geometryWriter->SetFilename("D:\\geo.xml"); geometryWriter->SetObject(geometry); geometryWriter->WriteFile(); geometry->Update(); #pragma endregion "Geometry" //Define output image type #ifdef USE_CUDA typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #else typedef itk::Image OutPutImageType; typedef rtk::ParkerShortScanImageFilter PSSFType; typedef rtk::FDKConeBeamReconstructionFilter FDKType; #endif //ScatterCorrection typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); ScatterCorrection->SetInput(Projections); //VarianObiRawImageFilter typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); //Create the output image typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; ConstantImageSourceType::PointType origin_p; ConstantImageSourceType::SizeType size_p; ConstantImageSourceType::SpacingType spacing_p; ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); origin_p[0] = -127.5; origin_p[1] = -127.5; origin_p[2] = -127.5; size_p[0] = 512; size_p[1] = 512; size_p[2] = 512; spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); projectionsSource->SetOrigin(origin_p); projectionsSource->SetSpacing(spacing_p); projectionsSource->SetSize(size_p); projectionsSource->SetConstant(0); // Short scan image filter PSSFType::Pointer pssf = PSSFType::New(); pssf->SetInput(AttenuationFilter->GetOutput()); pssf->SetGeometry(geometry); pssf->InPlaceOff(); std::cout << "short scan image filter success" << std::endl; FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput(0, projectionsSource->GetOutput()); feldkamp->SetInput(1, pssf->GetOutput()); feldkamp->SetGeometry(geometry); feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); feldkamp->GetRampFilter()->SetHammingFrequency(5.0); feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); feldkamp->SetGPUEnabled(1); feldkamp->SetNumberOfThreads(10000); #pragma region "Write volume" //Create a raw io for writing itk::RawImageIO::Pointer io; io = itk::RawImageIO::New(); for (unsigned int i = 0; i < dimension; i++) { io->SetDimensions(i, size_p[i]); io->SetSpacing(i, spacing_p[i]); io->SetOrigin(i, origin_p[i]); } io->SetHeaderSize(0); io->SetByteOrderToLittleEndian(); io->SetPixelType(itk::ImageIOBase::SCALAR); io->SetNumberOfComponents(1); io->SetNumberOfDimensions(3); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(feldkamp->GetOutput()); try { writer->Update(); } catch (itk::ExceptionObject & excp) { std::cerr << "Error while writing the image " << std::endl; std::cerr << excp << std::endl; getchar(); } #pragma endregion "WriteVolume" delete[] angles; return 0; } Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > I was able to perform a reconstruction from your header and geometry > file, using the following command lines: > > rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > --phantomscale "128,128,128" --like Output.mhd > > rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > The first computes projections through a Shepp & Logan phantom, with the > same size, spacing, origin, etc... as your projections, using your > geometry file geo.xml. > > The second line performs the FDK reconstruction. I had to use both the > "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > on a Geforce GTX 780). "--lowmem" loads the projections into memory by > subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > parts, reconstructs them one by one, then assembles the results. Can you > run the same commands and let us know whether you still encounter the > crash you mentioned ? If it works, you can use your own projection data > in the second command line instead of "simulatedprojections.mha". > > Best, > > Cyril > > On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > > Dear Sir, > > > > Please find the Header file in the attachment. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> We do not need the projections file, at least not for a first stage of > >> error tracking. We only need the header. > >> Try the following command line: > >> > >> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >> > >> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >> what we need, and it is a very light text file. The "proj.raw" contains > >> the pixel values, but at the moment we do not need them. We will create > >> our own proj.raw file, filled with zeros, which should be enough to > >> track down the error you encounter. > >> > >> Looking forward to receiving your file, > >> Cyril > >> > >> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>> Dear Sir, > >>> > >>> The single raw file of the projections is 1.4 GB and we are > not > >> able to send this big file to you. Can you please suggest other > alternatives > >> for this? > >>> Or can you provide us the PC configuration to solve the > issue? > >>> > >>> Let me know if any other clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Hello Zahid, > >>>> > >>>> We will need the header of your projections file, too (It is best if > you > >>>> have all your projections as a single .mhd and a single .raw file, so > it > >>>> should be 3-D image, and you send only the .mhd file). > >>>> > >>>> Regards, > >>>> Cyril > >>>> > >>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> > >>>>> I have only used RTK version 1.3.0. but in the error > >>>> message it is showing RTK version 1.2.0. > >>>>> Please find the attachment of the geometry file of > our > >>>> projections. > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> Without some more information, it's unlikely that we find the source > of > >>>>>> the problem. Here are a few things you can do to help us (and > therefore > >>>>>> yourself): > >>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > the > >>>>>> Cuda forward and back projection filters since v1.2.0, so your > problem > >>>>>> might disappear just by upgrading to the new version > >>>>>> - create a small example that reproduces your problem. You can, for > >>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>> example). And send us the script > >>>>>> - OR send us your geometry file and the header of your projections > file > >>>>>> (no need to send the projection data itself, we'll create a > zero-filled > >>>>>> stack of projections), and the command line that crashes > >>>>>> > >>>>>> Best regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Simon Rit, > >>>>>>> > >>>>>>> Please find the screen shot in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> Senior Design Engineer > >>>>>>> Mobile No. +91-9738379729 > >>>>>>> > >>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>> http://www.panaceamedical.com > >>>>>>> Bangalore - India. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>> Cc: rtk-users at public.kitware.com > >> [mailto:rtk-users at public.kitware.com], > >>>>>> saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>> memory > >>>>>>>> error. If you use the command line tool rtkfdk, you should first > make > >>>>>> sure > >>>>>>>> that you use the --lowmem option to stream the projection images. > If > >> it > >>>>>> is > >>>>>>>> no sufficient, you can split your volume using the --divisions. The > >>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of > >> RTK > >>>> on > >>>>>>>> our case studies webpage > >>>>>> . > >>>>>>>> Simon > >>>>>>>> > >>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>> > >>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>> > >>>>>>>>>> I am unable to do 1024x1024x1024 > reconstruction > >>>> using > >>>>>> RTK > >>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > shoot > >> of > >>>>>>>>> the > >>>>>>>>>> same. > >>>>>>>>>> > >>>>>>>>>> I am using the following items given below. > >>>>>>>>>> > >>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >> application > >>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>> 5. CUDA 7. > >>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>> > >>>>>>>>>> Please provide the solution of this and let me > >> know > >>>> if > >>>>>>>> any > >>>>>>>>>> other clarification is required. > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> Thanks & Regards > >>>>>>>>>> > >>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>> Senior Design Engineer > >>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>> > >>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>> Bangalore - India. > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> ____________________________________________________________ > >>>>>>>>> ________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> Rtk-users mailing list > >>>>>>> Rtk-users at public.kitware.com > >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 04:33:32 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 09:33:32 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> References: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Message-ID: <398170fb-a69e-9781-73d5-2a419542d06d@creatis.insa-lyon.fr> Dear Zahid, The --divisions is an option of the command-line application rtkfdk. It is not directly an option of the FDKConeBeamReconstructionFilter : rather, it is passed to a streaming filter at the end of the pipeline. Look for the following bit of code in rtkfdk.cxx : // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput( pfeldkamp ); streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); You can find information on how a streaming filter works on this page: https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html I hope it helps, Cyril On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have tried but I am not getting where to give --division 4 in my code. > > > Please find my code given below and please let me know where I need to change in my code to make it work. > > > int _tmain(int argc, _TCHAR* argv[]) > { > #pragma region "Variable declaration" > const double PI = 3.14159265358979323846; > float *angles; > int nProj = 349; > typedef unsigned short pixelType; > typedef float OutpixelType; > const int dimension = 3; > typedef itk::Image imageType; > typedef itk::ImageRegionConstIterator ImageIteratorType; > imageType::Pointer Projections = imageType::New(); > > #pragma endregion "Variable declaration" > > Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > imageType::SpacingType pSpacing; > pSpacing[0] = 0.2960; > pSpacing[1] = 0.2960; > pSpacing[2] = 0.2960; > Projections->SetSpacing(pSpacing); > > imageType::PointType pOrigin; > pOrigin[0] = -212.972; > pOrigin[1] = -212.972; > pOrigin[2] = -212.972; //-158.50; > Projections->SetOrigin(pOrigin); > > Projections->Update(); > > //Read angles. > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > angles = new float[nProj]; > angles = readAngles(angles_file, angles); > > #pragma region"Geometry" > // Geometry object > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > GeometryType::Pointer geometry = GeometryType::New(); > for (unsigned int noProj = 0; noProj < nProj; noProj++) > { > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // > } > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > geometryWriter->SetFilename("D:\\geo.xml"); > geometryWriter->SetObject(geometry); > geometryWriter->WriteFile(); > geometry->Update(); > #pragma endregion "Geometry" > > //Define output image type > > #ifdef USE_CUDA > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > #else > typedef itk::Image OutPutImageType; > typedef rtk::ParkerShortScanImageFilter PSSFType; > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > #endif > > //ScatterCorrection > typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); > ScatterCorrection->SetInput(Projections); > > //VarianObiRawImageFilter > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; > RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > //Create the output image > typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; > ConstantImageSourceType::PointType origin_p; > ConstantImageSourceType::SizeType size_p; > ConstantImageSourceType::SpacingType spacing_p; > ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); > origin_p[0] = -127.5; > origin_p[1] = -127.5; > origin_p[2] = -127.5; > size_p[0] = 512; > size_p[1] = 512; > size_p[2] = 512; > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > projectionsSource->SetOrigin(origin_p); > projectionsSource->SetSpacing(spacing_p); > projectionsSource->SetSize(size_p); > projectionsSource->SetConstant(0); > > // Short scan image filter > PSSFType::Pointer pssf = PSSFType::New(); > pssf->SetInput(AttenuationFilter->GetOutput()); > pssf->SetGeometry(geometry); > pssf->InPlaceOff(); > std::cout << "short scan image filter success" << std::endl; > > FDKType::Pointer feldkamp = FDKType::New(); > feldkamp->SetInput(0, projectionsSource->GetOutput()); > feldkamp->SetInput(1, pssf->GetOutput()); > feldkamp->SetGeometry(geometry); > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > feldkamp->SetGPUEnabled(1); > feldkamp->SetNumberOfThreads(10000); > > #pragma region "Write volume" > > //Create a raw io for writing > > itk::RawImageIO::Pointer io; > io = itk::RawImageIO::New(); > > for (unsigned int i = 0; i < dimension; i++) > { > io->SetDimensions(i, size_p[i]); > io->SetSpacing(i, spacing_p[i]); > io->SetOrigin(i, origin_p[i]); > } > io->SetHeaderSize(0); > io->SetByteOrderToLittleEndian(); > io->SetPixelType(itk::ImageIOBase::SCALAR); > io->SetNumberOfComponents(1); > io->SetNumberOfDimensions(3); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(feldkamp->GetOutput()); > > try > { > writer->Update(); > } > catch (itk::ExceptionObject & excp) > { > std::cerr << "Error while writing the image " << std::endl; > std::cerr << excp << std::endl; > getchar(); > } > #pragma endregion "WriteVolume" > delete[] angles; > return 0; > } > > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> I was able to perform a reconstruction from your header and geometry >> file, using the following command lines: >> >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> --phantomscale "128,128,128" --like Output.mhd >> >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> >> The first computes projections through a Shepp & Logan phantom, with the >> same size, spacing, origin, etc... as your projections, using your >> geometry file geo.xml. >> >> The second line performs the FDK reconstruction. I had to use both the >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> parts, reconstructs them one by one, then assembles the results. Can you >> run the same commands and let us know whether you still encounter the >> crash you mentioned ? If it works, you can use your own projection data >> in the second command line instead of "simulatedprojections.mha". >> >> Best, >> >> Cyril >> >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> >>> Dear Sir, >>> >>> Please find the Header file in the attachment. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> We do not need the projections file, at least not for a first stage of >>>> error tracking. We only need the header. >>>> Try the following command line: >>>> >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>> >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>> what we need, and it is a very light text file. The "proj.raw" contains >>>> the pixel values, but at the moment we do not need them. We will create >>>> our own proj.raw file, filled with zeros, which should be enough to >>>> track down the error you encounter. >>>> >>>> Looking forward to receiving your file, >>>> Cyril >>>> >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>> Dear Sir, >>>>> >>>>> The single raw file of the projections is 1.4 GB and we are >> not >>>> able to send this big file to you. Can you please suggest other >> alternatives >>>> for this? >>>>> Or can you provide us the PC configuration to solve the >> issue? >>>>> Let me know if any other clarification is required. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Hello Zahid, >>>>>> >>>>>> We will need the header of your projections file, too (It is best if >> you >>>>>> have all your projections as a single .mhd and a single .raw file, so >> it >>>>>> should be 3-D image, and you send only the .mhd file). >>>>>> >>>>>> Regards, >>>>>> Cyril >>>>>> >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>> Dear Cyril Mory, >>>>>>> >>>>>>> >>>>>>> I have only used RTK version 1.3.0. but in the error >>>>>> message it is showing RTK version 1.2.0. >>>>>>> Please find the attachment of the geometry file of >> our >>>>>> projections. >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> Without some more information, it's unlikely that we find the source >> of >>>>>>>> the problem. Here are a few things you can do to help us (and >> therefore >>>>>>>> yourself): >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >> the >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >> problem >>>>>>>> might disappear just by upgrading to the new version >>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>> example). And send us the script >>>>>>>> - OR send us your geometry file and the header of your projections >> file >>>>>>>> (no need to send the projection data itself, we'll create a >> zero-filled >>>>>>>> stack of projections), and the command line that crashes >>>>>>>> >>>>>>>> Best regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Simon Rit, >>>>>>>>> >>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> Senior Design Engineer >>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>> >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>> http://www.panaceamedical.com >>>>>>>>> Bangalore - India. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>> Cc: rtk-users at public.kitware.com >>>> [mailto:rtk-users at public.kitware.com], >>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>> memory >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >> make >>>>>>>> sure >>>>>>>>>> that you use the --lowmem option to stream the projection images. >> If >>>> it >>>>>>>> is >>>>>>>>>> no sufficient, you can split your volume using the --divisions. The >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of >>>> RTK >>>>>> on >>>>>>>>>> our case studies webpage >>>>>>>> . >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>> >>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>> >>>>>>>>>>>> I am unable to do 1024x1024x1024 >> reconstruction >>>>>> using >>>>>>>> RTK >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >> shoot >>>> of >>>>>>>>>>> the >>>>>>>>>>>> same. >>>>>>>>>>>> >>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>> >>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>> application >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>> >>>>>>>>>>>> Please provide the solution of this and let me >>>> know >>>>>> if >>>>>>>>>> any >>>>>>>>>>>> other clarification is required. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>> >>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>> >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>> Bangalore - India. >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>> ________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rtk-users mailing list >>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 06:57:15 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 10:57:15 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. Please check my modified file writer code given below. // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput(feldkamp->GetOutput()); streamerBP->SetNumberOfStreamDivisions(4); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(streamerBP->GetOutput()); writer->SetNumberOfStreamDivisions(4); Please let me know if any clarification is required. Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The --divisions is an option of the command-line application rtkfdk. It > is not directly an option of the FDKConeBeamReconstructionFilter : > rather, it is passed to a streaming filter at the end of the pipeline. > Look for the following bit of code in rtkfdk.cxx : > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter CPUOutputImageType> StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput( pfeldkamp ); > streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > > You can find information on how a streaming filter works on this page: > > https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > I hope it helps, > > Cyril > > On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have tried but I am not getting where to give > --division 4 in my code. > > > > > > Please find my code given below and please let me know > where I need to change in my code to make it work. > > > > > > int _tmain(int argc, _TCHAR* argv[]) > > { > > #pragma region "Variable declaration" > > const double PI = 3.14159265358979323846; > > float *angles; > > int nProj = 349; > > typedef unsigned short pixelType; > > typedef float OutpixelType; > > const int dimension = 3; > > typedef itk::Image imageType; > > typedef itk::ImageRegionConstIterator ImageIteratorType; > > imageType::Pointer Projections = imageType::New(); > > > > #pragma endregion "Variable declaration" > > > > Projections = > ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > > imageType::SpacingType pSpacing; > > pSpacing[0] = 0.2960; > > pSpacing[1] = 0.2960; > > pSpacing[2] = 0.2960; > > Projections->SetSpacing(pSpacing); > > > > imageType::PointType pOrigin; > > pOrigin[0] = -212.972; > > pOrigin[1] = -212.972; > > pOrigin[2] = -212.972; //-158.50; > > Projections->SetOrigin(pOrigin); > > > > Projections->Update(); > > > > //Read angles. > > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > angles = new float[nProj]; > > angles = readAngles(angles_file, angles); > > > > #pragma region"Geometry" > > // Geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > for (unsigned int noProj = 0; noProj < nProj; noProj++) > > { > > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); > // 136 half fan //2.07 Kidwai // > > } > > > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > GeometryWriterType; > > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > > geometryWriter->SetFilename("D:\\geo.xml"); > > geometryWriter->SetObject(geometry); > > geometryWriter->WriteFile(); > > geometry->Update(); > > #pragma endregion "Geometry" > > > > //Define output image type > > > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef itk::Image OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter PSSFType; > > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > > #endif > > > > //ScatterCorrection > > typedef rtk::BoellaardScatterCorrectionImageFilter > BoellaardScatterCorrectionImageFilterType; > > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > BoellaardScatterCorrectionImageFilterType::New(); > > ScatterCorrection->SetInput(Projections); > > > > //VarianObiRawImageFilter > > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > RawImageFilterType; > > RawImageFilterType::Pointer AttenuationFilter = > RawImageFilterType::New(); > > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > > > //Create the output image > > typedef rtk::ConstantImageSource< OutPutImageType > > ConstantImageSourceType; > > ConstantImageSourceType::PointType origin_p; > > ConstantImageSourceType::SizeType size_p; > > ConstantImageSourceType::SpacingType spacing_p; > > ConstantImageSourceType::Pointer projectionsSource = > ConstantImageSourceType::New(); > > origin_p[0] = -127.5; > > origin_p[1] = -127.5; > > origin_p[2] = -127.5; > > size_p[0] = 512; > > size_p[1] = 512; > > size_p[2] = 512; > > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > > > projectionsSource->SetOrigin(origin_p); > > projectionsSource->SetSpacing(spacing_p); > > projectionsSource->SetSize(size_p); > > projectionsSource->SetConstant(0); > > > > // Short scan image filter > > PSSFType::Pointer pssf = PSSFType::New(); > > pssf->SetInput(AttenuationFilter->GetOutput()); > > pssf->SetGeometry(geometry); > > pssf->InPlaceOff(); > > std::cout << "short scan image filter success" << std::endl; > > > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput(0, projectionsSource->GetOutput()); > > feldkamp->SetInput(1, pssf->GetOutput()); > > feldkamp->SetGeometry(geometry); > > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > feldkamp->SetGPUEnabled(1); > > feldkamp->SetNumberOfThreads(10000); > > > > #pragma region "Write volume" > > > > //Create a raw io for writing > > > > itk::RawImageIO::Pointer io; > > io = itk::RawImageIO::New(); > > > > for (unsigned int i = 0; i < dimension; i++) > > { > > io->SetDimensions(i, size_p[i]); > > io->SetSpacing(i, spacing_p[i]); > > io->SetOrigin(i, origin_p[i]); > > } > > io->SetHeaderSize(0); > > io->SetByteOrderToLittleEndian(); > > io->SetPixelType(itk::ImageIOBase::SCALAR); > > io->SetNumberOfComponents(1); > > io->SetNumberOfDimensions(3); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(feldkamp->GetOutput()); > > > > try > > { > > writer->Update(); > > } > > catch (itk::ExceptionObject & excp) > > { > > std::cerr << "Error while writing the image " << std::endl; > > std::cerr << excp << std::endl; > > getchar(); > > } > > #pragma endregion "WriteVolume" > > delete[] angles; > > return 0; > > } > > > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> I was able to perform a reconstruction from your header and geometry > >> file, using the following command lines: > >> > >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >> --phantomscale "128,128,128" --like Output.mhd > >> > >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >> > >> The first computes projections through a Shepp & Logan phantom, with the > >> same size, spacing, origin, etc... as your projections, using your > >> geometry file geo.xml. > >> > >> The second line performs the FDK reconstruction. I had to use both the > >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >> parts, reconstructs them one by one, then assembles the results. Can you > >> run the same commands and let us know whether you still encounter the > >> crash you mentioned ? If it works, you can use your own projection data > >> in the second command line instead of "simulatedprojections.mha". > >> > >> Best, > >> > >> Cyril > >> > >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >> > >>> Dear Sir, > >>> > >>> Please find the Header file in the attachment. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> We do not need the projections file, at least not for a first stage of > >>>> error tracking. We only need the header. > >>>> Try the following command line: > >>>> > >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>> > >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>> what we need, and it is a very light text file. The "proj.raw" contains > >>>> the pixel values, but at the moment we do not need them. We will create > >>>> our own proj.raw file, filled with zeros, which should be enough to > >>>> track down the error you encounter. > >>>> > >>>> Looking forward to receiving your file, > >>>> Cyril > >>>> > >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Sir, > >>>>> > >>>>> The single raw file of the projections is 1.4 GB and we > are > >> not > >>>> able to send this big file to you. Can you please suggest other > >> alternatives > >>>> for this? > >>>>> Or can you provide us the PC configuration to solve the > >> issue? > >>>>> Let me know if any other clarification is required. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Hello Zahid, > >>>>>> > >>>>>> We will need the header of your projections file, too (It is best if > >> you > >>>>>> have all your projections as a single .mhd and a single .raw file, so > >> it > >>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>> > >>>>>> Regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Cyril Mory, > >>>>>>> > >>>>>>> > >>>>>>> I have only used RTK version 1.3.0. but in the > error > >>>>>> message it is showing RTK version 1.2.0. > >>>>>>> Please find the attachment of the geometry file > of > >> our > >>>>>> projections. > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> Without some more information, it's unlikely that we find the > source > >> of > >>>>>>>> the problem. Here are a few things you can do to help us (and > >> therefore > >>>>>>>> yourself): > >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > >> the > >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >> problem > >>>>>>>> might disappear just by upgrading to the new version > >>>>>>>> - create a small example that reproduces your problem. You can, for > >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>> example). And send us the script > >>>>>>>> - OR send us your geometry file and the header of your projections > >> file > >>>>>>>> (no need to send the projection data itself, we'll create a > >> zero-filled > >>>>>>>> stack of projections), and the command line that crashes > >>>>>>>> > >>>>>>>> Best regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Simon Rit, > >>>>>>>>> > >>>>>>>>> Please find the screen shot in the attachment. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> Senior Design Engineer > >>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>> > >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>> http://www.panaceamedical.com > >>>>>>>>> Bangalore - India. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>> Cc: rtk-users at public.kitware.com > >>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>>>> memory > >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first > >> make > >>>>>>>> sure > >>>>>>>>>> that you use the --lowmem option to stream the projection images. > >> If > >>>> it > >>>>>>>> is > >>>>>>>>>> no sufficient, you can split your volume using the --divisions. > The > >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > of > >>>> RTK > >>>>>> on > >>>>>>>>>> our case studies webpage > >>>>>>>> . > >>>>>>>>>> Simon > >>>>>>>>>> > >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>> > >>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>> > >>>>>>>>>>>> I am unable to do 1024x1024x1024 > >> reconstruction > >>>>>> using > >>>>>>>> RTK > >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >> shoot > >>>> of > >>>>>>>>>>> the > >>>>>>>>>>>> same. > >>>>>>>>>>>> > >>>>>>>>>>>> I am using the following items given below. > >>>>>>>>>>>> > >>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>> application > >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>> > >>>>>>>>>>>> Please provide the solution of this and let > me > >>>> know > >>>>>> if > >>>>>>>>>> any > >>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>> > >>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>> > >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>> ________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 08:27:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 13:27:18 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> References: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Message-ID: <84154ed0-3cb8-abf7-c253-3162d78bf7b7@creatis.insa-lyon.fr> I see two errors: Remove this line writer->SetNumberOfStreamDivisions(4); since only the streaming filter, not the write filter, needs to know about the number of divisions. And change the filename to "D:\\Output.mhd" It will write both the .mhd and the .raw files. I hope it helps, Cyril On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. > > Please check my modified file writer code given below. > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput(feldkamp->GetOutput()); > streamerBP->SetNumberOfStreamDivisions(4); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(streamerBP->GetOutput()); > writer->SetNumberOfStreamDivisions(4); > > > Please let me know if any clarification is required. > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> The --divisions is an option of the command-line application rtkfdk. It >> is not directly an option of the FDKConeBeamReconstructionFilter : >> rather, it is passed to a streaming filter at the end of the pipeline. >> Look for the following bit of code in rtkfdk.cxx : >> >> // Streaming depending on streaming capability of writer >> typedef itk::StreamingImageFilter> CPUOutputImageType> StreamerType; >> StreamerType::Pointer streamerBP = StreamerType::New(); >> streamerBP->SetInput( pfeldkamp ); >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >> >> You can find information on how a streaming filter works on this page: >> >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> >> I hope it helps, >> >> Cyril >> >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have tried but I am not getting where to give >> --division 4 in my code. >>> >>> Please find my code given below and please let me know >> where I need to change in my code to make it work. >>> >>> int _tmain(int argc, _TCHAR* argv[]) >>> { >>> #pragma region "Variable declaration" >>> const double PI = 3.14159265358979323846; >>> float *angles; >>> int nProj = 349; >>> typedef unsigned short pixelType; >>> typedef float OutpixelType; >>> const int dimension = 3; >>> typedef itk::Image imageType; >>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>> imageType::Pointer Projections = imageType::New(); >>> >>> #pragma endregion "Variable declaration" >>> >>> Projections = >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); >>> imageType::SpacingType pSpacing; >>> pSpacing[0] = 0.2960; >>> pSpacing[1] = 0.2960; >>> pSpacing[2] = 0.2960; >>> Projections->SetSpacing(pSpacing); >>> >>> imageType::PointType pOrigin; >>> pOrigin[0] = -212.972; >>> pOrigin[1] = -212.972; >>> pOrigin[2] = -212.972; //-158.50; >>> Projections->SetOrigin(pOrigin); >>> >>> Projections->Update(); >>> >>> //Read angles. >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>> angles = new float[nProj]; >>> angles = readAngles(angles_file, angles); >>> >>> #pragma region"Geometry" >>> // Geometry object >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> GeometryType::Pointer geometry = GeometryType::New(); >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>> { >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); >> // 136 half fan //2.07 Kidwai // >>> } >>> >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> GeometryWriterType; >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>> geometryWriter->SetFilename("D:\\geo.xml"); >>> geometryWriter->SetObject(geometry); >>> geometryWriter->WriteFile(); >>> geometry->Update(); >>> #pragma endregion "Geometry" >>> >>> //Define output image type >>> >>> #ifdef USE_CUDA >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> #else >>> typedef itk::Image OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>> #endif >>> >>> //ScatterCorrection >>> typedef rtk::BoellaardScatterCorrectionImageFilter >> BoellaardScatterCorrectionImageFilterType; >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >> BoellaardScatterCorrectionImageFilterType::New(); >>> ScatterCorrection->SetInput(Projections); >>> >>> //VarianObiRawImageFilter >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> RawImageFilterType; >>> RawImageFilterType::Pointer AttenuationFilter = >> RawImageFilterType::New(); >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>> >>> //Create the output image >>> typedef rtk::ConstantImageSource< OutPutImageType > >> ConstantImageSourceType; >>> ConstantImageSourceType::PointType origin_p; >>> ConstantImageSourceType::SizeType size_p; >>> ConstantImageSourceType::SpacingType spacing_p; >>> ConstantImageSourceType::Pointer projectionsSource = >> ConstantImageSourceType::New(); >>> origin_p[0] = -127.5; >>> origin_p[1] = -127.5; >>> origin_p[2] = -127.5; >>> size_p[0] = 512; >>> size_p[1] = 512; >>> size_p[2] = 512; >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>> >>> projectionsSource->SetOrigin(origin_p); >>> projectionsSource->SetSpacing(spacing_p); >>> projectionsSource->SetSize(size_p); >>> projectionsSource->SetConstant(0); >>> >>> // Short scan image filter >>> PSSFType::Pointer pssf = PSSFType::New(); >>> pssf->SetInput(AttenuationFilter->GetOutput()); >>> pssf->SetGeometry(geometry); >>> pssf->InPlaceOff(); >>> std::cout << "short scan image filter success" << std::endl; >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>> feldkamp->SetInput(1, pssf->GetOutput()); >>> feldkamp->SetGeometry(geometry); >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>> feldkamp->SetGPUEnabled(1); >>> feldkamp->SetNumberOfThreads(10000); >>> >>> #pragma region "Write volume" >>> >>> //Create a raw io for writing >>> >>> itk::RawImageIO::Pointer io; >>> io = itk::RawImageIO::New(); >>> >>> for (unsigned int i = 0; i < dimension; i++) >>> { >>> io->SetDimensions(i, size_p[i]); >>> io->SetSpacing(i, spacing_p[i]); >>> io->SetOrigin(i, origin_p[i]); >>> } >>> io->SetHeaderSize(0); >>> io->SetByteOrderToLittleEndian(); >>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>> io->SetNumberOfComponents(1); >>> io->SetNumberOfDimensions(3); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(feldkamp->GetOutput()); >>> >>> try >>> { >>> writer->Update(); >>> } >>> catch (itk::ExceptionObject & excp) >>> { >>> std::cerr << "Error while writing the image " << std::endl; >>> std::cerr << excp << std::endl; >>> getchar(); >>> } >>> #pragma endregion "WriteVolume" >>> delete[] angles; >>> return 0; >>> } >>> >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> I was able to perform a reconstruction from your header and geometry >>>> file, using the following command lines: >>>> >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>> --phantomscale "128,128,128" --like Output.mhd >>>> >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>> >>>> The first computes projections through a Shepp & Logan phantom, with the >>>> same size, spacing, origin, etc... as your projections, using your >>>> geometry file geo.xml. >>>> >>>> The second line performs the FDK reconstruction. I had to use both the >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>> parts, reconstructs them one by one, then assembles the results. Can you >>>> run the same commands and let us know whether you still encounter the >>>> crash you mentioned ? If it works, you can use your own projection data >>>> in the second command line instead of "simulatedprojections.mha". >>>> >>>> Best, >>>> >>>> Cyril >>>> >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>> >>>>> Dear Sir, >>>>> >>>>> Please find the Header file in the attachment. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> We do not need the projections file, at least not for a first stage of >>>>>> error tracking. We only need the header. >>>>>> Try the following command line: >>>>>> >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>> >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>> what we need, and it is a very light text file. The "proj.raw" contains >>>>>> the pixel values, but at the moment we do not need them. We will create >>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>> track down the error you encounter. >>>>>> >>>>>> Looking forward to receiving your file, >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>> Dear Sir, >>>>>>> >>>>>>> The single raw file of the projections is 1.4 GB and we >> are >>>> not >>>>>> able to send this big file to you. Can you please suggest other >>>> alternatives >>>>>> for this? >>>>>>> Or can you provide us the PC configuration to solve the >>>> issue? >>>>>>> Let me know if any other clarification is required. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Hello Zahid, >>>>>>>> >>>>>>>> We will need the header of your projections file, too (It is best if >>>> you >>>>>>>> have all your projections as a single .mhd and a single .raw file, so >>>> it >>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>> >>>>>>>> Regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Cyril Mory, >>>>>>>>> >>>>>>>>> >>>>>>>>> I have only used RTK version 1.3.0. but in the >> error >>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>> Please find the attachment of the geometry file >> of >>>> our >>>>>>>> projections. >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> >>>>>>>>>> Without some more information, it's unlikely that we find the >> source >>>> of >>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>> therefore >>>>>>>>>> yourself): >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >>>> the >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>> problem >>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>> example). And send us the script >>>>>>>>>> - OR send us your geometry file and the header of your projections >>>> file >>>>>>>>>> (no need to send the projection data itself, we'll create a >>>> zero-filled >>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>> >>>>>>>>>> Best regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>> >>>>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> Senior Design Engineer >>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>> >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>> Bangalore - India. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>>>> memory >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >>>> make >>>>>>>>>> sure >>>>>>>>>>>> that you use the --lowmem option to stream the projection images. >>>> If >>>>>> it >>>>>>>>>> is >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >> The >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >> of >>>>>> RTK >>>>>>>> on >>>>>>>>>>>> our case studies webpage >>>>>>>>>> . >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>> reconstruction >>>>>>>> using >>>>>>>>>> RTK >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>> shoot >>>>>> of >>>>>>>>>>>>> the >>>>>>>>>>>>>> same. >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>>>> >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>> application >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Please provide the solution of this and let >> me >>>>>> know >>>>>>>> if >>>>>>>>>>>> any >>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>> >>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>> >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url >> : >>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>> ________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>> >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>>>> >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 09:37:23 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 13:37:23 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. Please suggest us for further process. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > I see two errors: > > Remove this line > > writer->SetNumberOfStreamDivisions(4); > > since only the streaming filter, not the write filter, needs to know > about the number of divisions. > And change the filename to > > "D:\\Output.mhd" > > It will write both the .mhd and the .raw files. > > I hope it helps, > Cyril > > On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have modified my file writer code and used > StreamingImageFilter. Now its not giving any error message but the final > output is 0 byte for 1024 volume. It working fine for 512 volume. > > > > Please check my modified file writer code given below. > > > > // Streaming depending on streaming capability of writer > > typedef itk::StreamingImageFilter > StreamerType; > > StreamerType::Pointer streamerBP = StreamerType::New(); > > streamerBP->SetInput(feldkamp->GetOutput()); > > streamerBP->SetNumberOfStreamDivisions(4); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(streamerBP->GetOutput()); > > writer->SetNumberOfStreamDivisions(4); > > > > > > Please let me know if any clarification is required. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> The --divisions is an option of the command-line application rtkfdk. It > >> is not directly an option of the FDKConeBeamReconstructionFilter : > >> rather, it is passed to a streaming filter at the end of the pipeline. > >> Look for the following bit of code in rtkfdk.cxx : > >> > >> // Streaming depending on streaming capability of writer > >> typedef itk::StreamingImageFilter >> CPUOutputImageType> StreamerType; > >> StreamerType::Pointer streamerBP = StreamerType::New(); > >> streamerBP->SetInput( pfeldkamp ); > >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >> > >> You can find information on how a streaming filter works on this page: > >> > >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >> > >> I hope it helps, > >> > >> Cyril > >> > >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have tried but I am not getting where to give > >> --division 4 in my code. > >>> > >>> Please find my code given below and please let me know > >> where I need to change in my code to make it work. > >>> > >>> int _tmain(int argc, _TCHAR* argv[]) > >>> { > >>> #pragma region "Variable declaration" > >>> const double PI = 3.14159265358979323846; > >>> float *angles; > >>> int nProj = 349; > >>> typedef unsigned short pixelType; > >>> typedef float OutpixelType; > >>> const int dimension = 3; > >>> typedef itk::Image imageType; > >>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>> imageType::Pointer Projections = imageType::New(); > >>> > >>> #pragma endregion "Variable declaration" > >>> > >>> Projections = > >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > nProj); > >>> imageType::SpacingType pSpacing; > >>> pSpacing[0] = 0.2960; > >>> pSpacing[1] = 0.2960; > >>> pSpacing[2] = 0.2960; > >>> Projections->SetSpacing(pSpacing); > >>> > >>> imageType::PointType pOrigin; > >>> pOrigin[0] = -212.972; > >>> pOrigin[1] = -212.972; > >>> pOrigin[2] = -212.972; //-158.50; > >>> Projections->SetOrigin(pOrigin); > >>> > >>> Projections->Update(); > >>> > >>> //Read angles. > >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>> angles = new float[nProj]; > >>> angles = readAngles(angles_file, angles); > >>> > >>> #pragma region"Geometry" > >>> // Geometry object > >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>> GeometryType::Pointer geometry = GeometryType::New(); > >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>> { > >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > 0); > >> // 136 half fan //2.07 Kidwai // > >>> } > >>> > >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >> GeometryWriterType; > >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > >>> geometryWriter->SetFilename("D:\\geo.xml"); > >>> geometryWriter->SetObject(geometry); > >>> geometryWriter->WriteFile(); > >>> geometry->Update(); > >>> #pragma endregion "Geometry" > >>> > >>> //Define output image type > >>> > >>> #ifdef USE_CUDA > >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>> #else > >>> typedef itk::Image OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; > >>> #endif > >>> > >>> //ScatterCorrection > >>> typedef rtk::BoellaardScatterCorrectionImageFilter > > >> BoellaardScatterCorrectionImageFilterType; > >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > >> BoellaardScatterCorrectionImageFilterType::New(); > >>> ScatterCorrection->SetInput(Projections); > >>> > >>> //VarianObiRawImageFilter > >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >> RawImageFilterType; > >>> RawImageFilterType::Pointer AttenuationFilter = > >> RawImageFilterType::New(); > >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>> > >>> //Create the output image > >>> typedef rtk::ConstantImageSource< OutPutImageType > > >> ConstantImageSourceType; > >>> ConstantImageSourceType::PointType origin_p; > >>> ConstantImageSourceType::SizeType size_p; > >>> ConstantImageSourceType::SpacingType spacing_p; > >>> ConstantImageSourceType::Pointer projectionsSource = > >> ConstantImageSourceType::New(); > >>> origin_p[0] = -127.5; > >>> origin_p[1] = -127.5; > >>> origin_p[2] = -127.5; > >>> size_p[0] = 512; > >>> size_p[1] = 512; > >>> size_p[2] = 512; > >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>> > >>> projectionsSource->SetOrigin(origin_p); > >>> projectionsSource->SetSpacing(spacing_p); > >>> projectionsSource->SetSize(size_p); > >>> projectionsSource->SetConstant(0); > >>> > >>> // Short scan image filter > >>> PSSFType::Pointer pssf = PSSFType::New(); > >>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>> pssf->SetGeometry(geometry); > >>> pssf->InPlaceOff(); > >>> std::cout << "short scan image filter success" << std::endl; > >>> > >>> FDKType::Pointer feldkamp = FDKType::New(); > >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>> feldkamp->SetInput(1, pssf->GetOutput()); > >>> feldkamp->SetGeometry(geometry); > >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>> feldkamp->SetGPUEnabled(1); > >>> feldkamp->SetNumberOfThreads(10000); > >>> > >>> #pragma region "Write volume" > >>> > >>> //Create a raw io for writing > >>> > >>> itk::RawImageIO::Pointer io; > >>> io = itk::RawImageIO::New(); > >>> > >>> for (unsigned int i = 0; i < dimension; i++) > >>> { > >>> io->SetDimensions(i, size_p[i]); > >>> io->SetSpacing(i, spacing_p[i]); > >>> io->SetOrigin(i, origin_p[i]); > >>> } > >>> io->SetHeaderSize(0); > >>> io->SetByteOrderToLittleEndian(); > >>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>> io->SetNumberOfComponents(1); > >>> io->SetNumberOfDimensions(3); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(feldkamp->GetOutput()); > >>> > >>> try > >>> { > >>> writer->Update(); > >>> } > >>> catch (itk::ExceptionObject & excp) > >>> { > >>> std::cerr << "Error while writing the image " << std::endl; > >>> std::cerr << excp << std::endl; > >>> getchar(); > >>> } > >>> #pragma endregion "WriteVolume" > >>> delete[] angles; > >>> return 0; > >>> } > >>> > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> I was able to perform a reconstruction from your header and geometry > >>>> file, using the following command lines: > >>>> > >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>> --phantomscale "128,128,128" --like Output.mhd > >>>> > >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > --hardware > >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>> > >>>> The first computes projections through a Shepp & Logan phantom, with > the > >>>> same size, spacing, origin, etc... as your projections, using your > >>>> geometry file geo.xml. > >>>> > >>>> The second line performs the FDK reconstruction. I had to use both the > >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>> parts, reconstructs them one by one, then assembles the results. Can > you > >>>> run the same commands and let us know whether you still encounter the > >>>> crash you mentioned ? If it works, you can use your own projection data > >>>> in the second command line instead of "simulatedprojections.mha". > >>>> > >>>> Best, > >>>> > >>>> Cyril > >>>> > >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>> > >>>>> Dear Sir, > >>>>> > >>>>> Please find the Header file in the attachment. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> We do not need the projections file, at least not for a first stage > of > >>>>>> error tracking. We only need the header. > >>>>>> Try the following command line: > >>>>>> > >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>> > >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>>>> what we need, and it is a very light text file. The "proj.raw" > contains > >>>>>> the pixel values, but at the moment we do not need them. We will > create > >>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>> track down the error you encounter. > >>>>>> > >>>>>> Looking forward to receiving your file, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> The single raw file of the projections is 1.4 GB and > we > >> are > >>>> not > >>>>>> able to send this big file to you. Can you please suggest other > >>>> alternatives > >>>>>> for this? > >>>>>>> Or can you provide us the PC configuration to solve > the > >>>> issue? > >>>>>>> Let me know if any other clarification is required. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Hello Zahid, > >>>>>>>> > >>>>>>>> We will need the header of your projections file, too (It is best > if > >>>> you > >>>>>>>> have all your projections as a single .mhd and a single .raw file, > so > >>>> it > >>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>> > >>>>>>>> Regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Cyril Mory, > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> I have only used RTK version 1.3.0. but in the > >> error > >>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>> Please find the attachment of the geometry > file > >> of > >>>> our > >>>>>>>> projections. > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> > >>>>>>>>>> Without some more information, it's unlikely that we find the > >> source > >>>> of > >>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>> therefore > >>>>>>>>>> yourself): > >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes > in > >>>> the > >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>> problem > >>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>> - create a small example that reproduces your problem. You can, > for > >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > logan > >>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>>>> example). And send us the script > >>>>>>>>>> - OR send us your geometry file and the header of your > projections > >>>> file > >>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>> zero-filled > >>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>> > >>>>>>>>>> Best regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>> > >>>>>>>>>>> Please find the screen shot in the > attachment. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>> > >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > CUDA > >>>>>>>> memory > >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > first > >>>> make > >>>>>>>>>> sure > >>>>>>>>>>>> that you use the --lowmem option to stream the projection > images. > >>>> If > >>>>>> it > >>>>>>>>>> is > >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. > >> The > >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > >> of > >>>>>> RTK > >>>>>>>> on > >>>>>>>>>>>> our case studies webpage > >>>>>>>>>> . > >>>>>>>>>>>> Simon > >>>>>>>>>>>> > >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>> reconstruction > >>>>>>>> using > >>>>>>>>>> RTK > >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >>>> shoot > >>>>>> of > >>>>>>>>>>>>> the > >>>>>>>>>>>>>> same. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am using the following items given > below. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>>>> application > >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Please provide the solution of this and > let > >> me > >>>>>> know > >>>>>>>> if > >>>>>>>>>>>> any > >>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, > >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > >> : > >>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>> ________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>> > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: RTK_Error.png Type: image/png Size: 57211 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 10:00:50 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 15:00:50 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> References: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Message-ID: <94e0045d-ef88-726d-9b7b-8b5ebf5ac067@creatis.insa-lyon.fr> Dear Zahid, The output looks correct. If the command line solution I suggested in a previous email works, the best way to move forward would be to compare your code and that of rtkfdk.cxx, and where it differs, make sure you have not introduced an error. Cyril On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. > > Please suggest us for further process. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> I see two errors: >> >> Remove this line >> >> writer->SetNumberOfStreamDivisions(4); >> >> since only the streaming filter, not the write filter, needs to know >> about the number of divisions. >> And change the filename to >> >> "D:\\Output.mhd" >> >> It will write both the .mhd and the .raw files. >> >> I hope it helps, >> Cyril >> >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have modified my file writer code and used >> StreamingImageFilter. Now its not giving any error message but the final >> output is 0 byte for 1024 volume. It working fine for 512 volume. >>> Please check my modified file writer code given below. >>> >>> // Streaming depending on streaming capability of writer >>> typedef itk::StreamingImageFilter >> StreamerType; >>> StreamerType::Pointer streamerBP = StreamerType::New(); >>> streamerBP->SetInput(feldkamp->GetOutput()); >>> streamerBP->SetNumberOfStreamDivisions(4); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(streamerBP->GetOutput()); >>> writer->SetNumberOfStreamDivisions(4); >>> >>> >>> Please let me know if any clarification is required. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> The --divisions is an option of the command-line application rtkfdk. It >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >>>> rather, it is passed to a streaming filter at the end of the pipeline. >>>> Look for the following bit of code in rtkfdk.cxx : >>>> >>>> // Streaming depending on streaming capability of writer >>>> typedef itk::StreamingImageFilter>>> CPUOutputImageType> StreamerType; >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >>>> streamerBP->SetInput( pfeldkamp ); >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >>>> >>>> You can find information on how a streaming filter works on this page: >>>> >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >>>> >>>> I hope it helps, >>>> >>>> Cyril >>>> >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>>>> Dear Cyril Mory, >>>>> >>>>> I have tried but I am not getting where to give >>>> --division 4 in my code. >>>>> Please find my code given below and please let me know >>>> where I need to change in my code to make it work. >>>>> int _tmain(int argc, _TCHAR* argv[]) >>>>> { >>>>> #pragma region "Variable declaration" >>>>> const double PI = 3.14159265358979323846; >>>>> float *angles; >>>>> int nProj = 349; >>>>> typedef unsigned short pixelType; >>>>> typedef float OutpixelType; >>>>> const int dimension = 3; >>>>> typedef itk::Image imageType; >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>>>> imageType::Pointer Projections = imageType::New(); >>>>> >>>>> #pragma endregion "Variable declaration" >>>>> >>>>> Projections = >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> nProj); >>>>> imageType::SpacingType pSpacing; >>>>> pSpacing[0] = 0.2960; >>>>> pSpacing[1] = 0.2960; >>>>> pSpacing[2] = 0.2960; >>>>> Projections->SetSpacing(pSpacing); >>>>> >>>>> imageType::PointType pOrigin; >>>>> pOrigin[0] = -212.972; >>>>> pOrigin[1] = -212.972; >>>>> pOrigin[2] = -212.972; //-158.50; >>>>> Projections->SetOrigin(pOrigin); >>>>> >>>>> Projections->Update(); >>>>> >>>>> //Read angles. >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>>>> angles = new float[nProj]; >>>>> angles = readAngles(angles_file, angles); >>>>> >>>>> #pragma region"Geometry" >>>>> // Geometry object >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>>>> { >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, >> 0); >>>> // 136 half fan //2.07 Kidwai // >>>>> } >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >>>> GeometryWriterType; >>>>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >>>>> geometryWriter->SetObject(geometry); >>>>> geometryWriter->WriteFile(); >>>>> geometry->Update(); >>>>> #pragma endregion "Geometry" >>>>> >>>>> //Define output image type >>>>> >>>>> #ifdef USE_CUDA >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> #else >>>>> typedef itk::Image OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>>>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>>>> #endif >>>>> >>>>> //ScatterCorrection >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter>>> BoellaardScatterCorrectionImageFilterType; >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >>>> BoellaardScatterCorrectionImageFilterType::New(); >>>>> ScatterCorrection->SetInput(Projections); >>>>> >>>>> //VarianObiRawImageFilter >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >>>> RawImageFilterType; >>>>> RawImageFilterType::Pointer AttenuationFilter = >>>> RawImageFilterType::New(); >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>>>> >>>>> //Create the output image >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >>>> ConstantImageSourceType; >>>>> ConstantImageSourceType::PointType origin_p; >>>>> ConstantImageSourceType::SizeType size_p; >>>>> ConstantImageSourceType::SpacingType spacing_p; >>>>> ConstantImageSourceType::Pointer projectionsSource = >>>> ConstantImageSourceType::New(); >>>>> origin_p[0] = -127.5; >>>>> origin_p[1] = -127.5; >>>>> origin_p[2] = -127.5; >>>>> size_p[0] = 512; >>>>> size_p[1] = 512; >>>>> size_p[2] = 512; >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>>>> >>>>> projectionsSource->SetOrigin(origin_p); >>>>> projectionsSource->SetSpacing(spacing_p); >>>>> projectionsSource->SetSize(size_p); >>>>> projectionsSource->SetConstant(0); >>>>> >>>>> // Short scan image filter >>>>> PSSFType::Pointer pssf = PSSFType::New(); >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >>>>> pssf->SetGeometry(geometry); >>>>> pssf->InPlaceOff(); >>>>> std::cout << "short scan image filter success" << std::endl; >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >>>>> feldkamp->SetGeometry(geometry); >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>>>> feldkamp->SetGPUEnabled(1); >>>>> feldkamp->SetNumberOfThreads(10000); >>>>> >>>>> #pragma region "Write volume" >>>>> >>>>> //Create a raw io for writing >>>>> >>>>> itk::RawImageIO::Pointer io; >>>>> io = itk::RawImageIO::New(); >>>>> >>>>> for (unsigned int i = 0; i < dimension; i++) >>>>> { >>>>> io->SetDimensions(i, size_p[i]); >>>>> io->SetSpacing(i, spacing_p[i]); >>>>> io->SetOrigin(i, origin_p[i]); >>>>> } >>>>> io->SetHeaderSize(0); >>>>> io->SetByteOrderToLittleEndian(); >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>>>> io->SetNumberOfComponents(1); >>>>> io->SetNumberOfDimensions(3); >>>>> >>>>> //create a writer and write reconstructed file >>>>> itk::ImageFileWriter::Pointer writer; >>>>> writer = itk::ImageFileWriter::New(); >>>>> writer->SetFileName("D:\\Output.raw"); >>>>> writer->SetImageIO(io); >>>>> writer->SetInput(feldkamp->GetOutput()); >>>>> >>>>> try >>>>> { >>>>> writer->Update(); >>>>> } >>>>> catch (itk::ExceptionObject & excp) >>>>> { >>>>> std::cerr << "Error while writing the image " << std::endl; >>>>> std::cerr << excp << std::endl; >>>>> getchar(); >>>>> } >>>>> #pragma endregion "WriteVolume" >>>>> delete[] angles; >>>>> return 0; >>>>> } >>>>> >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> Senior Design Engineer >>>>> Mobile No. +91-9738379729 >>>>> >>>>> Panacea Medical Technologies Pvt. Ltd. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>> http://www.panaceamedical.com >>>>> Bangalore - India. >>>>> >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> I was able to perform a reconstruction from your header and geometry >>>>>> file, using the following command lines: >>>>>> >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>>>> --phantomscale "128,128,128" --like Output.mhd >>>>>> >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> --hardware >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>>>> >>>>>> The first computes projections through a Shepp & Logan phantom, with >> the >>>>>> same size, spacing, origin, etc... as your projections, using your >>>>>> geometry file geo.xml. >>>>>> >>>>>> The second line performs the FDK reconstruction. I had to use both the >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>>>> parts, reconstructs them one by one, then assembles the results. Can >> you >>>>>> run the same commands and let us know whether you still encounter the >>>>>> crash you mentioned ? If it works, you can use your own projection data >>>>>> in the second command line instead of "simulatedprojections.mha". >>>>>> >>>>>> Best, >>>>>> >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>>>> >>>>>>> Dear Sir, >>>>>>> >>>>>>> Please find the Header file in the attachment. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> We do not need the projections file, at least not for a first stage >> of >>>>>>>> error tracking. We only need the header. >>>>>>>> Try the following command line: >>>>>>>> >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>>>> >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> contains >>>>>>>> the pixel values, but at the moment we do not need them. We will >> create >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>>>> track down the error you encounter. >>>>>>>> >>>>>>>> Looking forward to receiving your file, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Sir, >>>>>>>>> >>>>>>>>> The single raw file of the projections is 1.4 GB and >> we >>>> are >>>>>> not >>>>>>>> able to send this big file to you. Can you please suggest other >>>>>> alternatives >>>>>>>> for this? >>>>>>>>> Or can you provide us the PC configuration to solve >> the >>>>>> issue? >>>>>>>>> Let me know if any other clarification is required. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Hello Zahid, >>>>>>>>>> >>>>>>>>>> We will need the header of your projections file, too (It is best >> if >>>>>> you >>>>>>>>>> have all your projections as a single .mhd and a single .raw file, >> so >>>>>> it >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Cyril Mory, >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I have only used RTK version 1.3.0. but in the >>>> error >>>>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>>>> Please find the attachment of the geometry >> file >>>> of >>>>>> our >>>>>>>>>> projections. >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >>>> Simon >>>>>>>> Rit >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> >>>>>>>>>>>> Without some more information, it's unlikely that we find the >>>> source >>>>>> of >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>>>> therefore >>>>>>>>>>>> yourself): >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes >> in >>>>>> the >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>>>> problem >>>>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>>>> - create a small example that reproduces your problem. You can, >> for >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> logan >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>>>> example). And send us the script >>>>>>>>>>>> - OR send us your geometry file and the header of your >> projections >>>>>> file >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >>>>>> zero-filled >>>>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>>>> >>>>>>>>>>>> Best regards, >>>>>>>>>>>> Cyril >>>>>>>>>>>> >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>>>> >>>>>>>>>>>>> Please find the screen shot in the >> attachment. >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>> >>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>> >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a >> CUDA >>>>>>>>>> memory >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> first >>>>>> make >>>>>>>>>>>> sure >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> images. >>>>>> If >>>>>>>> it >>>>>>>>>>>> is >>>>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >>>> The >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >>>> of >>>>>>>> RTK >>>>>>>>>> on >>>>>>>>>>>>>> our case studies webpage >>>>>>>>>>>> . >>>>>>>>>>>>>> Simon >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>>>> reconstruction >>>>>>>>>> using >>>>>>>>>>>> RTK >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>>>> shoot >>>>>>>> of >>>>>>>>>>>>>>> the >>>>>>>>>>>>>>>> same. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am using the following items given >> below. >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>>>> application >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Please provide the solution of this and >> let >>>> me >>>>>>>> know >>>>>>>>>> if >>>>>>>>>>>>>> any >>>>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >>>> : >>>>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>>>> ________________ >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> This email and any files transmitted with it are confidential >>>> and >>>>>>>>>>>> intended >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >>>>>>>>>>>> addressed. >>>>>>>>>>>>>>> If you have received this email in error please notify the >>>> system >>>>>>>>>>>> manager. >>>>>>>>>>>>>>> Please note that any views or opinions presented in this email >>>> are >>>>>>>>>>>> solely >>>>>>>>>>>>>>> those of the author and do not necessarily represent those of >>>> the >>>>>>>>>>>> company. >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >>>> attachments >>>>>>>> for >>>>>>>>>>>> the >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>>>> damage >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>>>> >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >>> >>> >> >> > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Wed Nov 2 22:38:38 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 02:38:38 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Message-ID: <24189134.77160.1478140718379@mail.yahoo.com> Hello Simon and Cyril,Thanks for the reply.You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do.Thanks again for the reply. @Cyril:Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards,Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 02:05:51 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 06:05:51 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103060551.f7bfa0c3@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, Thank you for your help. We are able to reconstruct 1024 volume now. But the reconstruction time is around 4 minutes. Can you please help us to reduce the reconstruction time? We are using NVIDIA TITAN X GPU which has 12 GB memory. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The output looks correct. > > If the command line solution I suggested in a previous email works, the > best way to move forward would be to compare your code and that of > rtkfdk.cxx, and where it differs, make sure you have not introduced an > error. > > Cyril > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have done the same but the Output.mhd file is still 0 > KB for 1024 volume. Please find the attachment of the status of the output > displayed. > > > > Please suggest us for further process. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> I see two errors: > >> > >> Remove this line > >> > >> writer->SetNumberOfStreamDivisions(4); > >> > >> since only the streaming filter, not the write filter, needs to know > >> about the number of divisions. > >> And change the filename to > >> > >> "D:\\Output.mhd" > >> > >> It will write both the .mhd and the .raw files. > >> > >> I hope it helps, > >> Cyril > >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have modified my file writer code and used > >> StreamingImageFilter. Now its not giving any error message but the final > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > >>> Please check my modified file writer code given below. > >>> > >>> // Streaming depending on streaming capability of writer > >>> typedef itk::StreamingImageFilter > >> StreamerType; > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>> streamerBP->SetInput(feldkamp->GetOutput()); > >>> streamerBP->SetNumberOfStreamDivisions(4); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(streamerBP->GetOutput()); > >>> writer->SetNumberOfStreamDivisions(4); > >>> > >>> > >>> Please let me know if any clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> The --divisions is an option of the command-line application rtkfdk. It > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > >>>> rather, it is passed to a streaming filter at the end of the pipeline. > >>>> Look for the following bit of code in rtkfdk.cxx : > >>>> > >>>> // Streaming depending on streaming capability of writer > >>>> typedef itk::StreamingImageFilter >>>> CPUOutputImageType> StreamerType; > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>>> streamerBP->SetInput( pfeldkamp ); > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >>>> > >>>> You can find information on how a streaming filter works on this page: > >>>> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >>>> > >>>> I hope it helps, > >>>> > >>>> Cyril > >>>> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> I have tried but I am not getting where to give > >>>> --division 4 in my code. > >>>>> Please find my code given below and please let me > know > >>>> where I need to change in my code to make it work. > >>>>> int _tmain(int argc, _TCHAR* argv[]) > >>>>> { > >>>>> #pragma region "Variable declaration" > >>>>> const double PI = 3.14159265358979323846; > >>>>> float *angles; > >>>>> int nProj = 349; > >>>>> typedef unsigned short pixelType; > >>>>> typedef float OutpixelType; > >>>>> const int dimension = 3; > >>>>> typedef itk::Image imageType; > >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>>>> imageType::Pointer Projections = imageType::New(); > >>>>> > >>>>> #pragma endregion "Variable declaration" > >>>>> > >>>>> Projections = > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > >> nProj); > >>>>> imageType::SpacingType pSpacing; > >>>>> pSpacing[0] = 0.2960; > >>>>> pSpacing[1] = 0.2960; > >>>>> pSpacing[2] = 0.2960; > >>>>> Projections->SetSpacing(pSpacing); > >>>>> > >>>>> imageType::PointType pOrigin; > >>>>> pOrigin[0] = -212.972; > >>>>> pOrigin[1] = -212.972; > >>>>> pOrigin[2] = -212.972; //-158.50; > >>>>> Projections->SetOrigin(pOrigin); > >>>>> > >>>>> Projections->Update(); > >>>>> > >>>>> //Read angles. > >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>>>> angles = new float[nProj]; > >>>>> angles = readAngles(angles_file, angles); > >>>>> > >>>>> #pragma region"Geometry" > >>>>> // Geometry object > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>>>> { > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > >> 0); > >>>> // 136 half fan //2.07 Kidwai // > >>>>> } > >>>>> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >>>> GeometryWriterType; > >>>>> GeometryWriterType::Pointer geometryWriter = > GeometryWriterType::New(); > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > >>>>> geometryWriter->SetObject(geometry); > >>>>> geometryWriter->WriteFile(); > >>>>> geometry->Update(); > >>>>> #pragma endregion "Geometry" > >>>>> > >>>>> //Define output image type > >>>>> > >>>>> #ifdef USE_CUDA > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>>>> #else > >>>>> typedef itk::Image OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > FDKType; > >>>>> #endif > >>>>> > >>>>> //ScatterCorrection > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter imageType > >>>> BoellaardScatterCorrectionImageFilterType; > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection > = > >>>> BoellaardScatterCorrectionImageFilterType::New(); > >>>>> ScatterCorrection->SetInput(Projections); > >>>>> > >>>>> //VarianObiRawImageFilter > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >>>> RawImageFilterType; > >>>>> RawImageFilterType::Pointer AttenuationFilter = > >>>> RawImageFilterType::New(); > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>>>> > >>>>> //Create the output image > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > >>>> ConstantImageSourceType; > >>>>> ConstantImageSourceType::PointType origin_p; > >>>>> ConstantImageSourceType::SizeType size_p; > >>>>> ConstantImageSourceType::SpacingType spacing_p; > >>>>> ConstantImageSourceType::Pointer projectionsSource = > >>>> ConstantImageSourceType::New(); > >>>>> origin_p[0] = -127.5; > >>>>> origin_p[1] = -127.5; > >>>>> origin_p[2] = -127.5; > >>>>> size_p[0] = 512; > >>>>> size_p[1] = 512; > >>>>> size_p[2] = 512; > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>>>> > >>>>> projectionsSource->SetOrigin(origin_p); > >>>>> projectionsSource->SetSpacing(spacing_p); > >>>>> projectionsSource->SetSize(size_p); > >>>>> projectionsSource->SetConstant(0); > >>>>> > >>>>> // Short scan image filter > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>>>> pssf->SetGeometry(geometry); > >>>>> pssf->InPlaceOff(); > >>>>> std::cout << "short scan image filter success" << std::endl; > >>>>> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > >>>>> feldkamp->SetGeometry(geometry); > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>>>> feldkamp->SetGPUEnabled(1); > >>>>> feldkamp->SetNumberOfThreads(10000); > >>>>> > >>>>> #pragma region "Write volume" > >>>>> > >>>>> //Create a raw io for writing > >>>>> > >>>>> itk::RawImageIO::Pointer io; > >>>>> io = itk::RawImageIO::New(); > >>>>> > >>>>> for (unsigned int i = 0; i < dimension; i++) > >>>>> { > >>>>> io->SetDimensions(i, size_p[i]); > >>>>> io->SetSpacing(i, spacing_p[i]); > >>>>> io->SetOrigin(i, origin_p[i]); > >>>>> } > >>>>> io->SetHeaderSize(0); > >>>>> io->SetByteOrderToLittleEndian(); > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>>>> io->SetNumberOfComponents(1); > >>>>> io->SetNumberOfDimensions(3); > >>>>> > >>>>> //create a writer and write reconstructed file > >>>>> itk::ImageFileWriter::Pointer writer; > >>>>> writer = itk::ImageFileWriter::New(); > >>>>> writer->SetFileName("D:\\Output.raw"); > >>>>> writer->SetImageIO(io); > >>>>> writer->SetInput(feldkamp->GetOutput()); > >>>>> > >>>>> try > >>>>> { > >>>>> writer->Update(); > >>>>> } > >>>>> catch (itk::ExceptionObject & excp) > >>>>> { > >>>>> std::cerr << "Error while writing the image " << std::endl; > >>>>> std::cerr << excp << std::endl; > >>>>> getchar(); > >>>>> } > >>>>> #pragma endregion "WriteVolume" > >>>>> delete[] angles; > >>>>> return 0; > >>>>> } > >>>>> > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> Senior Design Engineer > >>>>> Mobile No. +91-9738379729 > >>>>> > >>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>> http://www.panaceamedical.com > >>>>> Bangalore - India. > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> I was able to perform a reconstruction from your header and geometry > >>>>>> file, using the following command lines: > >>>>>> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>>>> --phantomscale "128,128,128" --like Output.mhd > >>>>>> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > >> --hardware > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>>>> > >>>>>> The first computes projections through a Shepp & Logan phantom, with > >> the > >>>>>> same size, spacing, origin, etc... as your projections, using your > >>>>>> geometry file geo.xml. > >>>>>> > >>>>>> The second line performs the FDK reconstruction. I had to use both > the > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > (3GB, > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > by > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>>>> parts, reconstructs them one by one, then assembles the results. Can > >> you > >>>>>> run the same commands and let us know whether you still encounter the > >>>>>> crash you mentioned ? If it works, you can use your own projection > data > >>>>>> in the second command line instead of "simulatedprojections.mha". > >>>>>> > >>>>>> Best, > >>>>>> > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>>>> > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> Please find the Header file in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> We do not need the projections file, at least not for a first stage > >> of > >>>>>>>> error tracking. We only need the header. > >>>>>>>> Try the following command line: > >>>>>>>> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>>>> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file > is > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > >> contains > >>>>>>>> the pixel values, but at the moment we do not need them. We will > >> create > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>>>> track down the error you encounter. > >>>>>>>> > >>>>>>>> Looking forward to receiving your file, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Sir, > >>>>>>>>> > >>>>>>>>> The single raw file of the projections is 1.4 GB > and > >> we > >>>> are > >>>>>> not > >>>>>>>> able to send this big file to you. Can you please suggest other > >>>>>> alternatives > >>>>>>>> for this? > >>>>>>>>> Or can you provide us the PC configuration to solve > >> the > >>>>>> issue? > >>>>>>>>> Let me know if any other clarification is required. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Hello Zahid, > >>>>>>>>>> > >>>>>>>>>> We will need the header of your projections file, too (It is best > >> if > >>>>>> you > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > file, > >> so > >>>>>> it > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>>>> > >>>>>>>>>> Regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Cyril Mory, > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> I have only used RTK version 1.3.0. but in > the > >>>> error > >>>>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>>>> Please find the attachment of the geometry > >> file > >>>> of > >>>>>> our > >>>>>>>>>> projections. > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >>>> Simon > >>>>>>>> Rit > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > >>>> source > >>>>>> of > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>>>> therefore > >>>>>>>>>>>> yourself): > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > changes > >> in > >>>>>> the > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>>>> problem > >>>>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>>>> - create a small example that reproduces your problem. You can, > >> for > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > >> logan > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > an > >>>>>>>>>>>> example). And send us the script > >>>>>>>>>>>> - OR send us your geometry file and the header of your > >> projections > >>>>>> file > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>>>> zero-filled > >>>>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>>>> > >>>>>>>>>>>> Best regards, > >>>>>>>>>>>> Cyril > >>>>>>>>>>>> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>>>> > >>>>>>>>>>>>> Please find the screen shot in the > >> attachment. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>> > >>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > >> CUDA > >>>>>>>>>> memory > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > >> first > >>>>>> make > >>>>>>>>>>>> sure > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > >> images. > >>>>>> If > >>>>>>>> it > >>>>>>>>>>>> is > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > --divisions. > >>>> The > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > use > >>>> of > >>>>>>>> RTK > >>>>>>>>>> on > >>>>>>>>>>>>>> our case studies webpage > >>>>>>>>>>>> . > >>>>>>>>>>>>>> Simon > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>>>> reconstruction > >>>>>>>>>> using > >>>>>>>>>>>> RTK > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > screen > >>>>>> shoot > >>>>>>>> of > >>>>>>>>>>>>>>> the > >>>>>>>>>>>>>>>> same. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am using the following items given > >> below. > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > console > >>>>>>>> application > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Please provide the solution of this > and > >> let > >>>> me > >>>>>>>> know > >>>>>>>>>> if > >>>>>>>>>>>>>> any > >>>>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > >> Url > >>>> : > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>>>> ________________ > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> This email and any files transmitted with it are > confidential > >>>> and > >>>>>>>>>>>> intended > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they > >> are > >>>>>>>>>>>> addressed. > >>>>>>>>>>>>>>> If you have received this email in error please notify the > >>>> system > >>>>>>>>>>>> manager. > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > email > >>>> are > >>>>>>>>>>>> solely > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > of > >>>> the > >>>>>>>>>>>> company. > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > >>>> attachments > >>>>>>>> for > >>>>>>>>>>>> the > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > >>>>>> damage > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>>>> > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Thu Nov 3 02:23:25 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 3 Nov 2016 07:23:25 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <24189134.77160.1478140718379@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> Message-ID: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): {\begin{aligned}&\mathbf {r} _{0}:=\mathbf {b} -\mathbf {Ax} _{0}\\&\mathbf {p} _{0}:=\mathbf {r} _{0}\\&k:=0\\&{\hbox{repeat}}\\&\qquad \alpha _{k}:={\frac {\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}{\mathbf {p} _{k}^{\mathsf {T}}\mathbf {Ap} _{k}}}\\&\qquad \mathbf {x} _{k+1}:=\mathbf {x} _{k}+\alpha _{k}\mathbf {p} _{k}\\&\qquad \mathbf {r} _{k+1}:=\mathbf {r} _{k}-\alpha _{k}\mathbf {Ap} _{k}\\&\qquad {\hbox{if }}r_{k+1}{\hbox{ is sufficiently small then exit loop}}\\&\qquad \beta _{k}:={\frac {\mathbf {r} _{k+1}^{\mathsf {T}}\mathbf {r} _{k+1}}{\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}}\\&\qquad \mathbf {p} _{k+1}:=\mathbf {r} _{k+1}+\beta _{k}\mathbf {p} _{k}\\&\qquad k:=k+1\\&{\hbox{end repeat}}\\&{\hbox{The result is }}\mathbf {x} _{k+1}\end{aligned}} In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: > Hello Simon and Cyril, > Thanks for the reply. > You are right Simon. I did not notice it too in the literature. The > main problem as you said is the storage. Actually I developed the > conjugate gradient (CG), quasi-Newton and Newton optimization methods > for optical tomography and I intended to apply them to the CT > reconstruction as well. I implemented the Newton's methods > (Gauss-Newton and Levenberg-Marquardt) in a > Jacobian-Free-Newton-Krylov approaches to avoid the matrix > multiplication of Jacobians (sensitivity). It means we only need to > store the Jacobian matrix for the these methods (the matrix R that > Cyril was mentioned), that is still a big matrix for practical > problems in CT reconstruction. For the quasi-Newton I adapted an > L-BFGS algorithm that only need the 3 or 8 last iterations of the > gradient vector to calculate the Hessian matrix. In my case, the > L-BFGS and Newton's methods was much faster than the CG as you know > because of using the second order derivative (hessian matrix). I saw > in your last paper you implement the conjugate gradient method, so I > thought it might be easy to extract the gradient vector from CG > modules and solve the cost function within the quasi-Newton/Newton > methods. I will look at the codes to see what I can do. > Thanks again for the reply. > > @Cyril: > Please correct me if I am wrong. you mean the output of > backProjectionFilter is the gradient of defined cost function? > > Regards, > Vahid > > > On Wednesday, November 2, 2016 2:53 AM, Cyril Mory > wrote: > > > Hi Vahid, > Welcome to RTK :) > Indeed, there are several iterative methods already implemented in > RTK, but none of the filters allows you to easily extract the gradient > of the least squares function there are minimizing. > If you need to minimize the classical non-regularized tomographic cost > function, ie || R f - p ||?, with R the forward projection operator, f > the volume you are looking for, and p the measured projections, my > best advice would be to copy some part of the pipeline of > rtkSARTConeBeamReconstructionFilter to get the job done, ie the > following part (copy-paste this into webgraphviz.com) > > digraph SARTConeBeamReconstructionFilter { > > Input0 [ label="Input 0 (Volume)"]; > Input0 [shape=Mdiamond]; > Input1 [label="Input 1 (Projections)"]; > Input1 [shape=Mdiamond]; > > node [shape=box]; > ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref > rtk::ForwardProjectionImageFilter"]; > Extract [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref > itk::MultiplyImageFilter"]; > AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; > Subtract [ label="itk::SubtractImageFilter" URL="\ref > itk::SubtractImageFilter"]; > MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" > URL="\ref itk::MultiplyImageFilter"]; > Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref > itk::DivideOrZeroOutImageFilter"]; > GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" > URL="\ref itk::MultiplyImageFilter", style=dashed]; > Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref > rtk::DisplacedDetectorImageFilter"]; > ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref > rtk::RayBoxIntersectionImageFilter"]; > ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref > rtk::BackProjectionImageFilter"]; > OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; > OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; > Input0 -> OutofInput0 [arrowhead=none]; > OutofInput0 -> ForwardProject; > ConstantVolume -> BeforeBP [arrowhead=none]; > BeforeBP -> BackProjection; > Extract -> AfterExtract[arrowhead=none]; > AfterExtract -> MultiplyByZero; > AfterExtract -> Subtract; > MultiplyByZero -> ForwardProject; > Input1 -> Extract; > ForwardProject -> Subtract; > Subtract -> MultiplyByLambda; > MultiplyByLambda -> Divide; > Divide -> GatingWeight; > GatingWeight -> Displaced; > ConstantProjectionStack -> ExtractConstantProjection; > ExtractConstantProjection -> RayBox; > RayBox -> Divide; > Displaced -> BackProjection; > BackProjection -> OutofBP [arrowhead=none]; > } > > As you can see, it is a very large part of the SART reconstruction > filter, so yoiu might be better off just copying the whole > SARTConeBeamReconstructionFilter and modifying it. > > Of course, you could also look into ITK's cost function class, and see > if one of the classes inherited from it suits your needs, implement > your cost function this way, and use ITK's off-the-shelf solvers to > minimize it. See the inheritance diagram in > https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if > you want to try this approach. > > Best regards, > Cyril > > On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >> Hello RTK users and developers, >> >> I already implemented the RTK and reconstructed some images with the >> FDK algorithm implemented in RTK. It works well. Thanks to RTK >> developers. >> Now, I am trying to develop a model-based image reconstruction for >> our cone-beam micro-CT. I see already that some iterative algorithms >> like ART and its modifications and conjugate-gradient (CG) method are >> implemented in the RTK. I want to develop a model-based >> reconstruction through the Newton/quasi-Newton optimizations methods. >> I was wondering is it possible to extract the gradient of least >> square function from implemented algorithms like CG module? Any >> recommendation will be appreciated. >> >> Best Regards, >> Vahid >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 10:21:11 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 14:21:11 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. The RTKScatterGlareCorrectionImageFilter code is given below. //rtkLagCorrectionImageFilter typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); LagCorrection->SetInput(Projections); //rtkScatterGlareCorrectionImageFilter typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Cyril Mory, > > > Thank you for your help. We are able to reconstruct 1024 > volume now. > > But the reconstruction time is around 4 minutes. Can you > please help us to reduce the reconstruction time? > > We are using NVIDIA TITAN X GPU which has 12 GB memory. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > Dear Zahid, > > > > The output looks correct. > > > > If the command line solution I suggested in a previous email works, the > > best way to move forward would be to compare your code and that of > > rtkfdk.cxx, and where it differs, make sure you have not introduced an > > error. > > > > Cyril > > > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > > Dear Cyril Mory, > > > > > > I have done the same but the Output.mhd file is still 0 > > KB for 1024 volume. Please find the attachment of the status of the output > > displayed. > > > > > > Please suggest us for further process. > > > > > > > > > Thanks & Regards > > > > > > Zahid Hasan Ansari > > > > > > > > > > > > > > > ----- Original Message ----- > > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > > [mailto:simon.rit at creatis.insa-lyon.fr] > > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > > > > >> I see two errors: > > >> > > >> Remove this line > > >> > > >> writer->SetNumberOfStreamDivisions(4); > > >> > > >> since only the streaming filter, not the write filter, needs to know > > >> about the number of divisions. > > >> And change the filename to > > >> > > >> "D:\\Output.mhd" > > >> > > >> It will write both the .mhd and the .raw files. > > >> > > >> I hope it helps, > > >> Cyril > > >> > > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > >>> Dear Cyril Mory, > > >>> > > >>> I have modified my file writer code and used > > >> StreamingImageFilter. Now its not giving any error message but the > final > > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > > >>> Please check my modified file writer code given > below. > > >>> > > >>> // Streaming depending on streaming capability of writer > > >>> typedef itk::StreamingImageFilter > > >> StreamerType; > > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>> streamerBP->SetInput(feldkamp->GetOutput()); > > >>> streamerBP->SetNumberOfStreamDivisions(4); > > >>> > > >>> //create a writer and write reconstructed file > > >>> itk::ImageFileWriter::Pointer writer; > > >>> writer = itk::ImageFileWriter::New(); > > >>> writer->SetFileName("D:\\Output.raw"); > > >>> writer->SetImageIO(io); > > >>> writer->SetInput(streamerBP->GetOutput()); > > >>> writer->SetNumberOfStreamDivisions(4); > > >>> > > >>> > > >>> Please let me know if any clarification is required. > > >>> > > >>> > > >>> Thanks & Regards > > >>> > > >>> Zahid Hasan Ansari > > >>> Senior Design Engineer > > >>> Mobile No. +91-9738379729 > > >>> > > >>> Panacea Medical Technologies Pvt. Ltd. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >> http://www.panaceamedical.com > > >>> Bangalore - India. > > >>> > > >>> > > >>> > > >>> > > >>> ----- Original Message ----- > > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > > Rit > > >> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>> > > >>> > > >>>> Dear Zahid, > > >>>> > > >>>> The --divisions is an option of the command-line application rtkfdk. > It > > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > > >>>> rather, it is passed to a streaming filter at the end of the > pipeline. > > >>>> Look for the following bit of code in rtkfdk.cxx : > > >>>> > > >>>> // Streaming depending on streaming capability of writer > > >>>> typedef itk::StreamingImageFilter > >>>> CPUOutputImageType> StreamerType; > > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>>> streamerBP->SetInput( pfeldkamp ); > > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg > ); > > >>>> > > >>>> You can find information on how a streaming filter works on this > page: > > >>>> > > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > >>>> > > >>>> I hope it helps, > > >>>> > > >>>> Cyril > > >>>> > > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > >>>>> Dear Cyril Mory, > > >>>>> > > >>>>> I have tried but I am not getting where to give > > >>>> --division 4 in my code. > > >>>>> Please find my code given below and please let me > > know > > >>>> where I need to change in my code to make it work. > > >>>>> int _tmain(int argc, _TCHAR* argv[]) > > >>>>> { > > >>>>> #pragma region "Variable declaration" > > >>>>> const double PI = 3.14159265358979323846; > > >>>>> float *angles; > > >>>>> int nProj = 349; > > >>>>> typedef unsigned short pixelType; > > >>>>> typedef float OutpixelType; > > >>>>> const int dimension = 3; > > >>>>> typedef itk::Image imageType; > > >>>>> typedef itk::ImageRegionConstIterator > ImageIteratorType; > > >>>>> imageType::Pointer Projections = imageType::New(); > > >>>>> > > >>>>> #pragma endregion "Variable declaration" > > >>>>> > > >>>>> Projections = > > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > > >> nProj); > > >>>>> imageType::SpacingType pSpacing; > > >>>>> pSpacing[0] = 0.2960; > > >>>>> pSpacing[1] = 0.2960; > > >>>>> pSpacing[2] = 0.2960; > > >>>>> Projections->SetSpacing(pSpacing); > > >>>>> > > >>>>> imageType::PointType pOrigin; > > >>>>> pOrigin[0] = -212.972; > > >>>>> pOrigin[1] = -212.972; > > >>>>> pOrigin[2] = -212.972; //-158.50; > > >>>>> Projections->SetOrigin(pOrigin); > > >>>>> > > >>>>> Projections->Update(); > > >>>>> > > >>>>> //Read angles. > > >>>>> char *angles_file = > "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > >>>>> angles = new float[nProj]; > > >>>>> angles = readAngles(angles_file, angles); > > >>>>> > > >>>>> #pragma region"Geometry" > > >>>>> // Geometry object > > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > > >>>>> { > > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, > 0, > > >> 0); > > >>>> // 136 half fan //2.07 Kidwai // > > >>>>> } > > >>>>> > > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > > >>>> GeometryWriterType; > > >>>>> GeometryWriterType::Pointer geometryWriter = > > GeometryWriterType::New(); > > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > > >>>>> geometryWriter->SetObject(geometry); > > >>>>> geometryWriter->WriteFile(); > > >>>>> geometry->Update(); > > >>>>> #pragma endregion "Geometry" > > >>>>> > > >>>>> //Define output image type > > >>>>> > > >>>>> #ifdef USE_CUDA > > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > > PSSFType; > > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > >>>>> #else > > >>>>> typedef itk::Image OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter > PSSFType; > > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > > FDKType; > > >>>>> #endif > > >>>>> > > >>>>> //ScatterCorrection > > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter > imageType > > >>>> BoellaardScatterCorrectionImageFilterType; > > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer > ScatterCorrection > > = > > >>>> BoellaardScatterCorrectionImageFilterType::New(); > > >>>>> ScatterCorrection->SetInput(Projections); > > >>>>> > > >>>>> //VarianObiRawImageFilter > > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > > >>>> RawImageFilterType; > > >>>>> RawImageFilterType::Pointer AttenuationFilter = > > >>>> RawImageFilterType::New(); > > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > >>>>> > > >>>>> //Create the output image > > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > > >>>> ConstantImageSourceType; > > >>>>> ConstantImageSourceType::PointType origin_p; > > >>>>> ConstantImageSourceType::SizeType size_p; > > >>>>> ConstantImageSourceType::SpacingType spacing_p; > > >>>>> ConstantImageSourceType::Pointer projectionsSource = > > >>>> ConstantImageSourceType::New(); > > >>>>> origin_p[0] = -127.5; > > >>>>> origin_p[1] = -127.5; > > >>>>> origin_p[2] = -127.5; > > >>>>> size_p[0] = 512; > > >>>>> size_p[1] = 512; > > >>>>> size_p[2] = 512; > > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > >>>>> > > >>>>> projectionsSource->SetOrigin(origin_p); > > >>>>> projectionsSource->SetSpacing(spacing_p); > > >>>>> projectionsSource->SetSize(size_p); > > >>>>> projectionsSource->SetConstant(0); > > >>>>> > > >>>>> // Short scan image filter > > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > > >>>>> pssf->SetGeometry(geometry); > > >>>>> pssf->InPlaceOff(); > > >>>>> std::cout << "short scan image filter success" << std::endl; > > >>>>> > > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > > >>>>> feldkamp->SetGeometry(geometry); > > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > >>>>> feldkamp->SetGPUEnabled(1); > > >>>>> feldkamp->SetNumberOfThreads(10000); > > >>>>> > > >>>>> #pragma region "Write volume" > > >>>>> > > >>>>> //Create a raw io for writing > > >>>>> > > >>>>> itk::RawImageIO::Pointer io; > > >>>>> io = itk::RawImageIO::New(); > > >>>>> > > >>>>> for (unsigned int i = 0; i < dimension; i++) > > >>>>> { > > >>>>> io->SetDimensions(i, size_p[i]); > > >>>>> io->SetSpacing(i, spacing_p[i]); > > >>>>> io->SetOrigin(i, origin_p[i]); > > >>>>> } > > >>>>> io->SetHeaderSize(0); > > >>>>> io->SetByteOrderToLittleEndian(); > > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > > >>>>> io->SetNumberOfComponents(1); > > >>>>> io->SetNumberOfDimensions(3); > > >>>>> > > >>>>> //create a writer and write reconstructed file > > >>>>> itk::ImageFileWriter::Pointer writer; > > >>>>> writer = itk::ImageFileWriter::New(); > > >>>>> writer->SetFileName("D:\\Output.raw"); > > >>>>> writer->SetImageIO(io); > > >>>>> writer->SetInput(feldkamp->GetOutput()); > > >>>>> > > >>>>> try > > >>>>> { > > >>>>> writer->Update(); > > >>>>> } > > >>>>> catch (itk::ExceptionObject & excp) > > >>>>> { > > >>>>> std::cerr << "Error while writing the image " << std::endl; > > >>>>> std::cerr << excp << std::endl; > > >>>>> getchar(); > > >>>>> } > > >>>>> #pragma endregion "WriteVolume" > > >>>>> delete[] angles; > > >>>>> return 0; > > >>>>> } > > >>>>> > > >>>>> > > >>>>> > > >>>>> Thanks & Regards > > >>>>> > > >>>>> Zahid Hasan Ansari > > >>>>> Senior Design Engineer > > >>>>> Mobile No. +91-9738379729 > > >>>>> > > >>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >>>> http://www.panaceamedical.com > > >>>>> Bangalore - India. > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> ----- Original Message ----- > > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > > >> Rit > > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>> > > >>>>> > > >>>>>> Dear Zahid, > > >>>>>> > > >>>>>> I was able to perform a reconstruction from your header and > geometry > > >>>>>> file, using the following command lines: > > >>>>>> > > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > > >>>>>> --phantomscale "128,128,128" --like Output.mhd > > >>>>>> > > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > > >> --hardware > > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > >>>>>> > > >>>>>> The first computes projections through a Shepp & Logan phantom, > with > > >> the > > >>>>>> same size, spacing, origin, etc... as your projections, using your > > >>>>>> geometry file geo.xml. > > >>>>>> > > >>>>>> The second line performs the FDK reconstruction. I had to use both > > the > > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > > (3GB, > > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > > by > > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > > >>>>>> parts, reconstructs them one by one, then assembles the results. > Can > > >> you > > >>>>>> run the same commands and let us know whether you still encounter > the > > >>>>>> crash you mentioned ? If it works, you can use your own projection > > data > > >>>>>> in the second command line instead of "simulatedprojections.mha". > > >>>>>> > > >>>>>> Best, > > >>>>>> > > >>>>>> Cyril > > >>>>>> > > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > >>>>>> > > >>>>>>> Dear Sir, > > >>>>>>> > > >>>>>>> Please find the Header file in the attachment. > > >>>>>>> > > >>>>>>> > > >>>>>>> Thanks & Regards > > >>>>>>> > > >>>>>>> Zahid Hasan Ansari > > >>>>>>> > > >>>>>>> > > >>>>>>> ----- Original Message ----- > > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > Simon > > >>>> Rit > > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>> > > >>>>>>> > > >>>>>>>> Dear Zahid, > > >>>>>>>> > > >>>>>>>> We do not need the projections file, at least not for a first > stage > > >> of > > >>>>>>>> error tracking. We only need the header. > > >>>>>>>> Try the following command line: > > >>>>>>>> > > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > > >>>>>>>> > > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" > file > > is > > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > > >> contains > > >>>>>>>> the pixel values, but at the moment we do not need them. We will > > >> create > > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough > to > > >>>>>>>> track down the error you encounter. > > >>>>>>>> > > >>>>>>>> Looking forward to receiving your file, > > >>>>>>>> Cyril > > >>>>>>>> > > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > > >>>>>>>>> Dear Sir, > > >>>>>>>>> > > >>>>>>>>> The single raw file of the projections is 1.4 GB > > and > > >> we > > >>>> are > > >>>>>> not > > >>>>>>>> able to send this big file to you. Can you please suggest other > > >>>>>> alternatives > > >>>>>>>> for this? > > >>>>>>>>> Or can you provide us the PC configuration to > solve > > >> the > > >>>>>> issue? > > >>>>>>>>> Let me know if any other clarification is > required. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> Thanks & Regards > > >>>>>>>>> > > >>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> ----- Original Message ----- > > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > >> Simon > > >>>>>> Rit > > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>>> Hello Zahid, > > >>>>>>>>>> > > >>>>>>>>>> We will need the header of your projections file, too (It is > best > > >> if > > >>>>>> you > > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > > file, > > >> so > > >>>>>> it > > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > > >>>>>>>>>> > > >>>>>>>>>> Regards, > > >>>>>>>>>> Cyril > > >>>>>>>>>> > > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>> Dear Cyril Mory, > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> I have only used RTK version 1.3.0. but > in > > the > > >>>> error > > >>>>>>>>>> message it is showing RTK version 1.2.0. > > >>>>>>>>>>> Please find the attachment of the > geometry > > >> file > > >>>> of > > >>>>>> our > > >>>>>>>>>> projections. > > >>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>> > > >>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com], > > >>>> Simon > > >>>>>>>> Rit > > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, > saimahesh.m at panaceamedical.com > > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>> > > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > > >>>> source > > >>>>>> of > > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > > >>>>>> therefore > > >>>>>>>>>>>> yourself): > > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > > changes > > >> in > > >>>>>> the > > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so > your > > >>>>>> problem > > >>>>>>>>>>>> might disappear just by upgrading to the new version > > >>>>>>>>>>>> - create a small example that reproduces your problem. You > can, > > >> for > > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > > >> logan > > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look > at > > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > > an > > >>>>>>>>>>>> example). And send us the script > > >>>>>>>>>>>> - OR send us your geometry file and the header of your > > >> projections > > >>>>>> file > > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > > >>>>>> zero-filled > > >>>>>>>>>>>> stack of projections), and the command line that crashes > > >>>>>>>>>>>> > > >>>>>>>>>>>> Best regards, > > >>>>>>>>>>>> Cyril > > >>>>>>>>>>>> > > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>>>> Dear Simon Rit, > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Please find the screen shot in the > > >> attachment. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > > : > > >>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>>>> To: Zahid Hasan Ansari > > [mailto:zahidhasan.a at panaceamedical.com] > > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > > >>>>>>>> [mailto:rtk-users at public.kitware.com], > > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is > a > > >> CUDA > > >>>>>>>>>> memory > > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > > >> first > > >>>>>> make > > >>>>>>>>>>>> sure > > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > > >> images. > > >>>>>> If > > >>>>>>>> it > > >>>>>>>>>>>> is > > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > > --divisions. > > >>>> The > > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > > use > > >>>> of > > >>>>>>>> RTK > > >>>>>>>>>> on > > >>>>>>>>>>>>>> our case studies webpage > > >>>>>>>>>>>> . > > >>>>>>>>>>>>>> Simon > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Dear Sir\Madam, > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > > >>>>>> reconstruction > > >>>>>>>>>> using > > >>>>>>>>>>>> RTK > > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > > screen > > >>>>>> shoot > > >>>>>>>> of > > >>>>>>>>>>>>>>> the > > >>>>>>>>>>>>>>>> same. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am using the following items > given > > >> below. > > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > > console > > >>>>>>>> application > > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > > >>>>>>>>>>>>>>>> 5. CUDA 7. > > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Please provide the solution of this > > and > > >> let > > >>>> me > > >>>>>>>> know > > >>>>>>>>>> if > > >>>>>>>>>>>>>> any > > >>>>>>>>>>>>>>>> other clarification is required. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, > > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 > | > > >> Url > > >>>> : > > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>>>> > ____________________________________________________________ > > >>>>>>>>>>>>>>> ________________ > > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> This email and any files transmitted with it are > > confidential > > >>>> and > > >>>>>>>>>>>> intended > > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom > they > > >> are > > >>>>>>>>>>>> addressed. > > >>>>>>>>>>>>>>> If you have received this email in error please notify the > > >>>> system > > >>>>>>>>>>>> manager. > > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > > email > > >>>> are > > >>>>>>>>>>>> solely > > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > > of > > >>>> the > > >>>>>>>>>>>> company. > > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > > >>>> attachments > > >>>>>>>> for > > >>>>>>>>>>>> the > > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > > any > > >>>>>> damage > > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> This email and any files transmitted with it are > confidential > > >> and > > >>>>>>>>>> intended > > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > > are > > >>>>>>>>>> addressed. > > >>>>>>>>>>>>> If you have received this email in error please notify the > > >> system > > >>>>>>>>>> manager. > > >>>>>>>>>>>>> Please note that any views or opinions presented in this > email > > >> are > > >>>>>>>>>> solely > > >>>>>>>>>>>>> those of the author and do not necessarily represent those > of > > >> the > > >>>>>>>>>> company. > > >>>>>>>>>>>>> Finally, the recipient should check this email and any > > >> attachments > > >>>>>> for > > >>>>>>>>>> the > > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > > >>>> damage > > >>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>> ________________________________________ > > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > Area > > >>>>>> Phase > > >>>>>>>> 1, > > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > Industrial > > >>>>>> Area, > > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>> > > >>>>>>>>>>> This email and any files transmitted with it are confidential > > and > > >>>>>>>> intended > > >>>>>>>>>>> solely for the use of the individual or entity to whom they > are > > >>>>>>>> addressed. > > >>>>>>>>>>> If you have received this email in error please notify the > > system > > >>>>>>>> manager. > > >>>>>>>>>>> Please note that any views or opinions presented in this email > > are > > >>>>>>>> solely > > >>>>>>>>>>> those of the author and do not necessarily represent those of > > the > > >>>>>>>> company. > > >>>>>>>>>>> Finally, the recipient should check this email and any > > attachments > > >>>> for > > >>>>>>>> the > > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > > >> damage > > >>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>> > > >>>>>>>>> ________________________________________ > > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > > >>>> Phase > > >>>>>> 1, > > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > > >>>> Area, > > >>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>> > > >>>>>>>>> This email and any files transmitted with it are confidential > and > > >>>>>> intended > > >>>>>>>>> solely for the use of the individual or entity to whom they are > > >>>>>> addressed. > > >>>>>>>>> If you have received this email in error please notify the > system > > >>>>>> manager. > > >>>>>>>>> Please note that any views or opinions presented in this email > are > > >>>>>> solely > > >>>>>>>>> those of the author and do not necessarily represent those of > the > > >>>>>> company. > > >>>>>>>>> Finally, the recipient should check this email and any > attachments > > >> for > > >>>>>> the > > >>>>>>>>> presence of viruses. The company accepts no liability for any > > damage > > >>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>> ________________________________________ > > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > >> Phase > > >>>> 1, > > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > >> Area, > > >>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>> Fax : + 91 80 42428710 > > >>>>>>> Url : http://www.panaceamedical.com > > >>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>> > > >>>>>>> This email and any files transmitted with it are confidential and > > >>>> intended > > >>>>>>> solely for the use of the individual or entity to whom they are > > >>>> addressed. > > >>>>>>> If you have received this email in error please notify the system > > >>>> manager. > > >>>>>>> Please note that any views or opinions presented in this email are > > >>>> solely > > >>>>>>> those of the author and do not necessarily represent those of the > > >>>> company. > > >>>>>>> Finally, the recipient should check this email and any attachments > > for > > >>>> the > > >>>>>>> presence of viruses. The company accepts no liability for any > damage > > >>>>>>> caused by any virus transmitted by this email. > > >>>>>>> > > >>>>> ________________________________________ > > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>> Fax : + 91 80 42428710 > > >>>>> Url : http://www.panaceamedical.com > > >>>>> > > >> > > > ____________________________________________________________________________ > > >>>>> PMT EMAIL DISCLAIMER: > > >>>>> > > >>>>> This email and any files transmitted with it are confidential and > > >> intended > > >>>>> solely for the use of the individual or entity to whom they are > > >> addressed. > > >>>>> If you have received this email in error please notify the system > > >> manager. > > >>>>> Please note that any views or opinions presented in this email are > > >> solely > > >>>>> those of the author and do not necessarily represent those of the > > >> company. > > >>>>> Finally, the recipient should check this email and any attachments > for > > >> the > > >>>>> presence of viruses. The company accepts no liability for any damage > > >>>>> caused by any virus transmitted by this email. > > >>>>> > > >>>>> > > >>>>> > > >>>> > > >>> ________________________________________ > > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 > > >>> Fax : + 91 80 42428710 > > >>> Url : http://www.panaceamedical.com > > >>> > > >> > > > ____________________________________________________________________________ > > >>> PMT EMAIL DISCLAIMER: > > >>> > > >>> This email and any files transmitted with it are confidential and > > intended > > >>> solely for the use of the individual or entity to whom they are > > addressed. > > >>> If you have received this email in error please notify the system > > manager. > > >>> Please note that any views or opinions presented in this email are > > solely > > >>> those of the author and do not necessarily represent those of the > > company. > > >>> Finally, the recipient should check this email and any attachments for > > the > > >>> presence of viruses. The company accepts no liability for any damage > > >>> caused by any virus transmitted by this email. > > >>> > > >>> > > >>> > > >>> > > >>> > > >> > > >> > > > > > > ________________________________________ > > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > > Malur - 563130. Kolar District. INDIA. > > > > > > Tel : +91 80 4242 8700 / 2845 4785 > > > Fax : + 91 80 42428710 > > > Url : http://www.panaceamedical.com > > > > > > ____________________________________________________________________________ > > > PMT EMAIL DISCLAIMER: > > > > > > This email and any files transmitted with it are confidential and > intended > > > solely for the use of the individual or entity to whom they are > addressed. > > > If you have received this email in error please notify the system > manager. > > > Please note that any views or opinions presented in this email are > solely > > > those of the author and do not necessarily represent those of the > company. > > > Finally, the recipient should check this email and any attachments for > the > > > presence of viruses. The company accepts no liability for any damage > > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: ScatterGlareError.png Type: image/png Size: 121487 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 3 10:28:49 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 3 Nov 2016 15:28:49 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> References: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Message-ID: Hi, I think you should look at the applications before posting a question on the mailing list. There is a rtkscatterglarecorrection tool, look at rtkscatterglarecorrection.cxx. You must init the coefficients. I'll add a check to make the error message more readable but please, take the time to look at all the examples available in applications before posting a question. Thanks, Simon On Thu, Nov 3, 2016 at 3:21 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > > We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. > > The RTKScatterGlareCorrectionImageFilter code is given below. > > //rtkLagCorrectionImageFilter > typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; > LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); > LagCorrection->SetInput(Projections); > > //rtkScatterGlareCorrectionImageFilter > typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; > ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); > ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); > > > > > > Thanks & Regards > > Zahid Hasan Ansari > > > > ----- Original Message ----- > From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Cyril Mory, >> >> >> Thank you for your help. We are able to reconstruct 1024 >> volume now. >> >> But the reconstruction time is around 4 minutes. Can you >> please help us to reduce the reconstruction time? >> >> We are using NVIDIA TITAN X GPU which has 12 GB memory. >> >> >> Thanks & Regards >> >> Zahid Hasan Ansari >> >> >> >> >> ----- Original Message ----- >> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> >> >> > Dear Zahid, >> > >> > The output looks correct. >> > >> > If the command line solution I suggested in a previous email works, the >> > best way to move forward would be to compare your code and that of >> > rtkfdk.cxx, and where it differs, make sure you have not introduced an >> > error. >> > >> > Cyril >> > >> > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: >> > > Dear Cyril Mory, >> > > >> > > I have done the same but the Output.mhd file is still 0 >> > KB for 1024 volume. Please find the attachment of the status of the output >> > displayed. >> > > >> > > Please suggest us for further process. >> > > >> > > >> > > Thanks & Regards >> > > >> > > Zahid Hasan Ansari >> > > >> > > >> > > >> > > >> > > ----- Original Message ----- >> > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >> > [mailto:simon.rit at creatis.insa-lyon.fr] >> > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > > >> > > >> > >> I see two errors: >> > >> >> > >> Remove this line >> > >> >> > >> writer->SetNumberOfStreamDivisions(4); >> > >> >> > >> since only the streaming filter, not the write filter, needs to know >> > >> about the number of divisions. >> > >> And change the filename to >> > >> >> > >> "D:\\Output.mhd" >> > >> >> > >> It will write both the .mhd and the .raw files. >> > >> >> > >> I hope it helps, >> > >> Cyril >> > >> >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >> > >>> Dear Cyril Mory, >> > >>> >> > >>> I have modified my file writer code and used >> > >> StreamingImageFilter. Now its not giving any error message but the >> final >> > >> output is 0 byte for 1024 volume. It working fine for 512 volume. >> > >>> Please check my modified file writer code given >> below. >> > >>> >> > >>> // Streaming depending on streaming capability of writer >> > >>> typedef itk::StreamingImageFilter >> > >> StreamerType; >> > >>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>> streamerBP->SetInput(feldkamp->GetOutput()); >> > >>> streamerBP->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> //create a writer and write reconstructed file >> > >>> itk::ImageFileWriter::Pointer writer; >> > >>> writer = itk::ImageFileWriter::New(); >> > >>> writer->SetFileName("D:\\Output.raw"); >> > >>> writer->SetImageIO(io); >> > >>> writer->SetInput(streamerBP->GetOutput()); >> > >>> writer->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> >> > >>> Please let me know if any clarification is required. >> > >>> >> > >>> >> > >>> Thanks & Regards >> > >>> >> > >>> Zahid Hasan Ansari >> > >>> Senior Design Engineer >> > >>> Mobile No. +91-9738379729 >> > >>> >> > >>> Panacea Medical Technologies Pvt. Ltd. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >> http://www.panaceamedical.com >> > >>> Bangalore - India. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> ----- Original Message ----- >> > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> > Rit >> > >> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>> >> > >>> >> > >>>> Dear Zahid, >> > >>>> >> > >>>> The --divisions is an option of the command-line application rtkfdk. >> It >> > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >> > >>>> rather, it is passed to a streaming filter at the end of the >> pipeline. >> > >>>> Look for the following bit of code in rtkfdk.cxx : >> > >>>> >> > >>>> // Streaming depending on streaming capability of writer >> > >>>> typedef itk::StreamingImageFilter> > >>>> CPUOutputImageType> StreamerType; >> > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>>> streamerBP->SetInput( pfeldkamp ); >> > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg >> ); >> > >>>> >> > >>>> You can find information on how a streaming filter works on this >> page: >> > >>>> >> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> > >>>> >> > >>>> I hope it helps, >> > >>>> >> > >>>> Cyril >> > >>>> >> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >> > >>>>> Dear Cyril Mory, >> > >>>>> >> > >>>>> I have tried but I am not getting where to give >> > >>>> --division 4 in my code. >> > >>>>> Please find my code given below and please let me >> > know >> > >>>> where I need to change in my code to make it work. >> > >>>>> int _tmain(int argc, _TCHAR* argv[]) >> > >>>>> { >> > >>>>> #pragma region "Variable declaration" >> > >>>>> const double PI = 3.14159265358979323846; >> > >>>>> float *angles; >> > >>>>> int nProj = 349; >> > >>>>> typedef unsigned short pixelType; >> > >>>>> typedef float OutpixelType; >> > >>>>> const int dimension = 3; >> > >>>>> typedef itk::Image imageType; >> > >>>>> typedef itk::ImageRegionConstIterator >> ImageIteratorType; >> > >>>>> imageType::Pointer Projections = imageType::New(); >> > >>>>> >> > >>>>> #pragma endregion "Variable declaration" >> > >>>>> >> > >>>>> Projections = >> > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> > >> nProj); >> > >>>>> imageType::SpacingType pSpacing; >> > >>>>> pSpacing[0] = 0.2960; >> > >>>>> pSpacing[1] = 0.2960; >> > >>>>> pSpacing[2] = 0.2960; >> > >>>>> Projections->SetSpacing(pSpacing); >> > >>>>> >> > >>>>> imageType::PointType pOrigin; >> > >>>>> pOrigin[0] = -212.972; >> > >>>>> pOrigin[1] = -212.972; >> > >>>>> pOrigin[2] = -212.972; //-158.50; >> > >>>>> Projections->SetOrigin(pOrigin); >> > >>>>> >> > >>>>> Projections->Update(); >> > >>>>> >> > >>>>> //Read angles. >> > >>>>> char *angles_file = >> "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >> > >>>>> angles = new float[nProj]; >> > >>>>> angles = readAngles(angles_file, angles); >> > >>>>> >> > >>>>> #pragma region"Geometry" >> > >>>>> // Geometry object >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> > >>>>> GeometryType::Pointer geometry = GeometryType::New(); >> > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >> > >>>>> { >> > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, >> 0, >> > >> 0); >> > >>>> // 136 half fan //2.07 Kidwai // >> > >>>>> } >> > >>>>> >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> > >>>> GeometryWriterType; >> > >>>>> GeometryWriterType::Pointer geometryWriter = >> > GeometryWriterType::New(); >> > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >> > >>>>> geometryWriter->SetObject(geometry); >> > >>>>> geometryWriter->WriteFile(); >> > >>>>> geometry->Update(); >> > >>>>> #pragma endregion "Geometry" >> > >>>>> >> > >>>>> //Define output image type >> > >>>>> >> > >>>>> #ifdef USE_CUDA >> > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > >> PSSFType; >> > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> > >>>>> #else >> > >>>>> typedef itk::Image OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter >> PSSFType; >> > >>>>> typedef rtk::FDKConeBeamReconstructionFilter >> > FDKType; >> > >>>>> #endif >> > >>>>> >> > >>>>> //ScatterCorrection >> > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter> > imageType >> > >>>> BoellaardScatterCorrectionImageFilterType; >> > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer >> ScatterCorrection >> > = >> > >>>> BoellaardScatterCorrectionImageFilterType::New(); >> > >>>>> ScatterCorrection->SetInput(Projections); >> > >>>>> >> > >>>>> //VarianObiRawImageFilter >> > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> > >>>> RawImageFilterType; >> > >>>>> RawImageFilterType::Pointer AttenuationFilter = >> > >>>> RawImageFilterType::New(); >> > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >> > >>>>> >> > >>>>> //Create the output image >> > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >> > >>>> ConstantImageSourceType; >> > >>>>> ConstantImageSourceType::PointType origin_p; >> > >>>>> ConstantImageSourceType::SizeType size_p; >> > >>>>> ConstantImageSourceType::SpacingType spacing_p; >> > >>>>> ConstantImageSourceType::Pointer projectionsSource = >> > >>>> ConstantImageSourceType::New(); >> > >>>>> origin_p[0] = -127.5; >> > >>>>> origin_p[1] = -127.5; >> > >>>>> origin_p[2] = -127.5; >> > >>>>> size_p[0] = 512; >> > >>>>> size_p[1] = 512; >> > >>>>> size_p[2] = 512; >> > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >> > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >> > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >> > >>>>> >> > >>>>> projectionsSource->SetOrigin(origin_p); >> > >>>>> projectionsSource->SetSpacing(spacing_p); >> > >>>>> projectionsSource->SetSize(size_p); >> > >>>>> projectionsSource->SetConstant(0); >> > >>>>> >> > >>>>> // Short scan image filter >> > >>>>> PSSFType::Pointer pssf = PSSFType::New(); >> > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >> > >>>>> pssf->SetGeometry(geometry); >> > >>>>> pssf->InPlaceOff(); >> > >>>>> std::cout << "short scan image filter success" << std::endl; >> > >>>>> >> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); >> > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >> > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >> > >>>>> feldkamp->SetGeometry(geometry); >> > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >> > >>>>> feldkamp->SetGPUEnabled(1); >> > >>>>> feldkamp->SetNumberOfThreads(10000); >> > >>>>> >> > >>>>> #pragma region "Write volume" >> > >>>>> >> > >>>>> //Create a raw io for writing >> > >>>>> >> > >>>>> itk::RawImageIO::Pointer io; >> > >>>>> io = itk::RawImageIO::New(); >> > >>>>> >> > >>>>> for (unsigned int i = 0; i < dimension; i++) >> > >>>>> { >> > >>>>> io->SetDimensions(i, size_p[i]); >> > >>>>> io->SetSpacing(i, spacing_p[i]); >> > >>>>> io->SetOrigin(i, origin_p[i]); >> > >>>>> } >> > >>>>> io->SetHeaderSize(0); >> > >>>>> io->SetByteOrderToLittleEndian(); >> > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >> > >>>>> io->SetNumberOfComponents(1); >> > >>>>> io->SetNumberOfDimensions(3); >> > >>>>> >> > >>>>> //create a writer and write reconstructed file >> > >>>>> itk::ImageFileWriter::Pointer writer; >> > >>>>> writer = itk::ImageFileWriter::New(); >> > >>>>> writer->SetFileName("D:\\Output.raw"); >> > >>>>> writer->SetImageIO(io); >> > >>>>> writer->SetInput(feldkamp->GetOutput()); >> > >>>>> >> > >>>>> try >> > >>>>> { >> > >>>>> writer->Update(); >> > >>>>> } >> > >>>>> catch (itk::ExceptionObject & excp) >> > >>>>> { >> > >>>>> std::cerr << "Error while writing the image " << std::endl; >> > >>>>> std::cerr << excp << std::endl; >> > >>>>> getchar(); >> > >>>>> } >> > >>>>> #pragma endregion "WriteVolume" >> > >>>>> delete[] angles; >> > >>>>> return 0; >> > >>>>> } >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> Thanks & Regards >> > >>>>> >> > >>>>> Zahid Hasan Ansari >> > >>>>> Senior Design Engineer >> > >>>>> Mobile No. +91-9738379729 >> > >>>>> >> > >>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >>>> http://www.panaceamedical.com >> > >>>>> Bangalore - India. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> ----- Original Message ----- >> > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >> > >> Rit >> > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>> >> > >>>>> >> > >>>>>> Dear Zahid, >> > >>>>>> >> > >>>>>> I was able to perform a reconstruction from your header and >> geometry >> > >>>>>> file, using the following command lines: >> > >>>>>> >> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> > >>>>>> --phantomscale "128,128,128" --like Output.mhd >> > >>>>>> >> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> > >> --hardware >> > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> > >>>>>> >> > >>>>>> The first computes projections through a Shepp & Logan phantom, >> with >> > >> the >> > >>>>>> same size, spacing, origin, etc... as your projections, using your >> > >>>>>> geometry file geo.xml. >> > >>>>>> >> > >>>>>> The second line performs the FDK reconstruction. I had to use both >> > the >> > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory >> > (3GB, >> > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory >> > by >> > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> > >>>>>> parts, reconstructs them one by one, then assembles the results. >> Can >> > >> you >> > >>>>>> run the same commands and let us know whether you still encounter >> the >> > >>>>>> crash you mentioned ? If it works, you can use your own projection >> > data >> > >>>>>> in the second command line instead of "simulatedprojections.mha". >> > >>>>>> >> > >>>>>> Best, >> > >>>>>> >> > >>>>>> Cyril >> > >>>>>> >> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> > >>>>>> >> > >>>>>>> Dear Sir, >> > >>>>>>> >> > >>>>>>> Please find the Header file in the attachment. >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> Thanks & Regards >> > >>>>>>> >> > >>>>>>> Zahid Hasan Ansari >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> ----- Original Message ----- >> > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > Simon >> > >>>> Rit >> > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>> >> > >>>>>>> >> > >>>>>>>> Dear Zahid, >> > >>>>>>>> >> > >>>>>>>> We do not need the projections file, at least not for a first >> stage >> > >> of >> > >>>>>>>> error tracking. We only need the header. >> > >>>>>>>> Try the following command line: >> > >>>>>>>> >> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >> > >>>>>>>> >> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" >> file >> > is >> > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> > >> contains >> > >>>>>>>> the pixel values, but at the moment we do not need them. We will >> > >> create >> > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough >> to >> > >>>>>>>> track down the error you encounter. >> > >>>>>>>> >> > >>>>>>>> Looking forward to receiving your file, >> > >>>>>>>> Cyril >> > >>>>>>>> >> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >> > >>>>>>>>> Dear Sir, >> > >>>>>>>>> >> > >>>>>>>>> The single raw file of the projections is 1.4 GB >> > and >> > >> we >> > >>>> are >> > >>>>>> not >> > >>>>>>>> able to send this big file to you. Can you please suggest other >> > >>>>>> alternatives >> > >>>>>>>> for this? >> > >>>>>>>>> Or can you provide us the PC configuration to >> solve >> > >> the >> > >>>>>> issue? >> > >>>>>>>>> Let me know if any other clarification is >> required. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> Thanks & Regards >> > >>>>>>>>> >> > >>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> ----- Original Message ----- >> > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > >> Simon >> > >>>>>> Rit >> > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>>> Hello Zahid, >> > >>>>>>>>>> >> > >>>>>>>>>> We will need the header of your projections file, too (It is >> best >> > >> if >> > >>>>>> you >> > >>>>>>>>>> have all your projections as a single .mhd and a single .raw >> > file, >> > >> so >> > >>>>>> it >> > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >> > >>>>>>>>>> >> > >>>>>>>>>> Regards, >> > >>>>>>>>>> Cyril >> > >>>>>>>>>> >> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>> Dear Cyril Mory, >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> I have only used RTK version 1.3.0. but >> in >> > the >> > >>>> error >> > >>>>>>>>>> message it is showing RTK version 1.2.0. >> > >>>>>>>>>>> Please find the attachment of the >> geometry >> > >> file >> > >>>> of >> > >>>>>> our >> > >>>>>>>>>> projections. >> > >>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>> >> > >>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>>>> To: Zahid Hasan Ansari >> [mailto:zahidhasan.a at panaceamedical.com], >> > >>>> Simon >> > >>>>>>>> Rit >> > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, >> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the >> > >>>> source >> > >>>>>> of >> > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >> > >>>>>> therefore >> > >>>>>>>>>>>> yourself): >> > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable >> > changes >> > >> in >> > >>>>>> the >> > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so >> your >> > >>>>>> problem >> > >>>>>>>>>>>> might disappear just by upgrading to the new version >> > >>>>>>>>>>>> - create a small example that reproduces your problem. You >> can, >> > >> for >> > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> > >> logan >> > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look >> at >> > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need >> > an >> > >>>>>>>>>>>> example). And send us the script >> > >>>>>>>>>>>> - OR send us your geometry file and the header of your >> > >> projections >> > >>>>>> file >> > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >> > >>>>>> zero-filled >> > >>>>>>>>>>>> stack of projections), and the command line that crashes >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Best regards, >> > >>>>>>>>>>>> Cyril >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>>>> Dear Simon Rit, >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Please find the screen shot in the >> > >> attachment. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >> > : >> > >>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>>>> To: Zahid Hasan Ansari >> > [mailto:zahidhasan.a at panaceamedical.com] >> > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >> > >>>>>>>> [mailto:rtk-users at public.kitware.com], >> > >>>>>>>>>>>> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is >> a >> > >> CUDA >> > >>>>>>>>>> memory >> > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> > >> first >> > >>>>>> make >> > >>>>>>>>>>>> sure >> > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> > >> images. >> > >>>>>> If >> > >>>>>>>> it >> > >>>>>>>>>>>> is >> > >>>>>>>>>>>>>> no sufficient, you can split your volume using the >> > --divisions. >> > >>>> The >> > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >> > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the >> > use >> > >>>> of >> > >>>>>>>> RTK >> > >>>>>>>>>> on >> > >>>>>>>>>>>>>> our case studies webpage >> > >>>>>>>>>>>> . >> > >>>>>>>>>>>>>> Simon >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >> > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Dear Sir\Madam, >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >> > >>>>>> reconstruction >> > >>>>>>>>>> using >> > >>>>>>>>>>>> RTK >> > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the >> > screen >> > >>>>>> shoot >> > >>>>>>>> of >> > >>>>>>>>>>>>>>> the >> > >>>>>>>>>>>>>>>> same. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am using the following items >> given >> > >> below. >> > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >> > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >> > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit >> > console >> > >>>>>>>> application >> > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >> > >>>>>>>>>>>>>>>> 5. CUDA 7. >> > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >> > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Please provide the solution of this >> > and >> > >> let >> > >>>> me >> > >>>>>>>> know >> > >>>>>>>>>> if >> > >>>>>>>>>>>>>> any >> > >>>>>>>>>>>>>>>> other clarification is required. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> > EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, >> > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 >> | >> > >> Url >> > >>>> : >> > >>>>>>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>>>> >> ____________________________________________________________ >> > >>>>>>>>>>>>>>> ________________ >> > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> This email and any files transmitted with it are >> > confidential >> > >>>> and >> > >>>>>>>>>>>> intended >> > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom >> they >> > >> are >> > >>>>>>>>>>>> addressed. >> > >>>>>>>>>>>>>>> If you have received this email in error please notify the >> > >>>> system >> > >>>>>>>>>>>> manager. >> > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this >> > email >> > >>>> are >> > >>>>>>>>>>>> solely >> > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those >> > of >> > >>>> the >> > >>>>>>>>>>>> company. >> > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >>>> attachments >> > >>>>>>>> for >> > >>>>>>>>>>>> the >> > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> > any >> > >>>>>> damage >> > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> This email and any files transmitted with it are >> confidential >> > >> and >> > >>>>>>>>>> intended >> > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> > are >> > >>>>>>>>>> addressed. >> > >>>>>>>>>>>>> If you have received this email in error please notify the >> > >> system >> > >>>>>>>>>> manager. >> > >>>>>>>>>>>>> Please note that any views or opinions presented in this >> email >> > >> are >> > >>>>>>>>>> solely >> > >>>>>>>>>>>>> those of the author and do not necessarily represent those >> of >> > >> the >> > >>>>>>>>>> company. >> > >>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >> attachments >> > >>>>>> for >> > >>>>>>>>>> the >> > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> any >> > >>>> damage >> > >>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > Area >> > >>>>>> Phase >> > >>>>>>>> 1, >> > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > Industrial >> > >>>>>> Area, >> > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>> >> > >>>>>>>>>>> This email and any files transmitted with it are confidential >> > and >> > >>>>>>>> intended >> > >>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >> > >>>>>>>> addressed. >> > >>>>>>>>>>> If you have received this email in error please notify the >> > system >> > >>>>>>>> manager. >> > >>>>>>>>>>> Please note that any views or opinions presented in this email >> > are >> > >>>>>>>> solely >> > >>>>>>>>>>> those of the author and do not necessarily represent those of >> > the >> > >>>>>>>> company. >> > >>>>>>>>>>> Finally, the recipient should check this email and any >> > attachments >> > >>>> for >> > >>>>>>>> the >> > >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> > >> damage >> > >>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>> >> > >>>>>>>>> ________________________________________ >> > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >> > >>>> Phase >> > >>>>>> 1, >> > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >> > >>>> Area, >> > >>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>> >> > >>>>>>>>> This email and any files transmitted with it are confidential >> and >> > >>>>>> intended >> > >>>>>>>>> solely for the use of the individual or entity to whom they are >> > >>>>>> addressed. >> > >>>>>>>>> If you have received this email in error please notify the >> system >> > >>>>>> manager. >> > >>>>>>>>> Please note that any views or opinions presented in this email >> are >> > >>>>>> solely >> > >>>>>>>>> those of the author and do not necessarily represent those of >> the >> > >>>>>> company. >> > >>>>>>>>> Finally, the recipient should check this email and any >> attachments >> > >> for >> > >>>>>> the >> > >>>>>>>>> presence of viruses. The company accepts no liability for any >> > damage >> > >>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>> ________________________________________ >> > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > >> Phase >> > >>>> 1, >> > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > >> Area, >> > >>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>> Fax : + 91 80 42428710 >> > >>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>> >> > >>>>>>> This email and any files transmitted with it are confidential and >> > >>>> intended >> > >>>>>>> solely for the use of the individual or entity to whom they are >> > >>>> addressed. >> > >>>>>>> If you have received this email in error please notify the system >> > >>>> manager. >> > >>>>>>> Please note that any views or opinions presented in this email are >> > >>>> solely >> > >>>>>>> those of the author and do not necessarily represent those of the >> > >>>> company. >> > >>>>>>> Finally, the recipient should check this email and any attachments >> > for >> > >>>> the >> > >>>>>>> presence of viruses. The company accepts no liability for any >> damage >> > >>>>>>> caused by any virus transmitted by this email. >> > >>>>>>> >> > >>>>> ________________________________________ >> > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>> Fax : + 91 80 42428710 >> > >>>>> Url : http://www.panaceamedical.com >> > >>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>> PMT EMAIL DISCLAIMER: >> > >>>>> >> > >>>>> This email and any files transmitted with it are confidential and >> > >> intended >> > >>>>> solely for the use of the individual or entity to whom they are >> > >> addressed. >> > >>>>> If you have received this email in error please notify the system >> > >> manager. >> > >>>>> Please note that any views or opinions presented in this email are >> > >> solely >> > >>>>> those of the author and do not necessarily represent those of the >> > >> company. >> > >>>>> Finally, the recipient should check this email and any attachments >> for >> > >> the >> > >>>>> presence of viruses. The company accepts no liability for any damage >> > >>>>> caused by any virus transmitted by this email. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>> >> > >>> ________________________________________ >> > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>> Fax : + 91 80 42428710 >> > >>> Url : http://www.panaceamedical.com >> > >>> >> > >> >> > >> ____________________________________________________________________________ >> > >>> PMT EMAIL DISCLAIMER: >> > >>> >> > >>> This email and any files transmitted with it are confidential and >> > intended >> > >>> solely for the use of the individual or entity to whom they are >> > addressed. >> > >>> If you have received this email in error please notify the system >> > manager. >> > >>> Please note that any views or opinions presented in this email are >> > solely >> > >>> those of the author and do not necessarily represent those of the >> > company. >> > >>> Finally, the recipient should check this email and any attachments for >> > the >> > >>> presence of viruses. The company accepts no liability for any damage >> > >>> caused by any virus transmitted by this email. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > >> >> > >> >> > > >> > > ________________________________________ >> > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >> > Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> > Malur - 563130. Kolar District. INDIA. >> > > >> > > Tel : +91 80 4242 8700 / 2845 4785 >> > > Fax : + 91 80 42428710 >> > > Url : http://www.panaceamedical.com >> > > >> > >> ____________________________________________________________________________ >> > > PMT EMAIL DISCLAIMER: >> > > >> > > This email and any files transmitted with it are confidential and >> intended >> > > solely for the use of the individual or entity to whom they are >> addressed. >> > > If you have received this email in error please notify the system >> manager. >> > > Please note that any views or opinions presented in this email are >> solely >> > > those of the author and do not necessarily represent those of the >> company. >> > > Finally, the recipient should check this email and any attachments for >> the >> > > presence of viruses. The company accepts no liability for any damage >> > > caused by any virus transmitted by this email. >> > > >> > >> > >> > > > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Thu Nov 3 16:10:31 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 20:10:31 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Message-ID: <1775591917.651990.1478203831679@mail.yahoo.com> OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right?About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question:I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards,Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Fri Nov 4 02:31:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 4 Nov 2016 07:31:18 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1775591917.651990.1478203831679@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> Message-ID: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: > OK. good. Thank Cyril to clarify it to me. To implement the Newton's > methods instead of multiplication of R with R^T, we need the > multiplication of Jacobian/Sensitivity (R here) matrix with vector > variable (here x) and the gradient vector (here multiplication of R > with -r). I think it is possible to implement the Newton optimization > methods with the current modules as I think we could extract the R and > f dot product and R and r dot product. Am I right? > About the displayed algorithms, I think the gradient vector is dot > product of matrix A (Jacobian) with the minus residual vector (-r). > > One more question: > I already developed my codes in python. Do you think it is easy to > wrap your modules in python? I don't have experience in these subject. > > Regards, > Vahid > > > On Thursday, November 3, 2016 2:23 AM, Cyril Mory > wrote: > > > Hello Vahid, > Thank you for this insight on Newton's methods. Yes, the output of the > backprojection filter, in SART, is the gradient of the cost function. > You may have noticed that the pipeline performs a division of the > forward projection by something coming from > "RayBoxIntersectionFilter". This is to normalize the forward > projection, so that R^T R f ~= blurry f. If you don't do it, you'll > have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, > and your algorithm will quickly diverge. > You could try to extract the gradient from the conjugate gradient > filter as well, but it is significantly more tricky: first, the CG > filter was implemented from the following algorithm, taken from > wikipedia (which embeds the normalization I was mentioning earlier): > In this algorithm, it is not clear to me what exactly is the gradient > of the cost function. I would say it is something like "- r_k", but > I'm not sure. Second, as you see, the CG filter needs an operator A, > which may differ from one problem to another, so this operator is > implemented in a separate filter, which in your case would be > rtkReconstructionConjugateGradientOperator, with the laplacian > regularization parameter gamma set to 0. > Note that we never actually store the system matrix R. Instead, the > interpolation coefficient it contains are re-computed on the fly > everytime we forward project. And the same holds for backprojection, > i.e the matrix R^T. > Best, > Cyril > > On 11/03/2016 03:38 AM, vahid ettehadi wrote: >> Hello Simon and Cyril, >> Thanks for the reply. >> You are right Simon. I did not notice it too in the literature. The >> main problem as you said is the storage. Actually I developed the >> conjugate gradient (CG), quasi-Newton and Newton optimization methods >> for optical tomography and I intended to apply them to the CT >> reconstruction as well. I implemented the Newton's methods >> (Gauss-Newton and Levenberg-Marquardt) in a >> Jacobian-Free-Newton-Krylov approaches to avoid the matrix >> multiplication of Jacobians (sensitivity). It means we only need to >> store the Jacobian matrix for the these methods (the matrix R that >> Cyril was mentioned), that is still a big matrix for practical >> problems in CT reconstruction. For the quasi-Newton I adapted an >> L-BFGS algorithm that only need the 3 or 8 last iterations of the >> gradient vector to calculate the Hessian matrix. In my case, the >> L-BFGS and Newton's methods was much faster than the CG as you know >> because of using the second order derivative (hessian matrix). I saw >> in your last paper you implement the conjugate gradient method, so I >> thought it might be easy to extract the gradient vector from CG >> modules and solve the cost function within the quasi-Newton/Newton >> methods. I will look at the codes to see what I can do. >> Thanks again for the reply. >> >> @Cyril: >> Please correct me if I am wrong. you mean the output of >> backProjectionFilter is the gradient of defined cost function? >> >> Regards, >> Vahid >> >> >> On Wednesday, November 2, 2016 2:53 AM, Cyril Mory >> >> wrote: >> >> >> Hi Vahid, >> Welcome to RTK :) >> Indeed, there are several iterative methods already implemented in >> RTK, but none of the filters allows you to easily extract the >> gradient of the least squares function there are minimizing. >> If you need to minimize the classical non-regularized tomographic >> cost function, ie || R f - p ||?, with R the forward projection >> operator, f the volume you are looking for, and p the measured >> projections, my best advice would be to copy some part of the >> pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, >> ie the following part (copy-paste this into webgraphviz.com) >> >> digraph SARTConeBeamReconstructionFilter { >> >> Input0 [ label="Input 0 (Volume)"]; >> Input0 [shape=Mdiamond]; >> Input1 [label="Input 1 (Projections)"]; >> Input1 [shape=Mdiamond]; >> >> node [shape=box]; >> ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref >> rtk::ForwardProjectionImageFilter"]; >> Extract [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref >> itk::MultiplyImageFilter"]; >> AfterExtract [label="", fixedsize="false", width=0, height=0, >> shape=none]; >> Subtract [ label="itk::SubtractImageFilter" URL="\ref >> itk::SubtractImageFilter"]; >> MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" >> URL="\ref itk::MultiplyImageFilter"]; >> Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref >> itk::DivideOrZeroOutImageFilter"]; >> GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" >> URL="\ref itk::MultiplyImageFilter", style=dashed]; >> Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref >> rtk::DisplacedDetectorImageFilter"]; >> ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref >> rtk::RayBoxIntersectionImageFilter"]; >> ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref >> rtk::BackProjectionImageFilter"]; >> OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; >> OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; >> Input0 -> OutofInput0 [arrowhead=none]; >> OutofInput0 -> ForwardProject; >> ConstantVolume -> BeforeBP [arrowhead=none]; >> BeforeBP -> BackProjection; >> Extract -> AfterExtract[arrowhead=none]; >> AfterExtract -> MultiplyByZero; >> AfterExtract -> Subtract; >> MultiplyByZero -> ForwardProject; >> Input1 -> Extract; >> ForwardProject -> Subtract; >> Subtract -> MultiplyByLambda; >> MultiplyByLambda -> Divide; >> Divide -> GatingWeight; >> GatingWeight -> Displaced; >> ConstantProjectionStack -> ExtractConstantProjection; >> ExtractConstantProjection -> RayBox; >> RayBox -> Divide; >> Displaced -> BackProjection; >> BackProjection -> OutofBP [arrowhead=none]; >> } >> >> As you can see, it is a very large part of the SART reconstruction >> filter, so yoiu might be better off just copying the whole >> SARTConeBeamReconstructionFilter and modifying it. >> >> Of course, you could also look into ITK's cost function class, and >> see if one of the classes inherited from it suits your needs, >> implement your cost function this way, and use ITK's off-the-shelf >> solvers to minimize it. See the inheritance diagram in >> https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if >> you want to try this approach. >> >> Best regards, >> Cyril >> >> On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >>> Hello RTK users and developers, >>> >>> I already implemented the RTK and reconstructed some images with the >>> FDK algorithm implemented in RTK. It works well. Thanks to RTK >>> developers. >>> Now, I am trying to develop a model-based image reconstruction for >>> our cone-beam micro-CT. I see already that some iterative algorithms >>> like ART and its modifications and conjugate-gradient (CG) method >>> are implemented in the RTK. I want to develop a model-based >>> reconstruction through the Newton/quasi-Newton optimizations >>> methods. I was wondering is it possible to extract the gradient of >>> least square function from implemented algorithms like CG module? >>> Any recommendation will be appreciated. >>> >>> Best Regards, >>> Vahid >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Fri Nov 4 16:42:08 2016 From: julien.jomier at kitware.com (Julien Jomier) Date: Fri, 4 Nov 2016 21:42:08 +0100 Subject: [Rtk-users] SimpleRTK + Matlab In-Reply-To: References: <06d4327e-9fd4-bf08-565d-5304f577b521@creatis.insa-lyon.fr> Message-ID: <89255846-9a06-a625-45f1-88d140c0013d@kitware.com> Hi Arvid, Sorry for the late reply. We successfully build the latest RTK with ITK 4.11.0 on Visual Studio 2013 with static libraries (BUILD_SHARED_LIBS set to OFF). I have just pushed a fix to SimpleRTK to build as shared libraries. Note that you would need to have ITK built as shared libraries as well. Let us know if you still have any issues, Julien On 23/09/2016 10:29, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi again. > > I've been spending some more time with this, and feel I learned a little > bit more. I have now tested this on several machines with several > compiler versions (more or less all of them) and serveral cmake versions > - all with Windows 7. > > I can actually reproduce the successful build you linked to, but this > can only be done if you do not include any of the language wrappings, > like in the build you linked to. Enable any of them, and the build will > break. (see attachment) > > I suspect it must have been working in the past, but since none of them > are included in your test there have been a breaking change, and none of > them work anymore. > > I am still trying to tweak then projects manually to build SimpleRTK > with some sort of language support, but still without any luck. > > best > > Arvid > > On Tue, Sep 20, 2016 at 4:19 PM, Simon Rit > > > wrote: > > Hi, > Sorry, I won't be able to help but I'd advise to tick on WRAP_PYTHON > only at first in cmake, not the other languages (i.e., tick off > WRAP_LUA). > I can't solve your problem but Kitware is going to look into an > upgrade of SimpleRTK in the coming days, I'll ask them if they know > what is the issue. If you look here: > http://my.cdash.org/viewNotes.php?buildid=1052065 > > this is a nightly build of SimpleRTK on Windows and it seems to > work. I don't see why it wouldn't work for you. > Simon > > On Tue, Sep 20, 2016 at 2:17 PM, Arvid Piehl Lauritsen B?ttiger > > wrote: > > Hi again. > > I understand, but could you please help me get in contact with > the person who knows something about the windows build (if any), > I think there is something wrong. > > I have been investigating the build problems I had and found > that in the sub folder "SimpleRTK-build" there is a solutions > file with SimpleRTK. I opened it up and found the projects which > I had problems building: "SimpleRTKCommon", > "SimpleRTKBasicFilters0", "SimpleRTKBasicFilters1" etc. > > When I then tried to build SimpleRTKCommon manually it just > compiled without any problems. However, when I followed up by > building "SimpleRTKBasicFilters0" it gave me an error which > stated that it couldn't find "SimpleRTKCommon-0.9.lib" - which I > just build. > > After some more investigation I realized that the > SimpleRTKCommon is set to build a dynamic linked library (DLL), > and SimpleRTKBasicFilters0 expects it to be a static linked > library (LIB). After changing SimpleRTKCommon to be build as a > static library - and changing the output location - I could > build SimpleRTKBasicFilters0. > > However, SimpleRTKBasicFilters0 is also build as an DLL, but > changing that to a LIB as well I could build > SimpleRTKBasicFilters1, then SimpleRTKBasicFilters2 and then > SimpleRTKBasicFilters3. You get the point. > > I'm unsure if the intention is to build them as static or > dynamic libraries, but in any case the current build > configuration doesn't work - on my setup at least. > > However, I should note than for some reason the "lua5" project > did build successfully out of the box. Whatever it does > differently works. > > best > > Arvid > > > > On Tue, Sep 20, 2016 at 7:33 AM, Simon Rit > > wrote: > > I'm not an msvc specialist but your first line suggests that > you have pasted only part of the log: > > 20> Done Building Project > "C:\Users\aplb\Work\RTK\RTK1.2-bin-vs13\SimpleRTK-build\ALL_BUILD.vcxproj" > (default targets) -- FAILED. > > What you need to find out is why this build failed. If the > build fails, the linking cannot work. > Cheers, > Simon > > > On 19/09/2016 19:44, Arvid Piehl Lauritsen B?ttiger wrote: >> I did a complete rebuild, and here is the end of the >> output: http://pastebin.com/hvQ33WWg >> >> I have to admit I'm not sure what to make of it. I should >> note that I'm trying to compile the version I just pulled >> from git earlier today, since the other version I normally >> work with is really old. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 6:50 PM, Simon Rit >> > > wrote: >> >> SimpleRTKCommon is a library generated when compiling. >> Don't you have another error before that which >> explains why it did not compile? >> Simon >> >> On Mon, Sep 19, 2016 at 2:30 PM, Arvid Piehl Lauritsen >> B?ttiger > > wrote: >> >> Hi again. >> >> I've been trying to get it working. However, I did >> run into some problems compiling SimpleRTK. The >> main issue seems to be that it depends on >> SimpleRTKCommon - which I do not have. >> >> Here is the last few lines from VS2013 >> >> > 5>LINK : fatal error LNK1181: cannot open input >> file '..\..\..\lib\Debug\SimpleRTKCommon-0.9.lib' >> [C:\Users\aplb\Work\RTK\RTK1.2- >> > >> bin-vs13\SimpleRTK-build\Code\IO\src\SimpleRTKIO.vcxproj] >> > 5> >> > 5> 0 Warning(s) >> > 5> 2 Error(s) >> > 5> >> > 5> Time Elapsed 00:00:25.26 >> > ========== Build: 4 succeeded, 1 failed, 0 >> up-to-date, 0 skipped ========== >> >> I'm not quite sure what is going on, because the >> only reference I can find to SimpleRTKCommon is >> the CMakeLists.txt on github: >> https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/CMakeLists.txt >> >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:19 AM, Simon Rit >> > > wrote: >> >> The latest MacOS. It's nice if you can test it >> on other platforms, I'll try to run it on >> Linux but I have to upgrade matlab first (I >> think python calls are available starting with >> Matlab 2014). >> Simon >> >> On Mon, Sep 19, 2016 at 11:14 AM, Arvid Piehl >> Lauritsen B?ttiger > > wrote: >> >> Dear Simon >> >> This look very interesting! Which platform >> did you successfully execute this on? >> I will give it a try at once (on windows) >> and let you know if I run into any problems. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:05 AM, Simon >> Rit > > >> wrote: >> >> Dear RTK users, >> I have quickly tested calling the >> SimpleRTK python lib from Matlab and >> it seems to work well: >> http://wiki.openrtk.org/index.php/SimpleRTK#Matlab >> >> Therefore, I don't think we have to >> work on Matlab wrappings but let us >> know if you think otherwise. >> Future works include a simple >> installation mechanism for >> pre-compiled SimpleRTK libraries. >> We'll keep you posted! >> Simon >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> >> >> >> >> > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From w_ettehadi at yahoo.com Mon Nov 7 16:53:54 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Mon, 7 Nov 2016 21:53:54 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Message-ID: <1477848112.17731.1478555634307@mail.yahoo.com> Thanks Cyril for your time and advises. Vahid On Friday, November 4, 2016 2:31 AM, Cyril Mory wrote: Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right? About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question: I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards, Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Philipp.Freislederer at med.uni-muenchen.de Thu Nov 17 05:08:09 2016 From: Philipp.Freislederer at med.uni-muenchen.de (Freislederer, Philipp) Date: Thu, 17 Nov 2016 10:08:09 +0000 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac Message-ID: Dear all, I currently have some issues in generating off-plane projections where I think rtk might be helpful. I am trying to generate projections from an Brainlab ExacTrac geometry. What I am getting is a projection matrix generated by the system itself. Using only this information I am able to project any voxel value in a CT onto a panel. Now, in order to speed everything up a little and not re-implement everything that has been done sufficiently already I am hoping to use 'rtkforwardprojections'. The problem is I am not able to reproduce the Brainlab geometry using 'rtksimulatedgeometry' from the projection matrix directly. I could calculate the room angle of the source to the panel from the projection matrix but I am getting weird results when applying these on something like plastimatch, so I think I have an error in there. Is there a way of creating a geometry simply from the projection matrix or do I have to work around and calculate every parameter needed specifically? Maybe someone has some experience with this type of issue. Thanks in advance! Philipp -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 17 05:27:14 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 17 Nov 2016 11:27:14 +0100 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac In-Reply-To: References: Message-ID: Hi, Yes ! I have actually added that functionality recently from Thibault Notargiacomo's code see bool rtk::ThreeDCircularProjectionGeometry::AddProjection ( const HomogeneousProjectionMatrixType & pMat) Note that the projection matrix must be for a 3D position in mm to a 2D position in mm. You can add pre-/post-matrices to go from mm to voxel. There is no command line tool to do it but you can easily create your command line tool to do it. This is tested in testing/rtkgeometryfrommatrixtest.cxx. Let me know if you need more info, Simon On Thu, Nov 17, 2016 at 11:08 AM, Freislederer, Philipp < Philipp.Freislederer at med.uni-muenchen.de> wrote: > Dear all, > > > > I currently have some issues in generating off-plane projections where I > think rtk might be helpful. > > I am trying to generate projections from an Brainlab ExacTrac geometry. > > What I am getting is a projection matrix generated by the system itself. > Using only this information I am able to project any voxel value in a CT > onto a panel. > > Now, in order to speed everything up a little and not re-implement > everything that has been done sufficiently already I am hoping to use > ?rtkforwardprojections?. > > The problem is I am not able to reproduce the Brainlab geometry using > ?rtksimulatedgeometry? from the projection matrix directly. > > I could calculate the room angle of the source to the panel from the > projection matrix but I am getting weird results when applying these on > something like plastimatch, so I think I have an error in there. > > > > Is there a way of creating a geometry simply from the projection matrix or > do I have to work around and calculate every parameter needed specifically? > > Maybe someone has some experience with this type of issue. > > > > Thanks in advance! > > > > Philipp > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Sat Nov 19 14:51:24 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Sat, 19 Nov 2016 19:51:24 +0000 Subject: [Rtk-users] Geometric calibration Message-ID: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ From simon.rit at creatis.insa-lyon.fr Tue Nov 22 02:01:19 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 22 Nov 2016 08:01:19 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: Message-ID: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper ). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > Hi RTK users, > > I'm interested in reconstructing images acquired by a fluoroscopy system > rotating around a knee phantom. Unfortunately, I've been unsuccessful so > far. I recognize some of the phantom in the reconstructed image, but it > contains double contours and the shape is deformed. > > I think the issue might be incorrect geometry specification. I have images > also including a phantom containing markers for which we know the > coordinates, which should allow us to calibrate the system. On the wiki on > image quality, I saw that some users had developed scripts to do the > calibration? Would someone be willing to share it? > > Kind regards, > Sepp > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: after.pdf Type: application/pdf Size: 5974 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: before.pdf Type: application/pdf Size: 5678 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: calib.py Type: text/x-python Size: 2488 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 23 12:44:11 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 23 Nov 2016 18:44:11 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Andreas, Today we had the RTK training and some users were looking for a XIM file reader. I pointed to your contributions but any chance to have it put in RTK soon? Thanks in advance, Simon On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit wrote: > Hi, > Thanks for sharing. There still seems to be some streak artefacts, do you > see the same in the Varian reconstruction? > I'm looking forward to the pull-request, I think we should try to make the > bzip2 optional. > Simon > > On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < > andreasg at phys.au.dk> wrote: > >> Thanks for the fast response Simon! >> >> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >> right all along! >> I just didn't get why it makes a difference. I think I do now, as the >> resulting image was flipped upside down and not left/right as I expected. >> [attached] >> >> The reconstruction is significantly better, I'll look into what should be >> included in the reader and what I should keep in my program to keep >> conformity with the other readers. Then I'll create a pull request. >> >> Just for the purpose of others hitting the same or a similar bug, I also >> attempted: >> I did the SART reconstruction with 10 iterations, lambda=0.3, and Joseph >> back/forward projection, *but with no* significant improvement [attached] >> >> And: >> If you want you can download the data set from: [Dropbox link to 460MB >> zip (I'll >> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >> is used along with the Scan.xml (Calibrations folder may be used in the >> future in my program, but I'm not sure if you can rely on the existence of >> the content). >> >> A MatLab XimReader is available: link >> (also >> available from Varian bitbucket along a with a python version and a >> C#->matlab plugin >> ). >> Otherwise my fork with the RTK-style reader is available from the same >> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >> so bzip2 is a new dependancy). >> >> Best regards >> Andreas >> >> >> __________________________________ >> >> Andreas Gravgaard Andersen >> >> Department of Oncology, >> >> Aarhus University Hospital >> >> N?rrebrogade 44, >> >> 8000, Aarhus C >> >> Mail: andreasg at phys.au.dk >> >> Cell: +45 3165 8140 >> >> >> >> 2016-09-16 16:13 GMT+02:00 Simon Rit : >> >>> Hi, >>> You can try any iterative reconstruction, they can also handle short >>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>> However, the nature of the artifacts indicate more a problem in the >>> geometry in my opinion. I have seen such errors when, for example, rotating >>> in the wrong direction. I can have a look if you share the dataset. >>> Cheers, >>> Simon >>> >>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>> andreasg at phys.au.dk> wrote: >>> >>>> Thanks for the suggestions, Simon and Cyril! >>>> >>>> I have been carefully looking though the geometry and from what I >>>> understand of the transformations matrices, the geometry looks correct/(as >>>> expected). >>>> >>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>> were because had used half-fan scans (full-arc). >>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>> artifacts occurs! >>>> >>>> Are there other (built-in) means of improving half-arc scans, than the >>>> parker short scan filter? >>>> >>>> Parker short scan does a decent job, but the result is still far from >>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>> >>>> Best regards >>>> Andreas >>>> >>>> >>>> __________________________________ >>>> >>>> Andreas Gravgaard Andersen >>>> >>>> Department of Oncology, >>>> >>>> Aarhus University Hospital >>>> >>>> N?rrebrogade 44, >>>> >>>> 8000, Aarhus C >>>> >>>> Mail: andreasg at phys.au.dk >>>> >>>> Cell: +45 3165 8140 >>>> >>>> >>>> >>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory : >>>> >>>>> One suggestion since it works with the Hnd projections: >>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>> Xim projections) and output two projection stack files and two geometry >>>>> files, then compare the projection stack files by subtracting one to the >>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>> are identical, then I do not see any reason why the reconstructions should >>>>> be different, so my guess is that you will find differences. >>>>> >>>>> >>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>> >>>>>> Hi, >>>>>> I have almost never worked with Varian data but it looks like a >>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>> projections which results in assigning a bad geometry to each >>>>>> projection. How did you name your projections? Maybe check that the >>>>>> order matches that of the RTK geometry file. Otherwise, there might be >>>>>> an issue in the creation of the geometry file itself. >>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>> code when you feel it's ready. >>>>>> Simon >>>>>> >>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>> wrote: >>>>>> >>>>>>> Dear RTK experts, >>>>>>> >>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>> format. I >>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>> available with RTK. >>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>> >>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>> in UI), >>>>>>> however when reconstructing with a regular FDK I get a reconstructed >>>>>>> image >>>>>>> that is smeared out around the high and low density areas [see >>>>>>> attached >>>>>>> image] >>>>>>> >>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>> Scripps >>>>>>> (~520 projections). Fixed detector and source (offset=0) with SID=2m, >>>>>>> SDD=3m. >>>>>>> >>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>> algorithm). >>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>> software works >>>>>>> perfectly. >>>>>>> >>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>> creates >>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>> If the first few projections are excluded, the following projection >>>>>>> will act >>>>>>> the same way. >>>>>>> >>>>>>> The projections are corrected for beam hardening and all the >>>>>>> projections >>>>>>> have the expected attenuation. >>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>> reconstruction >>>>>>> makes the same artifacts. >>>>>>> >>>>>>> Setting the value of the first and last projection to zero has the >>>>>>> same >>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>> not the >>>>>>> artifacts. >>>>>>> >>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>> >>>>>>> Best regards >>>>>>> Andreas >>>>>>> >>>>>>> __________________________________ >>>>>>> >>>>>>> Andreas Gravgaard Andersen >>>>>>> >>>>>>> Department of Oncology, >>>>>>> >>>>>>> Aarhus University Hospital >>>>>>> >>>>>>> N?rrebrogade 44, >>>>>>> >>>>>>> 8000, Aarhus C >>>>>>> >>>>>>> Mail: andreasg at phys.au.dk >>>>>>> >>>>>>> Cell: +45 3165 8140 >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Thu Nov 24 01:34:58 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Thu, 24 Nov 2016 06:34:58 +0000 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: , Message-ID: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Hi Simon, Thanks for the script. I was wondering if you could also share the csv or a dummy file? I'm unsure of what the second column contains. An offset distance to the rotation axis? Or the height? Which distance was known in your example? From the code it looks like the distance to the rotation axis? Sepp On 22 Nov 2016, at 08.01, Simon Rit > wrote: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt > wrote: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 24 01:44:42 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 24 Nov 2016 07:44:42 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> References: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Message-ID: Hi, Enclosed. Column 1 is platform angle, 2 is bb height, 3 is the u coordinate (in pixel) and 4 is the v coordinate (in pixel too). I had approximately measured the source-to-detector (270) and source-to-isocenter (210) distances but they were still optimized to have a better assessment. Simon On Thu, Nov 24, 2016 at 7:34 AM, Sepp de Raedt wrote: > Hi Simon, > > Thanks for the script. I was wondering if you could also share the csv or > a dummy file? I'm unsure of what the second column contains. An offset > distance to the rotation axis? Or the height? > > Which distance was known in your example? From the code it looks like the > distance to the rotation axis? > > Sepp > > On 22 Nov 2016, at 08.01, Simon Rit > wrote: > > Hi Sepp, > I did do a calibration script on a micro CT platform. The idea was that I > had a bb taken from 4 different view points at 4 different heights with a > known distance. Their projected position was segmented beforehand on the > projections and I tried to match the projections by optimizing the > calibration (which we see in before.pdf and after.pdf). I don't think it's > a good script, e.g., because I tried to find 8 parameters when 7 are > sufficient for my system (see, e.g., this paper > ). > But this gives you a starting point to develop your own script which will > hopefully be better. Please share if you do something from it! > Thanks, > Simon > > On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > >> Hi RTK users, >> >> I'm interested in reconstructing images acquired by a fluoroscopy system >> rotating around a knee phantom. Unfortunately, I've been unsuccessful so >> far. I recognize some of the phantom in the reconstructed image, but it >> contains double contours and the shape is deformed. >> >> I think the issue might be incorrect geometry specification. I have >> images also including a phantom containing markers for which we know the >> coordinates, which should allow us to calibrate the system. On the wiki on >> image quality, I saw that some users had developed scripts to do the >> calibration? Would someone be willing to share it? >> >> Kind regards, >> Sepp >> >> ______________________________________________________________________ >> This email has been scanned by the Symantec Email Security.cloud service. >> For more information please visit http://www.symanteccloud.com >> ______________________________________________________________________ >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > > > > > > > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CentroidPositions_H5_to_H25_90degstep.csv Type: text/csv Size: 321 bytes Desc: not available URL: From andreasg at phys.au.dk Fri Nov 25 10:25:55 2016 From: andreasg at phys.au.dk (Andreas Gravgaard Andersen) Date: Fri, 25 Nov 2016 16:25:55 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Simon, I have created a pull-request with the XIM file reader. I'm sorry for being late with the promised pull-request (there were a lot of merge conflicts, so it got postponed). I have cleaned it up, but it is still not flawless as mentioned in the pull-request-message. I have tried to keep the RTK coding-style by creating it as a modified HND file reader, but I have only a year of experience with C++, so I apologize if I've left some ugly code in there.. Best regards Andreas __________________________________ Andreas Gravgaard Andersen Department of Oncology, Aarhus University Hospital N?rrebrogade 44, 8000, Aarhus C Mail: andreasg at phys.au.dk Cell: +45 3165 8140 2016-11-23 18:44 GMT+01:00 Simon Rit : > Dear Andreas, > Today we had the RTK training and some users were looking for a XIM file > reader. I pointed to your contributions but any chance to have it put in > RTK soon? > Thanks in advance, > Simon > > On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit > wrote: > >> Hi, >> Thanks for sharing. There still seems to be some streak artefacts, do you >> see the same in the Varian reconstruction? >> I'm looking forward to the pull-request, I think we should try to make >> the bzip2 optional. >> Simon >> >> On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < >> andreasg at phys.au.dk> wrote: >> >>> Thanks for the fast response Simon! >>> >>> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >>> right all along! >>> I just didn't get why it makes a difference. I think I do now, as the >>> resulting image was flipped upside down and not left/right as I expected. >>> [attached] >>> >>> The reconstruction is significantly better, I'll look into what should >>> be included in the reader and what I should keep in my program to keep >>> conformity with the other readers. Then I'll create a pull request. >>> >>> Just for the purpose of others hitting the same or a similar bug, I also >>> attempted: >>> I did the SART reconstruction with 10 iterations, lambda=0.3, and >>> Joseph back/forward projection, *but with no* significant improvement >>> [attached] >>> >>> And: >>> If you want you can download the data set from: [Dropbox link to 460MB >>> zip (I'll >>> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >>> is used along with the Scan.xml (Calibrations folder may be used in the >>> future in my program, but I'm not sure if you can rely on the existence of >>> the content). >>> >>> A MatLab XimReader is available: link >>> (also >>> available from Varian bitbucket along a with a python version and a >>> C#->matlab plugin >>> ). >>> Otherwise my fork with the RTK-style reader is available from the same >>> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >>> so bzip2 is a new dependancy). >>> >>> Best regards >>> Andreas >>> >>> >>> __________________________________ >>> >>> Andreas Gravgaard Andersen >>> >>> Department of Oncology, >>> >>> Aarhus University Hospital >>> >>> N?rrebrogade 44, >>> >>> 8000, Aarhus C >>> >>> Mail: andreasg at phys.au.dk >>> >>> Cell: +45 3165 8140 >>> >>> >>> >>> 2016-09-16 16:13 GMT+02:00 Simon Rit : >>> >>>> Hi, >>>> You can try any iterative reconstruction, they can also handle short >>>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>>> However, the nature of the artifacts indicate more a problem in the >>>> geometry in my opinion. I have seen such errors when, for example, rotating >>>> in the wrong direction. I can have a look if you share the dataset. >>>> Cheers, >>>> Simon >>>> >>>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>>> andreasg at phys.au.dk> wrote: >>>> >>>>> Thanks for the suggestions, Simon and Cyril! >>>>> >>>>> I have been carefully looking though the geometry and from what I >>>>> understand of the transformations matrices, the geometry looks correct/(as >>>>> expected). >>>>> >>>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>>> were because had used half-fan scans (full-arc). >>>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>>> artifacts occurs! >>>>> >>>>> Are there other (built-in) means of improving half-arc scans, than the >>>>> parker short scan filter? >>>>> >>>>> Parker short scan does a decent job, but the result is still far from >>>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>>> >>>>> Best regards >>>>> Andreas >>>>> >>>>> >>>>> __________________________________ >>>>> >>>>> Andreas Gravgaard Andersen >>>>> >>>>> Department of Oncology, >>>>> >>>>> Aarhus University Hospital >>>>> >>>>> N?rrebrogade 44, >>>>> >>>>> 8000, Aarhus C >>>>> >>>>> Mail: andreasg at phys.au.dk >>>>> >>>>> Cell: +45 3165 8140 >>>>> >>>>> >>>>> >>>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory >>>>> : >>>>> >>>>>> One suggestion since it works with the Hnd projections: >>>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>>> Xim projections) and output two projection stack files and two geometry >>>>>> files, then compare the projection stack files by subtracting one to the >>>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>>> are identical, then I do not see any reason why the reconstructions should >>>>>> be different, so my guess is that you will find differences. >>>>>> >>>>>> >>>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>>> >>>>>>> Hi, >>>>>>> I have almost never worked with Varian data but it looks like a >>>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>>> projections which results in assigning a bad geometry to each >>>>>>> projection. How did you name your projections? Maybe check that the >>>>>>> order matches that of the RTK geometry file. Otherwise, there might >>>>>>> be >>>>>>> an issue in the creation of the geometry file itself. >>>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>>> code when you feel it's ready. >>>>>>> Simon >>>>>>> >>>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>>> wrote: >>>>>>> >>>>>>>> Dear RTK experts, >>>>>>>> >>>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>>> format. I >>>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>>> available with RTK. >>>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>>> >>>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>>> in UI), >>>>>>>> however when reconstructing with a regular FDK I get a >>>>>>>> reconstructed image >>>>>>>> that is smeared out around the high and low density areas [see >>>>>>>> attached >>>>>>>> image] >>>>>>>> >>>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>>> Scripps >>>>>>>> (~520 projections). Fixed detector and source (offset=0) with >>>>>>>> SID=2m, >>>>>>>> SDD=3m. >>>>>>>> >>>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>>> algorithm). >>>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>>> software works >>>>>>>> perfectly. >>>>>>>> >>>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>>> creates >>>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>>> If the first few projections are excluded, the following projection >>>>>>>> will act >>>>>>>> the same way. >>>>>>>> >>>>>>>> The projections are corrected for beam hardening and all the >>>>>>>> projections >>>>>>>> have the expected attenuation. >>>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>>> reconstruction >>>>>>>> makes the same artifacts. >>>>>>>> >>>>>>>> Setting the value of the first and last projection to zero has the >>>>>>>> same >>>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>>> not the >>>>>>>> artifacts. >>>>>>>> >>>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>>> >>>>>>>> Best regards >>>>>>>> Andreas >>>>>>>> >>>>>>>> __________________________________ >>>>>>>> >>>>>>>> Andreas Gravgaard Andersen >>>>>>>> >>>>>>>> Department of Oncology, >>>>>>>> >>>>>>>> Aarhus University Hospital >>>>>>>> >>>>>>>> N?rrebrogade 44, >>>>>>>> >>>>>>>> 8000, Aarhus C >>>>>>>> >>>>>>>> Mail: andreasg at phys.au.dk >>>>>>>> >>>>>>>> Cell: +45 3165 8140 >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rtk-users mailing list >>>>>>>> Rtk-users at public.kitware.com >>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From w_ettehadi at yahoo.com Tue Nov 1 12:50:12 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Tue, 1 Nov 2016 16:50:12 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> Message-ID: <1400014065.1872614.1478019012480@mail.yahoo.com> Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards,Vahid -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 02:53:39 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 07:53:39 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1400014065.1872614.1478019012480@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> Message-ID: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: > Hello RTK users and developers, > > I already implemented the RTK and reconstructed some images with the > FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. > Now, I am trying to develop a model-based image reconstruction for our > cone-beam micro-CT. I see already that some iterative algorithms like > ART and its modifications and conjugate-gradient (CG) method are > implemented in the RTK. I want to develop a model-based reconstruction > through the Newton/quasi-Newton optimizations methods. I was wondering > is it possible to extract the gradient of least square function from > implemented algorithms like CG module? Any recommendation will be > appreciated. > > Best Regards, > Vahid > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Wed Nov 2 04:01:30 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 08:01:30 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have tried but I am not getting where to give --division 4 in my code. Please find my code given below and please let me know where I need to change in my code to make it work. int _tmain(int argc, _TCHAR* argv[]) { #pragma region "Variable declaration" const double PI = 3.14159265358979323846; float *angles; int nProj = 349; typedef unsigned short pixelType; typedef float OutpixelType; const int dimension = 3; typedef itk::Image imageType; typedef itk::ImageRegionConstIterator ImageIteratorType; imageType::Pointer Projections = imageType::New(); #pragma endregion "Variable declaration" Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); imageType::SpacingType pSpacing; pSpacing[0] = 0.2960; pSpacing[1] = 0.2960; pSpacing[2] = 0.2960; Projections->SetSpacing(pSpacing); imageType::PointType pOrigin; pOrigin[0] = -212.972; pOrigin[1] = -212.972; pOrigin[2] = -212.972; //-158.50; Projections->SetOrigin(pOrigin); Projections->Update(); //Read angles. char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; angles = new float[nProj]; angles = readAngles(angles_file, angles); #pragma region"Geometry" // Geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); for (unsigned int noProj = 0; noProj < nProj; noProj++) { geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // } typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); geometryWriter->SetFilename("D:\\geo.xml"); geometryWriter->SetObject(geometry); geometryWriter->WriteFile(); geometry->Update(); #pragma endregion "Geometry" //Define output image type #ifdef USE_CUDA typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #else typedef itk::Image OutPutImageType; typedef rtk::ParkerShortScanImageFilter PSSFType; typedef rtk::FDKConeBeamReconstructionFilter FDKType; #endif //ScatterCorrection typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); ScatterCorrection->SetInput(Projections); //VarianObiRawImageFilter typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); //Create the output image typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; ConstantImageSourceType::PointType origin_p; ConstantImageSourceType::SizeType size_p; ConstantImageSourceType::SpacingType spacing_p; ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); origin_p[0] = -127.5; origin_p[1] = -127.5; origin_p[2] = -127.5; size_p[0] = 512; size_p[1] = 512; size_p[2] = 512; spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); projectionsSource->SetOrigin(origin_p); projectionsSource->SetSpacing(spacing_p); projectionsSource->SetSize(size_p); projectionsSource->SetConstant(0); // Short scan image filter PSSFType::Pointer pssf = PSSFType::New(); pssf->SetInput(AttenuationFilter->GetOutput()); pssf->SetGeometry(geometry); pssf->InPlaceOff(); std::cout << "short scan image filter success" << std::endl; FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput(0, projectionsSource->GetOutput()); feldkamp->SetInput(1, pssf->GetOutput()); feldkamp->SetGeometry(geometry); feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); feldkamp->GetRampFilter()->SetHammingFrequency(5.0); feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); feldkamp->SetGPUEnabled(1); feldkamp->SetNumberOfThreads(10000); #pragma region "Write volume" //Create a raw io for writing itk::RawImageIO::Pointer io; io = itk::RawImageIO::New(); for (unsigned int i = 0; i < dimension; i++) { io->SetDimensions(i, size_p[i]); io->SetSpacing(i, spacing_p[i]); io->SetOrigin(i, origin_p[i]); } io->SetHeaderSize(0); io->SetByteOrderToLittleEndian(); io->SetPixelType(itk::ImageIOBase::SCALAR); io->SetNumberOfComponents(1); io->SetNumberOfDimensions(3); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(feldkamp->GetOutput()); try { writer->Update(); } catch (itk::ExceptionObject & excp) { std::cerr << "Error while writing the image " << std::endl; std::cerr << excp << std::endl; getchar(); } #pragma endregion "WriteVolume" delete[] angles; return 0; } Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > I was able to perform a reconstruction from your header and geometry > file, using the following command lines: > > rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > --phantomscale "128,128,128" --like Output.mhd > > rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > The first computes projections through a Shepp & Logan phantom, with the > same size, spacing, origin, etc... as your projections, using your > geometry file geo.xml. > > The second line performs the FDK reconstruction. I had to use both the > "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > on a Geforce GTX 780). "--lowmem" loads the projections into memory by > subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > parts, reconstructs them one by one, then assembles the results. Can you > run the same commands and let us know whether you still encounter the > crash you mentioned ? If it works, you can use your own projection data > in the second command line instead of "simulatedprojections.mha". > > Best, > > Cyril > > On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > > Dear Sir, > > > > Please find the Header file in the attachment. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> We do not need the projections file, at least not for a first stage of > >> error tracking. We only need the header. > >> Try the following command line: > >> > >> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >> > >> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >> what we need, and it is a very light text file. The "proj.raw" contains > >> the pixel values, but at the moment we do not need them. We will create > >> our own proj.raw file, filled with zeros, which should be enough to > >> track down the error you encounter. > >> > >> Looking forward to receiving your file, > >> Cyril > >> > >> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>> Dear Sir, > >>> > >>> The single raw file of the projections is 1.4 GB and we are > not > >> able to send this big file to you. Can you please suggest other > alternatives > >> for this? > >>> Or can you provide us the PC configuration to solve the > issue? > >>> > >>> Let me know if any other clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Hello Zahid, > >>>> > >>>> We will need the header of your projections file, too (It is best if > you > >>>> have all your projections as a single .mhd and a single .raw file, so > it > >>>> should be 3-D image, and you send only the .mhd file). > >>>> > >>>> Regards, > >>>> Cyril > >>>> > >>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> > >>>>> I have only used RTK version 1.3.0. but in the error > >>>> message it is showing RTK version 1.2.0. > >>>>> Please find the attachment of the geometry file of > our > >>>> projections. > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> Without some more information, it's unlikely that we find the source > of > >>>>>> the problem. Here are a few things you can do to help us (and > therefore > >>>>>> yourself): > >>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > the > >>>>>> Cuda forward and back projection filters since v1.2.0, so your > problem > >>>>>> might disappear just by upgrading to the new version > >>>>>> - create a small example that reproduces your problem. You can, for > >>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>> example). And send us the script > >>>>>> - OR send us your geometry file and the header of your projections > file > >>>>>> (no need to send the projection data itself, we'll create a > zero-filled > >>>>>> stack of projections), and the command line that crashes > >>>>>> > >>>>>> Best regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Simon Rit, > >>>>>>> > >>>>>>> Please find the screen shot in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> Senior Design Engineer > >>>>>>> Mobile No. +91-9738379729 > >>>>>>> > >>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>> http://www.panaceamedical.com > >>>>>>> Bangalore - India. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>> Cc: rtk-users at public.kitware.com > >> [mailto:rtk-users at public.kitware.com], > >>>>>> saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>> memory > >>>>>>>> error. If you use the command line tool rtkfdk, you should first > make > >>>>>> sure > >>>>>>>> that you use the --lowmem option to stream the projection images. > If > >> it > >>>>>> is > >>>>>>>> no sufficient, you can split your volume using the --divisions. The > >>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of > >> RTK > >>>> on > >>>>>>>> our case studies webpage > >>>>>> . > >>>>>>>> Simon > >>>>>>>> > >>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>> > >>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>> > >>>>>>>>>> I am unable to do 1024x1024x1024 > reconstruction > >>>> using > >>>>>> RTK > >>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > shoot > >> of > >>>>>>>>> the > >>>>>>>>>> same. > >>>>>>>>>> > >>>>>>>>>> I am using the following items given below. > >>>>>>>>>> > >>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >> application > >>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>> 5. CUDA 7. > >>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>> > >>>>>>>>>> Please provide the solution of this and let me > >> know > >>>> if > >>>>>>>> any > >>>>>>>>>> other clarification is required. > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> Thanks & Regards > >>>>>>>>>> > >>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>> Senior Design Engineer > >>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>> > >>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>> Bangalore - India. > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> ____________________________________________________________ > >>>>>>>>> ________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> Rtk-users mailing list > >>>>>>> Rtk-users at public.kitware.com > >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 04:33:32 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 09:33:32 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> References: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Message-ID: <398170fb-a69e-9781-73d5-2a419542d06d@creatis.insa-lyon.fr> Dear Zahid, The --divisions is an option of the command-line application rtkfdk. It is not directly an option of the FDKConeBeamReconstructionFilter : rather, it is passed to a streaming filter at the end of the pipeline. Look for the following bit of code in rtkfdk.cxx : // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput( pfeldkamp ); streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); You can find information on how a streaming filter works on this page: https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html I hope it helps, Cyril On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have tried but I am not getting where to give --division 4 in my code. > > > Please find my code given below and please let me know where I need to change in my code to make it work. > > > int _tmain(int argc, _TCHAR* argv[]) > { > #pragma region "Variable declaration" > const double PI = 3.14159265358979323846; > float *angles; > int nProj = 349; > typedef unsigned short pixelType; > typedef float OutpixelType; > const int dimension = 3; > typedef itk::Image imageType; > typedef itk::ImageRegionConstIterator ImageIteratorType; > imageType::Pointer Projections = imageType::New(); > > #pragma endregion "Variable declaration" > > Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > imageType::SpacingType pSpacing; > pSpacing[0] = 0.2960; > pSpacing[1] = 0.2960; > pSpacing[2] = 0.2960; > Projections->SetSpacing(pSpacing); > > imageType::PointType pOrigin; > pOrigin[0] = -212.972; > pOrigin[1] = -212.972; > pOrigin[2] = -212.972; //-158.50; > Projections->SetOrigin(pOrigin); > > Projections->Update(); > > //Read angles. > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > angles = new float[nProj]; > angles = readAngles(angles_file, angles); > > #pragma region"Geometry" > // Geometry object > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > GeometryType::Pointer geometry = GeometryType::New(); > for (unsigned int noProj = 0; noProj < nProj; noProj++) > { > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // > } > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > geometryWriter->SetFilename("D:\\geo.xml"); > geometryWriter->SetObject(geometry); > geometryWriter->WriteFile(); > geometry->Update(); > #pragma endregion "Geometry" > > //Define output image type > > #ifdef USE_CUDA > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > #else > typedef itk::Image OutPutImageType; > typedef rtk::ParkerShortScanImageFilter PSSFType; > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > #endif > > //ScatterCorrection > typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); > ScatterCorrection->SetInput(Projections); > > //VarianObiRawImageFilter > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; > RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > //Create the output image > typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; > ConstantImageSourceType::PointType origin_p; > ConstantImageSourceType::SizeType size_p; > ConstantImageSourceType::SpacingType spacing_p; > ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); > origin_p[0] = -127.5; > origin_p[1] = -127.5; > origin_p[2] = -127.5; > size_p[0] = 512; > size_p[1] = 512; > size_p[2] = 512; > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > projectionsSource->SetOrigin(origin_p); > projectionsSource->SetSpacing(spacing_p); > projectionsSource->SetSize(size_p); > projectionsSource->SetConstant(0); > > // Short scan image filter > PSSFType::Pointer pssf = PSSFType::New(); > pssf->SetInput(AttenuationFilter->GetOutput()); > pssf->SetGeometry(geometry); > pssf->InPlaceOff(); > std::cout << "short scan image filter success" << std::endl; > > FDKType::Pointer feldkamp = FDKType::New(); > feldkamp->SetInput(0, projectionsSource->GetOutput()); > feldkamp->SetInput(1, pssf->GetOutput()); > feldkamp->SetGeometry(geometry); > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > feldkamp->SetGPUEnabled(1); > feldkamp->SetNumberOfThreads(10000); > > #pragma region "Write volume" > > //Create a raw io for writing > > itk::RawImageIO::Pointer io; > io = itk::RawImageIO::New(); > > for (unsigned int i = 0; i < dimension; i++) > { > io->SetDimensions(i, size_p[i]); > io->SetSpacing(i, spacing_p[i]); > io->SetOrigin(i, origin_p[i]); > } > io->SetHeaderSize(0); > io->SetByteOrderToLittleEndian(); > io->SetPixelType(itk::ImageIOBase::SCALAR); > io->SetNumberOfComponents(1); > io->SetNumberOfDimensions(3); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(feldkamp->GetOutput()); > > try > { > writer->Update(); > } > catch (itk::ExceptionObject & excp) > { > std::cerr << "Error while writing the image " << std::endl; > std::cerr << excp << std::endl; > getchar(); > } > #pragma endregion "WriteVolume" > delete[] angles; > return 0; > } > > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> I was able to perform a reconstruction from your header and geometry >> file, using the following command lines: >> >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> --phantomscale "128,128,128" --like Output.mhd >> >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> >> The first computes projections through a Shepp & Logan phantom, with the >> same size, spacing, origin, etc... as your projections, using your >> geometry file geo.xml. >> >> The second line performs the FDK reconstruction. I had to use both the >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> parts, reconstructs them one by one, then assembles the results. Can you >> run the same commands and let us know whether you still encounter the >> crash you mentioned ? If it works, you can use your own projection data >> in the second command line instead of "simulatedprojections.mha". >> >> Best, >> >> Cyril >> >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> >>> Dear Sir, >>> >>> Please find the Header file in the attachment. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> We do not need the projections file, at least not for a first stage of >>>> error tracking. We only need the header. >>>> Try the following command line: >>>> >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>> >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>> what we need, and it is a very light text file. The "proj.raw" contains >>>> the pixel values, but at the moment we do not need them. We will create >>>> our own proj.raw file, filled with zeros, which should be enough to >>>> track down the error you encounter. >>>> >>>> Looking forward to receiving your file, >>>> Cyril >>>> >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>> Dear Sir, >>>>> >>>>> The single raw file of the projections is 1.4 GB and we are >> not >>>> able to send this big file to you. Can you please suggest other >> alternatives >>>> for this? >>>>> Or can you provide us the PC configuration to solve the >> issue? >>>>> Let me know if any other clarification is required. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Hello Zahid, >>>>>> >>>>>> We will need the header of your projections file, too (It is best if >> you >>>>>> have all your projections as a single .mhd and a single .raw file, so >> it >>>>>> should be 3-D image, and you send only the .mhd file). >>>>>> >>>>>> Regards, >>>>>> Cyril >>>>>> >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>> Dear Cyril Mory, >>>>>>> >>>>>>> >>>>>>> I have only used RTK version 1.3.0. but in the error >>>>>> message it is showing RTK version 1.2.0. >>>>>>> Please find the attachment of the geometry file of >> our >>>>>> projections. >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> Without some more information, it's unlikely that we find the source >> of >>>>>>>> the problem. Here are a few things you can do to help us (and >> therefore >>>>>>>> yourself): >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >> the >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >> problem >>>>>>>> might disappear just by upgrading to the new version >>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>> example). And send us the script >>>>>>>> - OR send us your geometry file and the header of your projections >> file >>>>>>>> (no need to send the projection data itself, we'll create a >> zero-filled >>>>>>>> stack of projections), and the command line that crashes >>>>>>>> >>>>>>>> Best regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Simon Rit, >>>>>>>>> >>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> Senior Design Engineer >>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>> >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>> http://www.panaceamedical.com >>>>>>>>> Bangalore - India. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>> Cc: rtk-users at public.kitware.com >>>> [mailto:rtk-users at public.kitware.com], >>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>> memory >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >> make >>>>>>>> sure >>>>>>>>>> that you use the --lowmem option to stream the projection images. >> If >>>> it >>>>>>>> is >>>>>>>>>> no sufficient, you can split your volume using the --divisions. The >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of >>>> RTK >>>>>> on >>>>>>>>>> our case studies webpage >>>>>>>> . >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>> >>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>> >>>>>>>>>>>> I am unable to do 1024x1024x1024 >> reconstruction >>>>>> using >>>>>>>> RTK >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >> shoot >>>> of >>>>>>>>>>> the >>>>>>>>>>>> same. >>>>>>>>>>>> >>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>> >>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>> application >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>> >>>>>>>>>>>> Please provide the solution of this and let me >>>> know >>>>>> if >>>>>>>>>> any >>>>>>>>>>>> other clarification is required. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>> >>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>> >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>> Bangalore - India. >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>> ________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rtk-users mailing list >>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 06:57:15 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 10:57:15 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. Please check my modified file writer code given below. // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput(feldkamp->GetOutput()); streamerBP->SetNumberOfStreamDivisions(4); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(streamerBP->GetOutput()); writer->SetNumberOfStreamDivisions(4); Please let me know if any clarification is required. Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The --divisions is an option of the command-line application rtkfdk. It > is not directly an option of the FDKConeBeamReconstructionFilter : > rather, it is passed to a streaming filter at the end of the pipeline. > Look for the following bit of code in rtkfdk.cxx : > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter CPUOutputImageType> StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput( pfeldkamp ); > streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > > You can find information on how a streaming filter works on this page: > > https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > I hope it helps, > > Cyril > > On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have tried but I am not getting where to give > --division 4 in my code. > > > > > > Please find my code given below and please let me know > where I need to change in my code to make it work. > > > > > > int _tmain(int argc, _TCHAR* argv[]) > > { > > #pragma region "Variable declaration" > > const double PI = 3.14159265358979323846; > > float *angles; > > int nProj = 349; > > typedef unsigned short pixelType; > > typedef float OutpixelType; > > const int dimension = 3; > > typedef itk::Image imageType; > > typedef itk::ImageRegionConstIterator ImageIteratorType; > > imageType::Pointer Projections = imageType::New(); > > > > #pragma endregion "Variable declaration" > > > > Projections = > ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > > imageType::SpacingType pSpacing; > > pSpacing[0] = 0.2960; > > pSpacing[1] = 0.2960; > > pSpacing[2] = 0.2960; > > Projections->SetSpacing(pSpacing); > > > > imageType::PointType pOrigin; > > pOrigin[0] = -212.972; > > pOrigin[1] = -212.972; > > pOrigin[2] = -212.972; //-158.50; > > Projections->SetOrigin(pOrigin); > > > > Projections->Update(); > > > > //Read angles. > > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > angles = new float[nProj]; > > angles = readAngles(angles_file, angles); > > > > #pragma region"Geometry" > > // Geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > for (unsigned int noProj = 0; noProj < nProj; noProj++) > > { > > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); > // 136 half fan //2.07 Kidwai // > > } > > > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > GeometryWriterType; > > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > > geometryWriter->SetFilename("D:\\geo.xml"); > > geometryWriter->SetObject(geometry); > > geometryWriter->WriteFile(); > > geometry->Update(); > > #pragma endregion "Geometry" > > > > //Define output image type > > > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef itk::Image OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter PSSFType; > > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > > #endif > > > > //ScatterCorrection > > typedef rtk::BoellaardScatterCorrectionImageFilter > BoellaardScatterCorrectionImageFilterType; > > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > BoellaardScatterCorrectionImageFilterType::New(); > > ScatterCorrection->SetInput(Projections); > > > > //VarianObiRawImageFilter > > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > RawImageFilterType; > > RawImageFilterType::Pointer AttenuationFilter = > RawImageFilterType::New(); > > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > > > //Create the output image > > typedef rtk::ConstantImageSource< OutPutImageType > > ConstantImageSourceType; > > ConstantImageSourceType::PointType origin_p; > > ConstantImageSourceType::SizeType size_p; > > ConstantImageSourceType::SpacingType spacing_p; > > ConstantImageSourceType::Pointer projectionsSource = > ConstantImageSourceType::New(); > > origin_p[0] = -127.5; > > origin_p[1] = -127.5; > > origin_p[2] = -127.5; > > size_p[0] = 512; > > size_p[1] = 512; > > size_p[2] = 512; > > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > > > projectionsSource->SetOrigin(origin_p); > > projectionsSource->SetSpacing(spacing_p); > > projectionsSource->SetSize(size_p); > > projectionsSource->SetConstant(0); > > > > // Short scan image filter > > PSSFType::Pointer pssf = PSSFType::New(); > > pssf->SetInput(AttenuationFilter->GetOutput()); > > pssf->SetGeometry(geometry); > > pssf->InPlaceOff(); > > std::cout << "short scan image filter success" << std::endl; > > > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput(0, projectionsSource->GetOutput()); > > feldkamp->SetInput(1, pssf->GetOutput()); > > feldkamp->SetGeometry(geometry); > > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > feldkamp->SetGPUEnabled(1); > > feldkamp->SetNumberOfThreads(10000); > > > > #pragma region "Write volume" > > > > //Create a raw io for writing > > > > itk::RawImageIO::Pointer io; > > io = itk::RawImageIO::New(); > > > > for (unsigned int i = 0; i < dimension; i++) > > { > > io->SetDimensions(i, size_p[i]); > > io->SetSpacing(i, spacing_p[i]); > > io->SetOrigin(i, origin_p[i]); > > } > > io->SetHeaderSize(0); > > io->SetByteOrderToLittleEndian(); > > io->SetPixelType(itk::ImageIOBase::SCALAR); > > io->SetNumberOfComponents(1); > > io->SetNumberOfDimensions(3); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(feldkamp->GetOutput()); > > > > try > > { > > writer->Update(); > > } > > catch (itk::ExceptionObject & excp) > > { > > std::cerr << "Error while writing the image " << std::endl; > > std::cerr << excp << std::endl; > > getchar(); > > } > > #pragma endregion "WriteVolume" > > delete[] angles; > > return 0; > > } > > > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> I was able to perform a reconstruction from your header and geometry > >> file, using the following command lines: > >> > >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >> --phantomscale "128,128,128" --like Output.mhd > >> > >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >> > >> The first computes projections through a Shepp & Logan phantom, with the > >> same size, spacing, origin, etc... as your projections, using your > >> geometry file geo.xml. > >> > >> The second line performs the FDK reconstruction. I had to use both the > >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >> parts, reconstructs them one by one, then assembles the results. Can you > >> run the same commands and let us know whether you still encounter the > >> crash you mentioned ? If it works, you can use your own projection data > >> in the second command line instead of "simulatedprojections.mha". > >> > >> Best, > >> > >> Cyril > >> > >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >> > >>> Dear Sir, > >>> > >>> Please find the Header file in the attachment. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> We do not need the projections file, at least not for a first stage of > >>>> error tracking. We only need the header. > >>>> Try the following command line: > >>>> > >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>> > >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>> what we need, and it is a very light text file. The "proj.raw" contains > >>>> the pixel values, but at the moment we do not need them. We will create > >>>> our own proj.raw file, filled with zeros, which should be enough to > >>>> track down the error you encounter. > >>>> > >>>> Looking forward to receiving your file, > >>>> Cyril > >>>> > >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Sir, > >>>>> > >>>>> The single raw file of the projections is 1.4 GB and we > are > >> not > >>>> able to send this big file to you. Can you please suggest other > >> alternatives > >>>> for this? > >>>>> Or can you provide us the PC configuration to solve the > >> issue? > >>>>> Let me know if any other clarification is required. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Hello Zahid, > >>>>>> > >>>>>> We will need the header of your projections file, too (It is best if > >> you > >>>>>> have all your projections as a single .mhd and a single .raw file, so > >> it > >>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>> > >>>>>> Regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Cyril Mory, > >>>>>>> > >>>>>>> > >>>>>>> I have only used RTK version 1.3.0. but in the > error > >>>>>> message it is showing RTK version 1.2.0. > >>>>>>> Please find the attachment of the geometry file > of > >> our > >>>>>> projections. > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> Without some more information, it's unlikely that we find the > source > >> of > >>>>>>>> the problem. Here are a few things you can do to help us (and > >> therefore > >>>>>>>> yourself): > >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > >> the > >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >> problem > >>>>>>>> might disappear just by upgrading to the new version > >>>>>>>> - create a small example that reproduces your problem. You can, for > >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>> example). And send us the script > >>>>>>>> - OR send us your geometry file and the header of your projections > >> file > >>>>>>>> (no need to send the projection data itself, we'll create a > >> zero-filled > >>>>>>>> stack of projections), and the command line that crashes > >>>>>>>> > >>>>>>>> Best regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Simon Rit, > >>>>>>>>> > >>>>>>>>> Please find the screen shot in the attachment. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> Senior Design Engineer > >>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>> > >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>> http://www.panaceamedical.com > >>>>>>>>> Bangalore - India. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>> Cc: rtk-users at public.kitware.com > >>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>>>> memory > >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first > >> make > >>>>>>>> sure > >>>>>>>>>> that you use the --lowmem option to stream the projection images. > >> If > >>>> it > >>>>>>>> is > >>>>>>>>>> no sufficient, you can split your volume using the --divisions. > The > >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > of > >>>> RTK > >>>>>> on > >>>>>>>>>> our case studies webpage > >>>>>>>> . > >>>>>>>>>> Simon > >>>>>>>>>> > >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>> > >>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>> > >>>>>>>>>>>> I am unable to do 1024x1024x1024 > >> reconstruction > >>>>>> using > >>>>>>>> RTK > >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >> shoot > >>>> of > >>>>>>>>>>> the > >>>>>>>>>>>> same. > >>>>>>>>>>>> > >>>>>>>>>>>> I am using the following items given below. > >>>>>>>>>>>> > >>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>> application > >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>> > >>>>>>>>>>>> Please provide the solution of this and let > me > >>>> know > >>>>>> if > >>>>>>>>>> any > >>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>> > >>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>> > >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>> ________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 08:27:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 13:27:18 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> References: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Message-ID: <84154ed0-3cb8-abf7-c253-3162d78bf7b7@creatis.insa-lyon.fr> I see two errors: Remove this line writer->SetNumberOfStreamDivisions(4); since only the streaming filter, not the write filter, needs to know about the number of divisions. And change the filename to "D:\\Output.mhd" It will write both the .mhd and the .raw files. I hope it helps, Cyril On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. > > Please check my modified file writer code given below. > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput(feldkamp->GetOutput()); > streamerBP->SetNumberOfStreamDivisions(4); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(streamerBP->GetOutput()); > writer->SetNumberOfStreamDivisions(4); > > > Please let me know if any clarification is required. > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> The --divisions is an option of the command-line application rtkfdk. It >> is not directly an option of the FDKConeBeamReconstructionFilter : >> rather, it is passed to a streaming filter at the end of the pipeline. >> Look for the following bit of code in rtkfdk.cxx : >> >> // Streaming depending on streaming capability of writer >> typedef itk::StreamingImageFilter> CPUOutputImageType> StreamerType; >> StreamerType::Pointer streamerBP = StreamerType::New(); >> streamerBP->SetInput( pfeldkamp ); >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >> >> You can find information on how a streaming filter works on this page: >> >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> >> I hope it helps, >> >> Cyril >> >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have tried but I am not getting where to give >> --division 4 in my code. >>> >>> Please find my code given below and please let me know >> where I need to change in my code to make it work. >>> >>> int _tmain(int argc, _TCHAR* argv[]) >>> { >>> #pragma region "Variable declaration" >>> const double PI = 3.14159265358979323846; >>> float *angles; >>> int nProj = 349; >>> typedef unsigned short pixelType; >>> typedef float OutpixelType; >>> const int dimension = 3; >>> typedef itk::Image imageType; >>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>> imageType::Pointer Projections = imageType::New(); >>> >>> #pragma endregion "Variable declaration" >>> >>> Projections = >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); >>> imageType::SpacingType pSpacing; >>> pSpacing[0] = 0.2960; >>> pSpacing[1] = 0.2960; >>> pSpacing[2] = 0.2960; >>> Projections->SetSpacing(pSpacing); >>> >>> imageType::PointType pOrigin; >>> pOrigin[0] = -212.972; >>> pOrigin[1] = -212.972; >>> pOrigin[2] = -212.972; //-158.50; >>> Projections->SetOrigin(pOrigin); >>> >>> Projections->Update(); >>> >>> //Read angles. >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>> angles = new float[nProj]; >>> angles = readAngles(angles_file, angles); >>> >>> #pragma region"Geometry" >>> // Geometry object >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> GeometryType::Pointer geometry = GeometryType::New(); >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>> { >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); >> // 136 half fan //2.07 Kidwai // >>> } >>> >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> GeometryWriterType; >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>> geometryWriter->SetFilename("D:\\geo.xml"); >>> geometryWriter->SetObject(geometry); >>> geometryWriter->WriteFile(); >>> geometry->Update(); >>> #pragma endregion "Geometry" >>> >>> //Define output image type >>> >>> #ifdef USE_CUDA >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> #else >>> typedef itk::Image OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>> #endif >>> >>> //ScatterCorrection >>> typedef rtk::BoellaardScatterCorrectionImageFilter >> BoellaardScatterCorrectionImageFilterType; >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >> BoellaardScatterCorrectionImageFilterType::New(); >>> ScatterCorrection->SetInput(Projections); >>> >>> //VarianObiRawImageFilter >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> RawImageFilterType; >>> RawImageFilterType::Pointer AttenuationFilter = >> RawImageFilterType::New(); >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>> >>> //Create the output image >>> typedef rtk::ConstantImageSource< OutPutImageType > >> ConstantImageSourceType; >>> ConstantImageSourceType::PointType origin_p; >>> ConstantImageSourceType::SizeType size_p; >>> ConstantImageSourceType::SpacingType spacing_p; >>> ConstantImageSourceType::Pointer projectionsSource = >> ConstantImageSourceType::New(); >>> origin_p[0] = -127.5; >>> origin_p[1] = -127.5; >>> origin_p[2] = -127.5; >>> size_p[0] = 512; >>> size_p[1] = 512; >>> size_p[2] = 512; >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>> >>> projectionsSource->SetOrigin(origin_p); >>> projectionsSource->SetSpacing(spacing_p); >>> projectionsSource->SetSize(size_p); >>> projectionsSource->SetConstant(0); >>> >>> // Short scan image filter >>> PSSFType::Pointer pssf = PSSFType::New(); >>> pssf->SetInput(AttenuationFilter->GetOutput()); >>> pssf->SetGeometry(geometry); >>> pssf->InPlaceOff(); >>> std::cout << "short scan image filter success" << std::endl; >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>> feldkamp->SetInput(1, pssf->GetOutput()); >>> feldkamp->SetGeometry(geometry); >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>> feldkamp->SetGPUEnabled(1); >>> feldkamp->SetNumberOfThreads(10000); >>> >>> #pragma region "Write volume" >>> >>> //Create a raw io for writing >>> >>> itk::RawImageIO::Pointer io; >>> io = itk::RawImageIO::New(); >>> >>> for (unsigned int i = 0; i < dimension; i++) >>> { >>> io->SetDimensions(i, size_p[i]); >>> io->SetSpacing(i, spacing_p[i]); >>> io->SetOrigin(i, origin_p[i]); >>> } >>> io->SetHeaderSize(0); >>> io->SetByteOrderToLittleEndian(); >>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>> io->SetNumberOfComponents(1); >>> io->SetNumberOfDimensions(3); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(feldkamp->GetOutput()); >>> >>> try >>> { >>> writer->Update(); >>> } >>> catch (itk::ExceptionObject & excp) >>> { >>> std::cerr << "Error while writing the image " << std::endl; >>> std::cerr << excp << std::endl; >>> getchar(); >>> } >>> #pragma endregion "WriteVolume" >>> delete[] angles; >>> return 0; >>> } >>> >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> I was able to perform a reconstruction from your header and geometry >>>> file, using the following command lines: >>>> >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>> --phantomscale "128,128,128" --like Output.mhd >>>> >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>> >>>> The first computes projections through a Shepp & Logan phantom, with the >>>> same size, spacing, origin, etc... as your projections, using your >>>> geometry file geo.xml. >>>> >>>> The second line performs the FDK reconstruction. I had to use both the >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>> parts, reconstructs them one by one, then assembles the results. Can you >>>> run the same commands and let us know whether you still encounter the >>>> crash you mentioned ? If it works, you can use your own projection data >>>> in the second command line instead of "simulatedprojections.mha". >>>> >>>> Best, >>>> >>>> Cyril >>>> >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>> >>>>> Dear Sir, >>>>> >>>>> Please find the Header file in the attachment. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> We do not need the projections file, at least not for a first stage of >>>>>> error tracking. We only need the header. >>>>>> Try the following command line: >>>>>> >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>> >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>> what we need, and it is a very light text file. The "proj.raw" contains >>>>>> the pixel values, but at the moment we do not need them. We will create >>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>> track down the error you encounter. >>>>>> >>>>>> Looking forward to receiving your file, >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>> Dear Sir, >>>>>>> >>>>>>> The single raw file of the projections is 1.4 GB and we >> are >>>> not >>>>>> able to send this big file to you. Can you please suggest other >>>> alternatives >>>>>> for this? >>>>>>> Or can you provide us the PC configuration to solve the >>>> issue? >>>>>>> Let me know if any other clarification is required. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Hello Zahid, >>>>>>>> >>>>>>>> We will need the header of your projections file, too (It is best if >>>> you >>>>>>>> have all your projections as a single .mhd and a single .raw file, so >>>> it >>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>> >>>>>>>> Regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Cyril Mory, >>>>>>>>> >>>>>>>>> >>>>>>>>> I have only used RTK version 1.3.0. but in the >> error >>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>> Please find the attachment of the geometry file >> of >>>> our >>>>>>>> projections. >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> >>>>>>>>>> Without some more information, it's unlikely that we find the >> source >>>> of >>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>> therefore >>>>>>>>>> yourself): >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >>>> the >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>> problem >>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>> example). And send us the script >>>>>>>>>> - OR send us your geometry file and the header of your projections >>>> file >>>>>>>>>> (no need to send the projection data itself, we'll create a >>>> zero-filled >>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>> >>>>>>>>>> Best regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>> >>>>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> Senior Design Engineer >>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>> >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>> Bangalore - India. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>>>> memory >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >>>> make >>>>>>>>>> sure >>>>>>>>>>>> that you use the --lowmem option to stream the projection images. >>>> If >>>>>> it >>>>>>>>>> is >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >> The >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >> of >>>>>> RTK >>>>>>>> on >>>>>>>>>>>> our case studies webpage >>>>>>>>>> . >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>> reconstruction >>>>>>>> using >>>>>>>>>> RTK >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>> shoot >>>>>> of >>>>>>>>>>>>> the >>>>>>>>>>>>>> same. >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>>>> >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>> application >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Please provide the solution of this and let >> me >>>>>> know >>>>>>>> if >>>>>>>>>>>> any >>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>> >>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>> >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url >> : >>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>> ________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>> >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>>>> >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 09:37:23 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 13:37:23 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. Please suggest us for further process. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > I see two errors: > > Remove this line > > writer->SetNumberOfStreamDivisions(4); > > since only the streaming filter, not the write filter, needs to know > about the number of divisions. > And change the filename to > > "D:\\Output.mhd" > > It will write both the .mhd and the .raw files. > > I hope it helps, > Cyril > > On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have modified my file writer code and used > StreamingImageFilter. Now its not giving any error message but the final > output is 0 byte for 1024 volume. It working fine for 512 volume. > > > > Please check my modified file writer code given below. > > > > // Streaming depending on streaming capability of writer > > typedef itk::StreamingImageFilter > StreamerType; > > StreamerType::Pointer streamerBP = StreamerType::New(); > > streamerBP->SetInput(feldkamp->GetOutput()); > > streamerBP->SetNumberOfStreamDivisions(4); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(streamerBP->GetOutput()); > > writer->SetNumberOfStreamDivisions(4); > > > > > > Please let me know if any clarification is required. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> The --divisions is an option of the command-line application rtkfdk. It > >> is not directly an option of the FDKConeBeamReconstructionFilter : > >> rather, it is passed to a streaming filter at the end of the pipeline. > >> Look for the following bit of code in rtkfdk.cxx : > >> > >> // Streaming depending on streaming capability of writer > >> typedef itk::StreamingImageFilter >> CPUOutputImageType> StreamerType; > >> StreamerType::Pointer streamerBP = StreamerType::New(); > >> streamerBP->SetInput( pfeldkamp ); > >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >> > >> You can find information on how a streaming filter works on this page: > >> > >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >> > >> I hope it helps, > >> > >> Cyril > >> > >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have tried but I am not getting where to give > >> --division 4 in my code. > >>> > >>> Please find my code given below and please let me know > >> where I need to change in my code to make it work. > >>> > >>> int _tmain(int argc, _TCHAR* argv[]) > >>> { > >>> #pragma region "Variable declaration" > >>> const double PI = 3.14159265358979323846; > >>> float *angles; > >>> int nProj = 349; > >>> typedef unsigned short pixelType; > >>> typedef float OutpixelType; > >>> const int dimension = 3; > >>> typedef itk::Image imageType; > >>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>> imageType::Pointer Projections = imageType::New(); > >>> > >>> #pragma endregion "Variable declaration" > >>> > >>> Projections = > >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > nProj); > >>> imageType::SpacingType pSpacing; > >>> pSpacing[0] = 0.2960; > >>> pSpacing[1] = 0.2960; > >>> pSpacing[2] = 0.2960; > >>> Projections->SetSpacing(pSpacing); > >>> > >>> imageType::PointType pOrigin; > >>> pOrigin[0] = -212.972; > >>> pOrigin[1] = -212.972; > >>> pOrigin[2] = -212.972; //-158.50; > >>> Projections->SetOrigin(pOrigin); > >>> > >>> Projections->Update(); > >>> > >>> //Read angles. > >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>> angles = new float[nProj]; > >>> angles = readAngles(angles_file, angles); > >>> > >>> #pragma region"Geometry" > >>> // Geometry object > >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>> GeometryType::Pointer geometry = GeometryType::New(); > >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>> { > >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > 0); > >> // 136 half fan //2.07 Kidwai // > >>> } > >>> > >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >> GeometryWriterType; > >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > >>> geometryWriter->SetFilename("D:\\geo.xml"); > >>> geometryWriter->SetObject(geometry); > >>> geometryWriter->WriteFile(); > >>> geometry->Update(); > >>> #pragma endregion "Geometry" > >>> > >>> //Define output image type > >>> > >>> #ifdef USE_CUDA > >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>> #else > >>> typedef itk::Image OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; > >>> #endif > >>> > >>> //ScatterCorrection > >>> typedef rtk::BoellaardScatterCorrectionImageFilter > > >> BoellaardScatterCorrectionImageFilterType; > >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > >> BoellaardScatterCorrectionImageFilterType::New(); > >>> ScatterCorrection->SetInput(Projections); > >>> > >>> //VarianObiRawImageFilter > >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >> RawImageFilterType; > >>> RawImageFilterType::Pointer AttenuationFilter = > >> RawImageFilterType::New(); > >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>> > >>> //Create the output image > >>> typedef rtk::ConstantImageSource< OutPutImageType > > >> ConstantImageSourceType; > >>> ConstantImageSourceType::PointType origin_p; > >>> ConstantImageSourceType::SizeType size_p; > >>> ConstantImageSourceType::SpacingType spacing_p; > >>> ConstantImageSourceType::Pointer projectionsSource = > >> ConstantImageSourceType::New(); > >>> origin_p[0] = -127.5; > >>> origin_p[1] = -127.5; > >>> origin_p[2] = -127.5; > >>> size_p[0] = 512; > >>> size_p[1] = 512; > >>> size_p[2] = 512; > >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>> > >>> projectionsSource->SetOrigin(origin_p); > >>> projectionsSource->SetSpacing(spacing_p); > >>> projectionsSource->SetSize(size_p); > >>> projectionsSource->SetConstant(0); > >>> > >>> // Short scan image filter > >>> PSSFType::Pointer pssf = PSSFType::New(); > >>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>> pssf->SetGeometry(geometry); > >>> pssf->InPlaceOff(); > >>> std::cout << "short scan image filter success" << std::endl; > >>> > >>> FDKType::Pointer feldkamp = FDKType::New(); > >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>> feldkamp->SetInput(1, pssf->GetOutput()); > >>> feldkamp->SetGeometry(geometry); > >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>> feldkamp->SetGPUEnabled(1); > >>> feldkamp->SetNumberOfThreads(10000); > >>> > >>> #pragma region "Write volume" > >>> > >>> //Create a raw io for writing > >>> > >>> itk::RawImageIO::Pointer io; > >>> io = itk::RawImageIO::New(); > >>> > >>> for (unsigned int i = 0; i < dimension; i++) > >>> { > >>> io->SetDimensions(i, size_p[i]); > >>> io->SetSpacing(i, spacing_p[i]); > >>> io->SetOrigin(i, origin_p[i]); > >>> } > >>> io->SetHeaderSize(0); > >>> io->SetByteOrderToLittleEndian(); > >>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>> io->SetNumberOfComponents(1); > >>> io->SetNumberOfDimensions(3); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(feldkamp->GetOutput()); > >>> > >>> try > >>> { > >>> writer->Update(); > >>> } > >>> catch (itk::ExceptionObject & excp) > >>> { > >>> std::cerr << "Error while writing the image " << std::endl; > >>> std::cerr << excp << std::endl; > >>> getchar(); > >>> } > >>> #pragma endregion "WriteVolume" > >>> delete[] angles; > >>> return 0; > >>> } > >>> > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> I was able to perform a reconstruction from your header and geometry > >>>> file, using the following command lines: > >>>> > >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>> --phantomscale "128,128,128" --like Output.mhd > >>>> > >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > --hardware > >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>> > >>>> The first computes projections through a Shepp & Logan phantom, with > the > >>>> same size, spacing, origin, etc... as your projections, using your > >>>> geometry file geo.xml. > >>>> > >>>> The second line performs the FDK reconstruction. I had to use both the > >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>> parts, reconstructs them one by one, then assembles the results. Can > you > >>>> run the same commands and let us know whether you still encounter the > >>>> crash you mentioned ? If it works, you can use your own projection data > >>>> in the second command line instead of "simulatedprojections.mha". > >>>> > >>>> Best, > >>>> > >>>> Cyril > >>>> > >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>> > >>>>> Dear Sir, > >>>>> > >>>>> Please find the Header file in the attachment. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> We do not need the projections file, at least not for a first stage > of > >>>>>> error tracking. We only need the header. > >>>>>> Try the following command line: > >>>>>> > >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>> > >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>>>> what we need, and it is a very light text file. The "proj.raw" > contains > >>>>>> the pixel values, but at the moment we do not need them. We will > create > >>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>> track down the error you encounter. > >>>>>> > >>>>>> Looking forward to receiving your file, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> The single raw file of the projections is 1.4 GB and > we > >> are > >>>> not > >>>>>> able to send this big file to you. Can you please suggest other > >>>> alternatives > >>>>>> for this? > >>>>>>> Or can you provide us the PC configuration to solve > the > >>>> issue? > >>>>>>> Let me know if any other clarification is required. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Hello Zahid, > >>>>>>>> > >>>>>>>> We will need the header of your projections file, too (It is best > if > >>>> you > >>>>>>>> have all your projections as a single .mhd and a single .raw file, > so > >>>> it > >>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>> > >>>>>>>> Regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Cyril Mory, > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> I have only used RTK version 1.3.0. but in the > >> error > >>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>> Please find the attachment of the geometry > file > >> of > >>>> our > >>>>>>>> projections. > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> > >>>>>>>>>> Without some more information, it's unlikely that we find the > >> source > >>>> of > >>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>> therefore > >>>>>>>>>> yourself): > >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes > in > >>>> the > >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>> problem > >>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>> - create a small example that reproduces your problem. You can, > for > >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > logan > >>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>>>> example). And send us the script > >>>>>>>>>> - OR send us your geometry file and the header of your > projections > >>>> file > >>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>> zero-filled > >>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>> > >>>>>>>>>> Best regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>> > >>>>>>>>>>> Please find the screen shot in the > attachment. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>> > >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > CUDA > >>>>>>>> memory > >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > first > >>>> make > >>>>>>>>>> sure > >>>>>>>>>>>> that you use the --lowmem option to stream the projection > images. > >>>> If > >>>>>> it > >>>>>>>>>> is > >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. > >> The > >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > >> of > >>>>>> RTK > >>>>>>>> on > >>>>>>>>>>>> our case studies webpage > >>>>>>>>>> . > >>>>>>>>>>>> Simon > >>>>>>>>>>>> > >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>> reconstruction > >>>>>>>> using > >>>>>>>>>> RTK > >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >>>> shoot > >>>>>> of > >>>>>>>>>>>>> the > >>>>>>>>>>>>>> same. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am using the following items given > below. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>>>> application > >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Please provide the solution of this and > let > >> me > >>>>>> know > >>>>>>>> if > >>>>>>>>>>>> any > >>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, > >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > >> : > >>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>> ________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>> > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: RTK_Error.png Type: image/png Size: 57211 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 10:00:50 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 15:00:50 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> References: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Message-ID: <94e0045d-ef88-726d-9b7b-8b5ebf5ac067@creatis.insa-lyon.fr> Dear Zahid, The output looks correct. If the command line solution I suggested in a previous email works, the best way to move forward would be to compare your code and that of rtkfdk.cxx, and where it differs, make sure you have not introduced an error. Cyril On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. > > Please suggest us for further process. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> I see two errors: >> >> Remove this line >> >> writer->SetNumberOfStreamDivisions(4); >> >> since only the streaming filter, not the write filter, needs to know >> about the number of divisions. >> And change the filename to >> >> "D:\\Output.mhd" >> >> It will write both the .mhd and the .raw files. >> >> I hope it helps, >> Cyril >> >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have modified my file writer code and used >> StreamingImageFilter. Now its not giving any error message but the final >> output is 0 byte for 1024 volume. It working fine for 512 volume. >>> Please check my modified file writer code given below. >>> >>> // Streaming depending on streaming capability of writer >>> typedef itk::StreamingImageFilter >> StreamerType; >>> StreamerType::Pointer streamerBP = StreamerType::New(); >>> streamerBP->SetInput(feldkamp->GetOutput()); >>> streamerBP->SetNumberOfStreamDivisions(4); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(streamerBP->GetOutput()); >>> writer->SetNumberOfStreamDivisions(4); >>> >>> >>> Please let me know if any clarification is required. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> The --divisions is an option of the command-line application rtkfdk. It >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >>>> rather, it is passed to a streaming filter at the end of the pipeline. >>>> Look for the following bit of code in rtkfdk.cxx : >>>> >>>> // Streaming depending on streaming capability of writer >>>> typedef itk::StreamingImageFilter>>> CPUOutputImageType> StreamerType; >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >>>> streamerBP->SetInput( pfeldkamp ); >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >>>> >>>> You can find information on how a streaming filter works on this page: >>>> >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >>>> >>>> I hope it helps, >>>> >>>> Cyril >>>> >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>>>> Dear Cyril Mory, >>>>> >>>>> I have tried but I am not getting where to give >>>> --division 4 in my code. >>>>> Please find my code given below and please let me know >>>> where I need to change in my code to make it work. >>>>> int _tmain(int argc, _TCHAR* argv[]) >>>>> { >>>>> #pragma region "Variable declaration" >>>>> const double PI = 3.14159265358979323846; >>>>> float *angles; >>>>> int nProj = 349; >>>>> typedef unsigned short pixelType; >>>>> typedef float OutpixelType; >>>>> const int dimension = 3; >>>>> typedef itk::Image imageType; >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>>>> imageType::Pointer Projections = imageType::New(); >>>>> >>>>> #pragma endregion "Variable declaration" >>>>> >>>>> Projections = >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> nProj); >>>>> imageType::SpacingType pSpacing; >>>>> pSpacing[0] = 0.2960; >>>>> pSpacing[1] = 0.2960; >>>>> pSpacing[2] = 0.2960; >>>>> Projections->SetSpacing(pSpacing); >>>>> >>>>> imageType::PointType pOrigin; >>>>> pOrigin[0] = -212.972; >>>>> pOrigin[1] = -212.972; >>>>> pOrigin[2] = -212.972; //-158.50; >>>>> Projections->SetOrigin(pOrigin); >>>>> >>>>> Projections->Update(); >>>>> >>>>> //Read angles. >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>>>> angles = new float[nProj]; >>>>> angles = readAngles(angles_file, angles); >>>>> >>>>> #pragma region"Geometry" >>>>> // Geometry object >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>>>> { >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, >> 0); >>>> // 136 half fan //2.07 Kidwai // >>>>> } >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >>>> GeometryWriterType; >>>>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >>>>> geometryWriter->SetObject(geometry); >>>>> geometryWriter->WriteFile(); >>>>> geometry->Update(); >>>>> #pragma endregion "Geometry" >>>>> >>>>> //Define output image type >>>>> >>>>> #ifdef USE_CUDA >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> #else >>>>> typedef itk::Image OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>>>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>>>> #endif >>>>> >>>>> //ScatterCorrection >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter>>> BoellaardScatterCorrectionImageFilterType; >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >>>> BoellaardScatterCorrectionImageFilterType::New(); >>>>> ScatterCorrection->SetInput(Projections); >>>>> >>>>> //VarianObiRawImageFilter >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >>>> RawImageFilterType; >>>>> RawImageFilterType::Pointer AttenuationFilter = >>>> RawImageFilterType::New(); >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>>>> >>>>> //Create the output image >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >>>> ConstantImageSourceType; >>>>> ConstantImageSourceType::PointType origin_p; >>>>> ConstantImageSourceType::SizeType size_p; >>>>> ConstantImageSourceType::SpacingType spacing_p; >>>>> ConstantImageSourceType::Pointer projectionsSource = >>>> ConstantImageSourceType::New(); >>>>> origin_p[0] = -127.5; >>>>> origin_p[1] = -127.5; >>>>> origin_p[2] = -127.5; >>>>> size_p[0] = 512; >>>>> size_p[1] = 512; >>>>> size_p[2] = 512; >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>>>> >>>>> projectionsSource->SetOrigin(origin_p); >>>>> projectionsSource->SetSpacing(spacing_p); >>>>> projectionsSource->SetSize(size_p); >>>>> projectionsSource->SetConstant(0); >>>>> >>>>> // Short scan image filter >>>>> PSSFType::Pointer pssf = PSSFType::New(); >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >>>>> pssf->SetGeometry(geometry); >>>>> pssf->InPlaceOff(); >>>>> std::cout << "short scan image filter success" << std::endl; >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >>>>> feldkamp->SetGeometry(geometry); >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>>>> feldkamp->SetGPUEnabled(1); >>>>> feldkamp->SetNumberOfThreads(10000); >>>>> >>>>> #pragma region "Write volume" >>>>> >>>>> //Create a raw io for writing >>>>> >>>>> itk::RawImageIO::Pointer io; >>>>> io = itk::RawImageIO::New(); >>>>> >>>>> for (unsigned int i = 0; i < dimension; i++) >>>>> { >>>>> io->SetDimensions(i, size_p[i]); >>>>> io->SetSpacing(i, spacing_p[i]); >>>>> io->SetOrigin(i, origin_p[i]); >>>>> } >>>>> io->SetHeaderSize(0); >>>>> io->SetByteOrderToLittleEndian(); >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>>>> io->SetNumberOfComponents(1); >>>>> io->SetNumberOfDimensions(3); >>>>> >>>>> //create a writer and write reconstructed file >>>>> itk::ImageFileWriter::Pointer writer; >>>>> writer = itk::ImageFileWriter::New(); >>>>> writer->SetFileName("D:\\Output.raw"); >>>>> writer->SetImageIO(io); >>>>> writer->SetInput(feldkamp->GetOutput()); >>>>> >>>>> try >>>>> { >>>>> writer->Update(); >>>>> } >>>>> catch (itk::ExceptionObject & excp) >>>>> { >>>>> std::cerr << "Error while writing the image " << std::endl; >>>>> std::cerr << excp << std::endl; >>>>> getchar(); >>>>> } >>>>> #pragma endregion "WriteVolume" >>>>> delete[] angles; >>>>> return 0; >>>>> } >>>>> >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> Senior Design Engineer >>>>> Mobile No. +91-9738379729 >>>>> >>>>> Panacea Medical Technologies Pvt. Ltd. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>> http://www.panaceamedical.com >>>>> Bangalore - India. >>>>> >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> I was able to perform a reconstruction from your header and geometry >>>>>> file, using the following command lines: >>>>>> >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>>>> --phantomscale "128,128,128" --like Output.mhd >>>>>> >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> --hardware >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>>>> >>>>>> The first computes projections through a Shepp & Logan phantom, with >> the >>>>>> same size, spacing, origin, etc... as your projections, using your >>>>>> geometry file geo.xml. >>>>>> >>>>>> The second line performs the FDK reconstruction. I had to use both the >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>>>> parts, reconstructs them one by one, then assembles the results. Can >> you >>>>>> run the same commands and let us know whether you still encounter the >>>>>> crash you mentioned ? If it works, you can use your own projection data >>>>>> in the second command line instead of "simulatedprojections.mha". >>>>>> >>>>>> Best, >>>>>> >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>>>> >>>>>>> Dear Sir, >>>>>>> >>>>>>> Please find the Header file in the attachment. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> We do not need the projections file, at least not for a first stage >> of >>>>>>>> error tracking. We only need the header. >>>>>>>> Try the following command line: >>>>>>>> >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>>>> >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> contains >>>>>>>> the pixel values, but at the moment we do not need them. We will >> create >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>>>> track down the error you encounter. >>>>>>>> >>>>>>>> Looking forward to receiving your file, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Sir, >>>>>>>>> >>>>>>>>> The single raw file of the projections is 1.4 GB and >> we >>>> are >>>>>> not >>>>>>>> able to send this big file to you. Can you please suggest other >>>>>> alternatives >>>>>>>> for this? >>>>>>>>> Or can you provide us the PC configuration to solve >> the >>>>>> issue? >>>>>>>>> Let me know if any other clarification is required. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Hello Zahid, >>>>>>>>>> >>>>>>>>>> We will need the header of your projections file, too (It is best >> if >>>>>> you >>>>>>>>>> have all your projections as a single .mhd and a single .raw file, >> so >>>>>> it >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Cyril Mory, >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I have only used RTK version 1.3.0. but in the >>>> error >>>>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>>>> Please find the attachment of the geometry >> file >>>> of >>>>>> our >>>>>>>>>> projections. >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >>>> Simon >>>>>>>> Rit >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> >>>>>>>>>>>> Without some more information, it's unlikely that we find the >>>> source >>>>>> of >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>>>> therefore >>>>>>>>>>>> yourself): >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes >> in >>>>>> the >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>>>> problem >>>>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>>>> - create a small example that reproduces your problem. You can, >> for >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> logan >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>>>> example). And send us the script >>>>>>>>>>>> - OR send us your geometry file and the header of your >> projections >>>>>> file >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >>>>>> zero-filled >>>>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>>>> >>>>>>>>>>>> Best regards, >>>>>>>>>>>> Cyril >>>>>>>>>>>> >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>>>> >>>>>>>>>>>>> Please find the screen shot in the >> attachment. >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>> >>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>> >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a >> CUDA >>>>>>>>>> memory >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> first >>>>>> make >>>>>>>>>>>> sure >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> images. >>>>>> If >>>>>>>> it >>>>>>>>>>>> is >>>>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >>>> The >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >>>> of >>>>>>>> RTK >>>>>>>>>> on >>>>>>>>>>>>>> our case studies webpage >>>>>>>>>>>> . >>>>>>>>>>>>>> Simon >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>>>> reconstruction >>>>>>>>>> using >>>>>>>>>>>> RTK >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>>>> shoot >>>>>>>> of >>>>>>>>>>>>>>> the >>>>>>>>>>>>>>>> same. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am using the following items given >> below. >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>>>> application >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Please provide the solution of this and >> let >>>> me >>>>>>>> know >>>>>>>>>> if >>>>>>>>>>>>>> any >>>>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >>>> : >>>>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>>>> ________________ >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> This email and any files transmitted with it are confidential >>>> and >>>>>>>>>>>> intended >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >>>>>>>>>>>> addressed. >>>>>>>>>>>>>>> If you have received this email in error please notify the >>>> system >>>>>>>>>>>> manager. >>>>>>>>>>>>>>> Please note that any views or opinions presented in this email >>>> are >>>>>>>>>>>> solely >>>>>>>>>>>>>>> those of the author and do not necessarily represent those of >>>> the >>>>>>>>>>>> company. >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >>>> attachments >>>>>>>> for >>>>>>>>>>>> the >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>>>> damage >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>>>> >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >>> >>> >> >> > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Wed Nov 2 22:38:38 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 02:38:38 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Message-ID: <24189134.77160.1478140718379@mail.yahoo.com> Hello Simon and Cyril,Thanks for the reply.You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do.Thanks again for the reply. @Cyril:Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards,Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 02:05:51 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 06:05:51 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103060551.f7bfa0c3@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, Thank you for your help. We are able to reconstruct 1024 volume now. But the reconstruction time is around 4 minutes. Can you please help us to reduce the reconstruction time? We are using NVIDIA TITAN X GPU which has 12 GB memory. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The output looks correct. > > If the command line solution I suggested in a previous email works, the > best way to move forward would be to compare your code and that of > rtkfdk.cxx, and where it differs, make sure you have not introduced an > error. > > Cyril > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have done the same but the Output.mhd file is still 0 > KB for 1024 volume. Please find the attachment of the status of the output > displayed. > > > > Please suggest us for further process. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> I see two errors: > >> > >> Remove this line > >> > >> writer->SetNumberOfStreamDivisions(4); > >> > >> since only the streaming filter, not the write filter, needs to know > >> about the number of divisions. > >> And change the filename to > >> > >> "D:\\Output.mhd" > >> > >> It will write both the .mhd and the .raw files. > >> > >> I hope it helps, > >> Cyril > >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have modified my file writer code and used > >> StreamingImageFilter. Now its not giving any error message but the final > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > >>> Please check my modified file writer code given below. > >>> > >>> // Streaming depending on streaming capability of writer > >>> typedef itk::StreamingImageFilter > >> StreamerType; > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>> streamerBP->SetInput(feldkamp->GetOutput()); > >>> streamerBP->SetNumberOfStreamDivisions(4); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(streamerBP->GetOutput()); > >>> writer->SetNumberOfStreamDivisions(4); > >>> > >>> > >>> Please let me know if any clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> The --divisions is an option of the command-line application rtkfdk. It > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > >>>> rather, it is passed to a streaming filter at the end of the pipeline. > >>>> Look for the following bit of code in rtkfdk.cxx : > >>>> > >>>> // Streaming depending on streaming capability of writer > >>>> typedef itk::StreamingImageFilter >>>> CPUOutputImageType> StreamerType; > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>>> streamerBP->SetInput( pfeldkamp ); > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >>>> > >>>> You can find information on how a streaming filter works on this page: > >>>> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >>>> > >>>> I hope it helps, > >>>> > >>>> Cyril > >>>> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> I have tried but I am not getting where to give > >>>> --division 4 in my code. > >>>>> Please find my code given below and please let me > know > >>>> where I need to change in my code to make it work. > >>>>> int _tmain(int argc, _TCHAR* argv[]) > >>>>> { > >>>>> #pragma region "Variable declaration" > >>>>> const double PI = 3.14159265358979323846; > >>>>> float *angles; > >>>>> int nProj = 349; > >>>>> typedef unsigned short pixelType; > >>>>> typedef float OutpixelType; > >>>>> const int dimension = 3; > >>>>> typedef itk::Image imageType; > >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>>>> imageType::Pointer Projections = imageType::New(); > >>>>> > >>>>> #pragma endregion "Variable declaration" > >>>>> > >>>>> Projections = > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > >> nProj); > >>>>> imageType::SpacingType pSpacing; > >>>>> pSpacing[0] = 0.2960; > >>>>> pSpacing[1] = 0.2960; > >>>>> pSpacing[2] = 0.2960; > >>>>> Projections->SetSpacing(pSpacing); > >>>>> > >>>>> imageType::PointType pOrigin; > >>>>> pOrigin[0] = -212.972; > >>>>> pOrigin[1] = -212.972; > >>>>> pOrigin[2] = -212.972; //-158.50; > >>>>> Projections->SetOrigin(pOrigin); > >>>>> > >>>>> Projections->Update(); > >>>>> > >>>>> //Read angles. > >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>>>> angles = new float[nProj]; > >>>>> angles = readAngles(angles_file, angles); > >>>>> > >>>>> #pragma region"Geometry" > >>>>> // Geometry object > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>>>> { > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > >> 0); > >>>> // 136 half fan //2.07 Kidwai // > >>>>> } > >>>>> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >>>> GeometryWriterType; > >>>>> GeometryWriterType::Pointer geometryWriter = > GeometryWriterType::New(); > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > >>>>> geometryWriter->SetObject(geometry); > >>>>> geometryWriter->WriteFile(); > >>>>> geometry->Update(); > >>>>> #pragma endregion "Geometry" > >>>>> > >>>>> //Define output image type > >>>>> > >>>>> #ifdef USE_CUDA > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>>>> #else > >>>>> typedef itk::Image OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > FDKType; > >>>>> #endif > >>>>> > >>>>> //ScatterCorrection > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter imageType > >>>> BoellaardScatterCorrectionImageFilterType; > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection > = > >>>> BoellaardScatterCorrectionImageFilterType::New(); > >>>>> ScatterCorrection->SetInput(Projections); > >>>>> > >>>>> //VarianObiRawImageFilter > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >>>> RawImageFilterType; > >>>>> RawImageFilterType::Pointer AttenuationFilter = > >>>> RawImageFilterType::New(); > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>>>> > >>>>> //Create the output image > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > >>>> ConstantImageSourceType; > >>>>> ConstantImageSourceType::PointType origin_p; > >>>>> ConstantImageSourceType::SizeType size_p; > >>>>> ConstantImageSourceType::SpacingType spacing_p; > >>>>> ConstantImageSourceType::Pointer projectionsSource = > >>>> ConstantImageSourceType::New(); > >>>>> origin_p[0] = -127.5; > >>>>> origin_p[1] = -127.5; > >>>>> origin_p[2] = -127.5; > >>>>> size_p[0] = 512; > >>>>> size_p[1] = 512; > >>>>> size_p[2] = 512; > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>>>> > >>>>> projectionsSource->SetOrigin(origin_p); > >>>>> projectionsSource->SetSpacing(spacing_p); > >>>>> projectionsSource->SetSize(size_p); > >>>>> projectionsSource->SetConstant(0); > >>>>> > >>>>> // Short scan image filter > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>>>> pssf->SetGeometry(geometry); > >>>>> pssf->InPlaceOff(); > >>>>> std::cout << "short scan image filter success" << std::endl; > >>>>> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > >>>>> feldkamp->SetGeometry(geometry); > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>>>> feldkamp->SetGPUEnabled(1); > >>>>> feldkamp->SetNumberOfThreads(10000); > >>>>> > >>>>> #pragma region "Write volume" > >>>>> > >>>>> //Create a raw io for writing > >>>>> > >>>>> itk::RawImageIO::Pointer io; > >>>>> io = itk::RawImageIO::New(); > >>>>> > >>>>> for (unsigned int i = 0; i < dimension; i++) > >>>>> { > >>>>> io->SetDimensions(i, size_p[i]); > >>>>> io->SetSpacing(i, spacing_p[i]); > >>>>> io->SetOrigin(i, origin_p[i]); > >>>>> } > >>>>> io->SetHeaderSize(0); > >>>>> io->SetByteOrderToLittleEndian(); > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>>>> io->SetNumberOfComponents(1); > >>>>> io->SetNumberOfDimensions(3); > >>>>> > >>>>> //create a writer and write reconstructed file > >>>>> itk::ImageFileWriter::Pointer writer; > >>>>> writer = itk::ImageFileWriter::New(); > >>>>> writer->SetFileName("D:\\Output.raw"); > >>>>> writer->SetImageIO(io); > >>>>> writer->SetInput(feldkamp->GetOutput()); > >>>>> > >>>>> try > >>>>> { > >>>>> writer->Update(); > >>>>> } > >>>>> catch (itk::ExceptionObject & excp) > >>>>> { > >>>>> std::cerr << "Error while writing the image " << std::endl; > >>>>> std::cerr << excp << std::endl; > >>>>> getchar(); > >>>>> } > >>>>> #pragma endregion "WriteVolume" > >>>>> delete[] angles; > >>>>> return 0; > >>>>> } > >>>>> > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> Senior Design Engineer > >>>>> Mobile No. +91-9738379729 > >>>>> > >>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>> http://www.panaceamedical.com > >>>>> Bangalore - India. > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> I was able to perform a reconstruction from your header and geometry > >>>>>> file, using the following command lines: > >>>>>> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>>>> --phantomscale "128,128,128" --like Output.mhd > >>>>>> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > >> --hardware > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>>>> > >>>>>> The first computes projections through a Shepp & Logan phantom, with > >> the > >>>>>> same size, spacing, origin, etc... as your projections, using your > >>>>>> geometry file geo.xml. > >>>>>> > >>>>>> The second line performs the FDK reconstruction. I had to use both > the > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > (3GB, > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > by > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>>>> parts, reconstructs them one by one, then assembles the results. Can > >> you > >>>>>> run the same commands and let us know whether you still encounter the > >>>>>> crash you mentioned ? If it works, you can use your own projection > data > >>>>>> in the second command line instead of "simulatedprojections.mha". > >>>>>> > >>>>>> Best, > >>>>>> > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>>>> > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> Please find the Header file in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> We do not need the projections file, at least not for a first stage > >> of > >>>>>>>> error tracking. We only need the header. > >>>>>>>> Try the following command line: > >>>>>>>> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>>>> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file > is > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > >> contains > >>>>>>>> the pixel values, but at the moment we do not need them. We will > >> create > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>>>> track down the error you encounter. > >>>>>>>> > >>>>>>>> Looking forward to receiving your file, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Sir, > >>>>>>>>> > >>>>>>>>> The single raw file of the projections is 1.4 GB > and > >> we > >>>> are > >>>>>> not > >>>>>>>> able to send this big file to you. Can you please suggest other > >>>>>> alternatives > >>>>>>>> for this? > >>>>>>>>> Or can you provide us the PC configuration to solve > >> the > >>>>>> issue? > >>>>>>>>> Let me know if any other clarification is required. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Hello Zahid, > >>>>>>>>>> > >>>>>>>>>> We will need the header of your projections file, too (It is best > >> if > >>>>>> you > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > file, > >> so > >>>>>> it > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>>>> > >>>>>>>>>> Regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Cyril Mory, > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> I have only used RTK version 1.3.0. but in > the > >>>> error > >>>>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>>>> Please find the attachment of the geometry > >> file > >>>> of > >>>>>> our > >>>>>>>>>> projections. > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >>>> Simon > >>>>>>>> Rit > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > >>>> source > >>>>>> of > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>>>> therefore > >>>>>>>>>>>> yourself): > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > changes > >> in > >>>>>> the > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>>>> problem > >>>>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>>>> - create a small example that reproduces your problem. You can, > >> for > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > >> logan > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > an > >>>>>>>>>>>> example). And send us the script > >>>>>>>>>>>> - OR send us your geometry file and the header of your > >> projections > >>>>>> file > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>>>> zero-filled > >>>>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>>>> > >>>>>>>>>>>> Best regards, > >>>>>>>>>>>> Cyril > >>>>>>>>>>>> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>>>> > >>>>>>>>>>>>> Please find the screen shot in the > >> attachment. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>> > >>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > >> CUDA > >>>>>>>>>> memory > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > >> first > >>>>>> make > >>>>>>>>>>>> sure > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > >> images. > >>>>>> If > >>>>>>>> it > >>>>>>>>>>>> is > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > --divisions. > >>>> The > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > use > >>>> of > >>>>>>>> RTK > >>>>>>>>>> on > >>>>>>>>>>>>>> our case studies webpage > >>>>>>>>>>>> . > >>>>>>>>>>>>>> Simon > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>>>> reconstruction > >>>>>>>>>> using > >>>>>>>>>>>> RTK > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > screen > >>>>>> shoot > >>>>>>>> of > >>>>>>>>>>>>>>> the > >>>>>>>>>>>>>>>> same. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am using the following items given > >> below. > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > console > >>>>>>>> application > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Please provide the solution of this > and > >> let > >>>> me > >>>>>>>> know > >>>>>>>>>> if > >>>>>>>>>>>>>> any > >>>>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > >> Url > >>>> : > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>>>> ________________ > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> This email and any files transmitted with it are > confidential > >>>> and > >>>>>>>>>>>> intended > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they > >> are > >>>>>>>>>>>> addressed. > >>>>>>>>>>>>>>> If you have received this email in error please notify the > >>>> system > >>>>>>>>>>>> manager. > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > email > >>>> are > >>>>>>>>>>>> solely > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > of > >>>> the > >>>>>>>>>>>> company. > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > >>>> attachments > >>>>>>>> for > >>>>>>>>>>>> the > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > >>>>>> damage > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>>>> > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Thu Nov 3 02:23:25 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 3 Nov 2016 07:23:25 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <24189134.77160.1478140718379@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> Message-ID: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): {\begin{aligned}&\mathbf {r} _{0}:=\mathbf {b} -\mathbf {Ax} _{0}\\&\mathbf {p} _{0}:=\mathbf {r} _{0}\\&k:=0\\&{\hbox{repeat}}\\&\qquad \alpha _{k}:={\frac {\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}{\mathbf {p} _{k}^{\mathsf {T}}\mathbf {Ap} _{k}}}\\&\qquad \mathbf {x} _{k+1}:=\mathbf {x} _{k}+\alpha _{k}\mathbf {p} _{k}\\&\qquad \mathbf {r} _{k+1}:=\mathbf {r} _{k}-\alpha _{k}\mathbf {Ap} _{k}\\&\qquad {\hbox{if }}r_{k+1}{\hbox{ is sufficiently small then exit loop}}\\&\qquad \beta _{k}:={\frac {\mathbf {r} _{k+1}^{\mathsf {T}}\mathbf {r} _{k+1}}{\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}}\\&\qquad \mathbf {p} _{k+1}:=\mathbf {r} _{k+1}+\beta _{k}\mathbf {p} _{k}\\&\qquad k:=k+1\\&{\hbox{end repeat}}\\&{\hbox{The result is }}\mathbf {x} _{k+1}\end{aligned}} In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: > Hello Simon and Cyril, > Thanks for the reply. > You are right Simon. I did not notice it too in the literature. The > main problem as you said is the storage. Actually I developed the > conjugate gradient (CG), quasi-Newton and Newton optimization methods > for optical tomography and I intended to apply them to the CT > reconstruction as well. I implemented the Newton's methods > (Gauss-Newton and Levenberg-Marquardt) in a > Jacobian-Free-Newton-Krylov approaches to avoid the matrix > multiplication of Jacobians (sensitivity). It means we only need to > store the Jacobian matrix for the these methods (the matrix R that > Cyril was mentioned), that is still a big matrix for practical > problems in CT reconstruction. For the quasi-Newton I adapted an > L-BFGS algorithm that only need the 3 or 8 last iterations of the > gradient vector to calculate the Hessian matrix. In my case, the > L-BFGS and Newton's methods was much faster than the CG as you know > because of using the second order derivative (hessian matrix). I saw > in your last paper you implement the conjugate gradient method, so I > thought it might be easy to extract the gradient vector from CG > modules and solve the cost function within the quasi-Newton/Newton > methods. I will look at the codes to see what I can do. > Thanks again for the reply. > > @Cyril: > Please correct me if I am wrong. you mean the output of > backProjectionFilter is the gradient of defined cost function? > > Regards, > Vahid > > > On Wednesday, November 2, 2016 2:53 AM, Cyril Mory > wrote: > > > Hi Vahid, > Welcome to RTK :) > Indeed, there are several iterative methods already implemented in > RTK, but none of the filters allows you to easily extract the gradient > of the least squares function there are minimizing. > If you need to minimize the classical non-regularized tomographic cost > function, ie || R f - p ||?, with R the forward projection operator, f > the volume you are looking for, and p the measured projections, my > best advice would be to copy some part of the pipeline of > rtkSARTConeBeamReconstructionFilter to get the job done, ie the > following part (copy-paste this into webgraphviz.com) > > digraph SARTConeBeamReconstructionFilter { > > Input0 [ label="Input 0 (Volume)"]; > Input0 [shape=Mdiamond]; > Input1 [label="Input 1 (Projections)"]; > Input1 [shape=Mdiamond]; > > node [shape=box]; > ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref > rtk::ForwardProjectionImageFilter"]; > Extract [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref > itk::MultiplyImageFilter"]; > AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; > Subtract [ label="itk::SubtractImageFilter" URL="\ref > itk::SubtractImageFilter"]; > MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" > URL="\ref itk::MultiplyImageFilter"]; > Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref > itk::DivideOrZeroOutImageFilter"]; > GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" > URL="\ref itk::MultiplyImageFilter", style=dashed]; > Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref > rtk::DisplacedDetectorImageFilter"]; > ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref > rtk::RayBoxIntersectionImageFilter"]; > ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref > rtk::BackProjectionImageFilter"]; > OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; > OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; > Input0 -> OutofInput0 [arrowhead=none]; > OutofInput0 -> ForwardProject; > ConstantVolume -> BeforeBP [arrowhead=none]; > BeforeBP -> BackProjection; > Extract -> AfterExtract[arrowhead=none]; > AfterExtract -> MultiplyByZero; > AfterExtract -> Subtract; > MultiplyByZero -> ForwardProject; > Input1 -> Extract; > ForwardProject -> Subtract; > Subtract -> MultiplyByLambda; > MultiplyByLambda -> Divide; > Divide -> GatingWeight; > GatingWeight -> Displaced; > ConstantProjectionStack -> ExtractConstantProjection; > ExtractConstantProjection -> RayBox; > RayBox -> Divide; > Displaced -> BackProjection; > BackProjection -> OutofBP [arrowhead=none]; > } > > As you can see, it is a very large part of the SART reconstruction > filter, so yoiu might be better off just copying the whole > SARTConeBeamReconstructionFilter and modifying it. > > Of course, you could also look into ITK's cost function class, and see > if one of the classes inherited from it suits your needs, implement > your cost function this way, and use ITK's off-the-shelf solvers to > minimize it. See the inheritance diagram in > https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if > you want to try this approach. > > Best regards, > Cyril > > On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >> Hello RTK users and developers, >> >> I already implemented the RTK and reconstructed some images with the >> FDK algorithm implemented in RTK. It works well. Thanks to RTK >> developers. >> Now, I am trying to develop a model-based image reconstruction for >> our cone-beam micro-CT. I see already that some iterative algorithms >> like ART and its modifications and conjugate-gradient (CG) method are >> implemented in the RTK. I want to develop a model-based >> reconstruction through the Newton/quasi-Newton optimizations methods. >> I was wondering is it possible to extract the gradient of least >> square function from implemented algorithms like CG module? Any >> recommendation will be appreciated. >> >> Best Regards, >> Vahid >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 10:21:11 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 14:21:11 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. The RTKScatterGlareCorrectionImageFilter code is given below. //rtkLagCorrectionImageFilter typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); LagCorrection->SetInput(Projections); //rtkScatterGlareCorrectionImageFilter typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Cyril Mory, > > > Thank you for your help. We are able to reconstruct 1024 > volume now. > > But the reconstruction time is around 4 minutes. Can you > please help us to reduce the reconstruction time? > > We are using NVIDIA TITAN X GPU which has 12 GB memory. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > Dear Zahid, > > > > The output looks correct. > > > > If the command line solution I suggested in a previous email works, the > > best way to move forward would be to compare your code and that of > > rtkfdk.cxx, and where it differs, make sure you have not introduced an > > error. > > > > Cyril > > > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > > Dear Cyril Mory, > > > > > > I have done the same but the Output.mhd file is still 0 > > KB for 1024 volume. Please find the attachment of the status of the output > > displayed. > > > > > > Please suggest us for further process. > > > > > > > > > Thanks & Regards > > > > > > Zahid Hasan Ansari > > > > > > > > > > > > > > > ----- Original Message ----- > > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > > [mailto:simon.rit at creatis.insa-lyon.fr] > > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > > > > >> I see two errors: > > >> > > >> Remove this line > > >> > > >> writer->SetNumberOfStreamDivisions(4); > > >> > > >> since only the streaming filter, not the write filter, needs to know > > >> about the number of divisions. > > >> And change the filename to > > >> > > >> "D:\\Output.mhd" > > >> > > >> It will write both the .mhd and the .raw files. > > >> > > >> I hope it helps, > > >> Cyril > > >> > > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > >>> Dear Cyril Mory, > > >>> > > >>> I have modified my file writer code and used > > >> StreamingImageFilter. Now its not giving any error message but the > final > > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > > >>> Please check my modified file writer code given > below. > > >>> > > >>> // Streaming depending on streaming capability of writer > > >>> typedef itk::StreamingImageFilter > > >> StreamerType; > > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>> streamerBP->SetInput(feldkamp->GetOutput()); > > >>> streamerBP->SetNumberOfStreamDivisions(4); > > >>> > > >>> //create a writer and write reconstructed file > > >>> itk::ImageFileWriter::Pointer writer; > > >>> writer = itk::ImageFileWriter::New(); > > >>> writer->SetFileName("D:\\Output.raw"); > > >>> writer->SetImageIO(io); > > >>> writer->SetInput(streamerBP->GetOutput()); > > >>> writer->SetNumberOfStreamDivisions(4); > > >>> > > >>> > > >>> Please let me know if any clarification is required. > > >>> > > >>> > > >>> Thanks & Regards > > >>> > > >>> Zahid Hasan Ansari > > >>> Senior Design Engineer > > >>> Mobile No. +91-9738379729 > > >>> > > >>> Panacea Medical Technologies Pvt. Ltd. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >> http://www.panaceamedical.com > > >>> Bangalore - India. > > >>> > > >>> > > >>> > > >>> > > >>> ----- Original Message ----- > > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > > Rit > > >> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>> > > >>> > > >>>> Dear Zahid, > > >>>> > > >>>> The --divisions is an option of the command-line application rtkfdk. > It > > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > > >>>> rather, it is passed to a streaming filter at the end of the > pipeline. > > >>>> Look for the following bit of code in rtkfdk.cxx : > > >>>> > > >>>> // Streaming depending on streaming capability of writer > > >>>> typedef itk::StreamingImageFilter > >>>> CPUOutputImageType> StreamerType; > > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>>> streamerBP->SetInput( pfeldkamp ); > > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg > ); > > >>>> > > >>>> You can find information on how a streaming filter works on this > page: > > >>>> > > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > >>>> > > >>>> I hope it helps, > > >>>> > > >>>> Cyril > > >>>> > > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > >>>>> Dear Cyril Mory, > > >>>>> > > >>>>> I have tried but I am not getting where to give > > >>>> --division 4 in my code. > > >>>>> Please find my code given below and please let me > > know > > >>>> where I need to change in my code to make it work. > > >>>>> int _tmain(int argc, _TCHAR* argv[]) > > >>>>> { > > >>>>> #pragma region "Variable declaration" > > >>>>> const double PI = 3.14159265358979323846; > > >>>>> float *angles; > > >>>>> int nProj = 349; > > >>>>> typedef unsigned short pixelType; > > >>>>> typedef float OutpixelType; > > >>>>> const int dimension = 3; > > >>>>> typedef itk::Image imageType; > > >>>>> typedef itk::ImageRegionConstIterator > ImageIteratorType; > > >>>>> imageType::Pointer Projections = imageType::New(); > > >>>>> > > >>>>> #pragma endregion "Variable declaration" > > >>>>> > > >>>>> Projections = > > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > > >> nProj); > > >>>>> imageType::SpacingType pSpacing; > > >>>>> pSpacing[0] = 0.2960; > > >>>>> pSpacing[1] = 0.2960; > > >>>>> pSpacing[2] = 0.2960; > > >>>>> Projections->SetSpacing(pSpacing); > > >>>>> > > >>>>> imageType::PointType pOrigin; > > >>>>> pOrigin[0] = -212.972; > > >>>>> pOrigin[1] = -212.972; > > >>>>> pOrigin[2] = -212.972; //-158.50; > > >>>>> Projections->SetOrigin(pOrigin); > > >>>>> > > >>>>> Projections->Update(); > > >>>>> > > >>>>> //Read angles. > > >>>>> char *angles_file = > "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > >>>>> angles = new float[nProj]; > > >>>>> angles = readAngles(angles_file, angles); > > >>>>> > > >>>>> #pragma region"Geometry" > > >>>>> // Geometry object > > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > > >>>>> { > > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, > 0, > > >> 0); > > >>>> // 136 half fan //2.07 Kidwai // > > >>>>> } > > >>>>> > > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > > >>>> GeometryWriterType; > > >>>>> GeometryWriterType::Pointer geometryWriter = > > GeometryWriterType::New(); > > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > > >>>>> geometryWriter->SetObject(geometry); > > >>>>> geometryWriter->WriteFile(); > > >>>>> geometry->Update(); > > >>>>> #pragma endregion "Geometry" > > >>>>> > > >>>>> //Define output image type > > >>>>> > > >>>>> #ifdef USE_CUDA > > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > > PSSFType; > > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > >>>>> #else > > >>>>> typedef itk::Image OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter > PSSFType; > > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > > FDKType; > > >>>>> #endif > > >>>>> > > >>>>> //ScatterCorrection > > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter > imageType > > >>>> BoellaardScatterCorrectionImageFilterType; > > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer > ScatterCorrection > > = > > >>>> BoellaardScatterCorrectionImageFilterType::New(); > > >>>>> ScatterCorrection->SetInput(Projections); > > >>>>> > > >>>>> //VarianObiRawImageFilter > > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > > >>>> RawImageFilterType; > > >>>>> RawImageFilterType::Pointer AttenuationFilter = > > >>>> RawImageFilterType::New(); > > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > >>>>> > > >>>>> //Create the output image > > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > > >>>> ConstantImageSourceType; > > >>>>> ConstantImageSourceType::PointType origin_p; > > >>>>> ConstantImageSourceType::SizeType size_p; > > >>>>> ConstantImageSourceType::SpacingType spacing_p; > > >>>>> ConstantImageSourceType::Pointer projectionsSource = > > >>>> ConstantImageSourceType::New(); > > >>>>> origin_p[0] = -127.5; > > >>>>> origin_p[1] = -127.5; > > >>>>> origin_p[2] = -127.5; > > >>>>> size_p[0] = 512; > > >>>>> size_p[1] = 512; > > >>>>> size_p[2] = 512; > > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > >>>>> > > >>>>> projectionsSource->SetOrigin(origin_p); > > >>>>> projectionsSource->SetSpacing(spacing_p); > > >>>>> projectionsSource->SetSize(size_p); > > >>>>> projectionsSource->SetConstant(0); > > >>>>> > > >>>>> // Short scan image filter > > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > > >>>>> pssf->SetGeometry(geometry); > > >>>>> pssf->InPlaceOff(); > > >>>>> std::cout << "short scan image filter success" << std::endl; > > >>>>> > > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > > >>>>> feldkamp->SetGeometry(geometry); > > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > >>>>> feldkamp->SetGPUEnabled(1); > > >>>>> feldkamp->SetNumberOfThreads(10000); > > >>>>> > > >>>>> #pragma region "Write volume" > > >>>>> > > >>>>> //Create a raw io for writing > > >>>>> > > >>>>> itk::RawImageIO::Pointer io; > > >>>>> io = itk::RawImageIO::New(); > > >>>>> > > >>>>> for (unsigned int i = 0; i < dimension; i++) > > >>>>> { > > >>>>> io->SetDimensions(i, size_p[i]); > > >>>>> io->SetSpacing(i, spacing_p[i]); > > >>>>> io->SetOrigin(i, origin_p[i]); > > >>>>> } > > >>>>> io->SetHeaderSize(0); > > >>>>> io->SetByteOrderToLittleEndian(); > > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > > >>>>> io->SetNumberOfComponents(1); > > >>>>> io->SetNumberOfDimensions(3); > > >>>>> > > >>>>> //create a writer and write reconstructed file > > >>>>> itk::ImageFileWriter::Pointer writer; > > >>>>> writer = itk::ImageFileWriter::New(); > > >>>>> writer->SetFileName("D:\\Output.raw"); > > >>>>> writer->SetImageIO(io); > > >>>>> writer->SetInput(feldkamp->GetOutput()); > > >>>>> > > >>>>> try > > >>>>> { > > >>>>> writer->Update(); > > >>>>> } > > >>>>> catch (itk::ExceptionObject & excp) > > >>>>> { > > >>>>> std::cerr << "Error while writing the image " << std::endl; > > >>>>> std::cerr << excp << std::endl; > > >>>>> getchar(); > > >>>>> } > > >>>>> #pragma endregion "WriteVolume" > > >>>>> delete[] angles; > > >>>>> return 0; > > >>>>> } > > >>>>> > > >>>>> > > >>>>> > > >>>>> Thanks & Regards > > >>>>> > > >>>>> Zahid Hasan Ansari > > >>>>> Senior Design Engineer > > >>>>> Mobile No. +91-9738379729 > > >>>>> > > >>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >>>> http://www.panaceamedical.com > > >>>>> Bangalore - India. > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> ----- Original Message ----- > > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > > >> Rit > > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>> > > >>>>> > > >>>>>> Dear Zahid, > > >>>>>> > > >>>>>> I was able to perform a reconstruction from your header and > geometry > > >>>>>> file, using the following command lines: > > >>>>>> > > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > > >>>>>> --phantomscale "128,128,128" --like Output.mhd > > >>>>>> > > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > > >> --hardware > > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > >>>>>> > > >>>>>> The first computes projections through a Shepp & Logan phantom, > with > > >> the > > >>>>>> same size, spacing, origin, etc... as your projections, using your > > >>>>>> geometry file geo.xml. > > >>>>>> > > >>>>>> The second line performs the FDK reconstruction. I had to use both > > the > > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > > (3GB, > > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > > by > > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > > >>>>>> parts, reconstructs them one by one, then assembles the results. > Can > > >> you > > >>>>>> run the same commands and let us know whether you still encounter > the > > >>>>>> crash you mentioned ? If it works, you can use your own projection > > data > > >>>>>> in the second command line instead of "simulatedprojections.mha". > > >>>>>> > > >>>>>> Best, > > >>>>>> > > >>>>>> Cyril > > >>>>>> > > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > >>>>>> > > >>>>>>> Dear Sir, > > >>>>>>> > > >>>>>>> Please find the Header file in the attachment. > > >>>>>>> > > >>>>>>> > > >>>>>>> Thanks & Regards > > >>>>>>> > > >>>>>>> Zahid Hasan Ansari > > >>>>>>> > > >>>>>>> > > >>>>>>> ----- Original Message ----- > > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > Simon > > >>>> Rit > > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>> > > >>>>>>> > > >>>>>>>> Dear Zahid, > > >>>>>>>> > > >>>>>>>> We do not need the projections file, at least not for a first > stage > > >> of > > >>>>>>>> error tracking. We only need the header. > > >>>>>>>> Try the following command line: > > >>>>>>>> > > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > > >>>>>>>> > > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" > file > > is > > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > > >> contains > > >>>>>>>> the pixel values, but at the moment we do not need them. We will > > >> create > > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough > to > > >>>>>>>> track down the error you encounter. > > >>>>>>>> > > >>>>>>>> Looking forward to receiving your file, > > >>>>>>>> Cyril > > >>>>>>>> > > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > > >>>>>>>>> Dear Sir, > > >>>>>>>>> > > >>>>>>>>> The single raw file of the projections is 1.4 GB > > and > > >> we > > >>>> are > > >>>>>> not > > >>>>>>>> able to send this big file to you. Can you please suggest other > > >>>>>> alternatives > > >>>>>>>> for this? > > >>>>>>>>> Or can you provide us the PC configuration to > solve > > >> the > > >>>>>> issue? > > >>>>>>>>> Let me know if any other clarification is > required. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> Thanks & Regards > > >>>>>>>>> > > >>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> ----- Original Message ----- > > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > >> Simon > > >>>>>> Rit > > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>>> Hello Zahid, > > >>>>>>>>>> > > >>>>>>>>>> We will need the header of your projections file, too (It is > best > > >> if > > >>>>>> you > > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > > file, > > >> so > > >>>>>> it > > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > > >>>>>>>>>> > > >>>>>>>>>> Regards, > > >>>>>>>>>> Cyril > > >>>>>>>>>> > > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>> Dear Cyril Mory, > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> I have only used RTK version 1.3.0. but > in > > the > > >>>> error > > >>>>>>>>>> message it is showing RTK version 1.2.0. > > >>>>>>>>>>> Please find the attachment of the > geometry > > >> file > > >>>> of > > >>>>>> our > > >>>>>>>>>> projections. > > >>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>> > > >>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com], > > >>>> Simon > > >>>>>>>> Rit > > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, > saimahesh.m at panaceamedical.com > > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>> > > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > > >>>> source > > >>>>>> of > > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > > >>>>>> therefore > > >>>>>>>>>>>> yourself): > > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > > changes > > >> in > > >>>>>> the > > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so > your > > >>>>>> problem > > >>>>>>>>>>>> might disappear just by upgrading to the new version > > >>>>>>>>>>>> - create a small example that reproduces your problem. You > can, > > >> for > > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > > >> logan > > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look > at > > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > > an > > >>>>>>>>>>>> example). And send us the script > > >>>>>>>>>>>> - OR send us your geometry file and the header of your > > >> projections > > >>>>>> file > > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > > >>>>>> zero-filled > > >>>>>>>>>>>> stack of projections), and the command line that crashes > > >>>>>>>>>>>> > > >>>>>>>>>>>> Best regards, > > >>>>>>>>>>>> Cyril > > >>>>>>>>>>>> > > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>>>> Dear Simon Rit, > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Please find the screen shot in the > > >> attachment. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > > : > > >>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>>>> To: Zahid Hasan Ansari > > [mailto:zahidhasan.a at panaceamedical.com] > > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > > >>>>>>>> [mailto:rtk-users at public.kitware.com], > > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is > a > > >> CUDA > > >>>>>>>>>> memory > > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > > >> first > > >>>>>> make > > >>>>>>>>>>>> sure > > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > > >> images. > > >>>>>> If > > >>>>>>>> it > > >>>>>>>>>>>> is > > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > > --divisions. > > >>>> The > > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > > use > > >>>> of > > >>>>>>>> RTK > > >>>>>>>>>> on > > >>>>>>>>>>>>>> our case studies webpage > > >>>>>>>>>>>> . > > >>>>>>>>>>>>>> Simon > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Dear Sir\Madam, > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > > >>>>>> reconstruction > > >>>>>>>>>> using > > >>>>>>>>>>>> RTK > > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > > screen > > >>>>>> shoot > > >>>>>>>> of > > >>>>>>>>>>>>>>> the > > >>>>>>>>>>>>>>>> same. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am using the following items > given > > >> below. > > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > > console > > >>>>>>>> application > > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > > >>>>>>>>>>>>>>>> 5. CUDA 7. > > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Please provide the solution of this > > and > > >> let > > >>>> me > > >>>>>>>> know > > >>>>>>>>>> if > > >>>>>>>>>>>>>> any > > >>>>>>>>>>>>>>>> other clarification is required. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, > > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 > | > > >> Url > > >>>> : > > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>>>> > ____________________________________________________________ > > >>>>>>>>>>>>>>> ________________ > > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> This email and any files transmitted with it are > > confidential > > >>>> and > > >>>>>>>>>>>> intended > > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom > they > > >> are > > >>>>>>>>>>>> addressed. > > >>>>>>>>>>>>>>> If you have received this email in error please notify the > > >>>> system > > >>>>>>>>>>>> manager. > > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > > email > > >>>> are > > >>>>>>>>>>>> solely > > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > > of > > >>>> the > > >>>>>>>>>>>> company. > > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > > >>>> attachments > > >>>>>>>> for > > >>>>>>>>>>>> the > > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > > any > > >>>>>> damage > > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> This email and any files transmitted with it are > confidential > > >> and > > >>>>>>>>>> intended > > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > > are > > >>>>>>>>>> addressed. > > >>>>>>>>>>>>> If you have received this email in error please notify the > > >> system > > >>>>>>>>>> manager. > > >>>>>>>>>>>>> Please note that any views or opinions presented in this > email > > >> are > > >>>>>>>>>> solely > > >>>>>>>>>>>>> those of the author and do not necessarily represent those > of > > >> the > > >>>>>>>>>> company. > > >>>>>>>>>>>>> Finally, the recipient should check this email and any > > >> attachments > > >>>>>> for > > >>>>>>>>>> the > > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > > >>>> damage > > >>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>> ________________________________________ > > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > Area > > >>>>>> Phase > > >>>>>>>> 1, > > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > Industrial > > >>>>>> Area, > > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>> > > >>>>>>>>>>> This email and any files transmitted with it are confidential > > and > > >>>>>>>> intended > > >>>>>>>>>>> solely for the use of the individual or entity to whom they > are > > >>>>>>>> addressed. > > >>>>>>>>>>> If you have received this email in error please notify the > > system > > >>>>>>>> manager. > > >>>>>>>>>>> Please note that any views or opinions presented in this email > > are > > >>>>>>>> solely > > >>>>>>>>>>> those of the author and do not necessarily represent those of > > the > > >>>>>>>> company. > > >>>>>>>>>>> Finally, the recipient should check this email and any > > attachments > > >>>> for > > >>>>>>>> the > > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > > >> damage > > >>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>> > > >>>>>>>>> ________________________________________ > > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > > >>>> Phase > > >>>>>> 1, > > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > > >>>> Area, > > >>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>> > > >>>>>>>>> This email and any files transmitted with it are confidential > and > > >>>>>> intended > > >>>>>>>>> solely for the use of the individual or entity to whom they are > > >>>>>> addressed. > > >>>>>>>>> If you have received this email in error please notify the > system > > >>>>>> manager. > > >>>>>>>>> Please note that any views or opinions presented in this email > are > > >>>>>> solely > > >>>>>>>>> those of the author and do not necessarily represent those of > the > > >>>>>> company. > > >>>>>>>>> Finally, the recipient should check this email and any > attachments > > >> for > > >>>>>> the > > >>>>>>>>> presence of viruses. The company accepts no liability for any > > damage > > >>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>> ________________________________________ > > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > >> Phase > > >>>> 1, > > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > >> Area, > > >>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>> Fax : + 91 80 42428710 > > >>>>>>> Url : http://www.panaceamedical.com > > >>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>> > > >>>>>>> This email and any files transmitted with it are confidential and > > >>>> intended > > >>>>>>> solely for the use of the individual or entity to whom they are > > >>>> addressed. > > >>>>>>> If you have received this email in error please notify the system > > >>>> manager. > > >>>>>>> Please note that any views or opinions presented in this email are > > >>>> solely > > >>>>>>> those of the author and do not necessarily represent those of the > > >>>> company. > > >>>>>>> Finally, the recipient should check this email and any attachments > > for > > >>>> the > > >>>>>>> presence of viruses. The company accepts no liability for any > damage > > >>>>>>> caused by any virus transmitted by this email. > > >>>>>>> > > >>>>> ________________________________________ > > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>> Fax : + 91 80 42428710 > > >>>>> Url : http://www.panaceamedical.com > > >>>>> > > >> > > > ____________________________________________________________________________ > > >>>>> PMT EMAIL DISCLAIMER: > > >>>>> > > >>>>> This email and any files transmitted with it are confidential and > > >> intended > > >>>>> solely for the use of the individual or entity to whom they are > > >> addressed. > > >>>>> If you have received this email in error please notify the system > > >> manager. > > >>>>> Please note that any views or opinions presented in this email are > > >> solely > > >>>>> those of the author and do not necessarily represent those of the > > >> company. > > >>>>> Finally, the recipient should check this email and any attachments > for > > >> the > > >>>>> presence of viruses. The company accepts no liability for any damage > > >>>>> caused by any virus transmitted by this email. > > >>>>> > > >>>>> > > >>>>> > > >>>> > > >>> ________________________________________ > > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 > > >>> Fax : + 91 80 42428710 > > >>> Url : http://www.panaceamedical.com > > >>> > > >> > > > ____________________________________________________________________________ > > >>> PMT EMAIL DISCLAIMER: > > >>> > > >>> This email and any files transmitted with it are confidential and > > intended > > >>> solely for the use of the individual or entity to whom they are > > addressed. > > >>> If you have received this email in error please notify the system > > manager. > > >>> Please note that any views or opinions presented in this email are > > solely > > >>> those of the author and do not necessarily represent those of the > > company. > > >>> Finally, the recipient should check this email and any attachments for > > the > > >>> presence of viruses. The company accepts no liability for any damage > > >>> caused by any virus transmitted by this email. > > >>> > > >>> > > >>> > > >>> > > >>> > > >> > > >> > > > > > > ________________________________________ > > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > > Malur - 563130. Kolar District. INDIA. > > > > > > Tel : +91 80 4242 8700 / 2845 4785 > > > Fax : + 91 80 42428710 > > > Url : http://www.panaceamedical.com > > > > > > ____________________________________________________________________________ > > > PMT EMAIL DISCLAIMER: > > > > > > This email and any files transmitted with it are confidential and > intended > > > solely for the use of the individual or entity to whom they are > addressed. > > > If you have received this email in error please notify the system > manager. > > > Please note that any views or opinions presented in this email are > solely > > > those of the author and do not necessarily represent those of the > company. > > > Finally, the recipient should check this email and any attachments for > the > > > presence of viruses. The company accepts no liability for any damage > > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: ScatterGlareError.png Type: image/png Size: 121487 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 3 10:28:49 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 3 Nov 2016 15:28:49 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> References: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Message-ID: Hi, I think you should look at the applications before posting a question on the mailing list. There is a rtkscatterglarecorrection tool, look at rtkscatterglarecorrection.cxx. You must init the coefficients. I'll add a check to make the error message more readable but please, take the time to look at all the examples available in applications before posting a question. Thanks, Simon On Thu, Nov 3, 2016 at 3:21 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > > We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. > > The RTKScatterGlareCorrectionImageFilter code is given below. > > //rtkLagCorrectionImageFilter > typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; > LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); > LagCorrection->SetInput(Projections); > > //rtkScatterGlareCorrectionImageFilter > typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; > ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); > ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); > > > > > > Thanks & Regards > > Zahid Hasan Ansari > > > > ----- Original Message ----- > From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Cyril Mory, >> >> >> Thank you for your help. We are able to reconstruct 1024 >> volume now. >> >> But the reconstruction time is around 4 minutes. Can you >> please help us to reduce the reconstruction time? >> >> We are using NVIDIA TITAN X GPU which has 12 GB memory. >> >> >> Thanks & Regards >> >> Zahid Hasan Ansari >> >> >> >> >> ----- Original Message ----- >> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> >> >> > Dear Zahid, >> > >> > The output looks correct. >> > >> > If the command line solution I suggested in a previous email works, the >> > best way to move forward would be to compare your code and that of >> > rtkfdk.cxx, and where it differs, make sure you have not introduced an >> > error. >> > >> > Cyril >> > >> > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: >> > > Dear Cyril Mory, >> > > >> > > I have done the same but the Output.mhd file is still 0 >> > KB for 1024 volume. Please find the attachment of the status of the output >> > displayed. >> > > >> > > Please suggest us for further process. >> > > >> > > >> > > Thanks & Regards >> > > >> > > Zahid Hasan Ansari >> > > >> > > >> > > >> > > >> > > ----- Original Message ----- >> > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >> > [mailto:simon.rit at creatis.insa-lyon.fr] >> > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > > >> > > >> > >> I see two errors: >> > >> >> > >> Remove this line >> > >> >> > >> writer->SetNumberOfStreamDivisions(4); >> > >> >> > >> since only the streaming filter, not the write filter, needs to know >> > >> about the number of divisions. >> > >> And change the filename to >> > >> >> > >> "D:\\Output.mhd" >> > >> >> > >> It will write both the .mhd and the .raw files. >> > >> >> > >> I hope it helps, >> > >> Cyril >> > >> >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >> > >>> Dear Cyril Mory, >> > >>> >> > >>> I have modified my file writer code and used >> > >> StreamingImageFilter. Now its not giving any error message but the >> final >> > >> output is 0 byte for 1024 volume. It working fine for 512 volume. >> > >>> Please check my modified file writer code given >> below. >> > >>> >> > >>> // Streaming depending on streaming capability of writer >> > >>> typedef itk::StreamingImageFilter >> > >> StreamerType; >> > >>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>> streamerBP->SetInput(feldkamp->GetOutput()); >> > >>> streamerBP->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> //create a writer and write reconstructed file >> > >>> itk::ImageFileWriter::Pointer writer; >> > >>> writer = itk::ImageFileWriter::New(); >> > >>> writer->SetFileName("D:\\Output.raw"); >> > >>> writer->SetImageIO(io); >> > >>> writer->SetInput(streamerBP->GetOutput()); >> > >>> writer->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> >> > >>> Please let me know if any clarification is required. >> > >>> >> > >>> >> > >>> Thanks & Regards >> > >>> >> > >>> Zahid Hasan Ansari >> > >>> Senior Design Engineer >> > >>> Mobile No. +91-9738379729 >> > >>> >> > >>> Panacea Medical Technologies Pvt. Ltd. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >> http://www.panaceamedical.com >> > >>> Bangalore - India. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> ----- Original Message ----- >> > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> > Rit >> > >> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>> >> > >>> >> > >>>> Dear Zahid, >> > >>>> >> > >>>> The --divisions is an option of the command-line application rtkfdk. >> It >> > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >> > >>>> rather, it is passed to a streaming filter at the end of the >> pipeline. >> > >>>> Look for the following bit of code in rtkfdk.cxx : >> > >>>> >> > >>>> // Streaming depending on streaming capability of writer >> > >>>> typedef itk::StreamingImageFilter> > >>>> CPUOutputImageType> StreamerType; >> > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>>> streamerBP->SetInput( pfeldkamp ); >> > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg >> ); >> > >>>> >> > >>>> You can find information on how a streaming filter works on this >> page: >> > >>>> >> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> > >>>> >> > >>>> I hope it helps, >> > >>>> >> > >>>> Cyril >> > >>>> >> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >> > >>>>> Dear Cyril Mory, >> > >>>>> >> > >>>>> I have tried but I am not getting where to give >> > >>>> --division 4 in my code. >> > >>>>> Please find my code given below and please let me >> > know >> > >>>> where I need to change in my code to make it work. >> > >>>>> int _tmain(int argc, _TCHAR* argv[]) >> > >>>>> { >> > >>>>> #pragma region "Variable declaration" >> > >>>>> const double PI = 3.14159265358979323846; >> > >>>>> float *angles; >> > >>>>> int nProj = 349; >> > >>>>> typedef unsigned short pixelType; >> > >>>>> typedef float OutpixelType; >> > >>>>> const int dimension = 3; >> > >>>>> typedef itk::Image imageType; >> > >>>>> typedef itk::ImageRegionConstIterator >> ImageIteratorType; >> > >>>>> imageType::Pointer Projections = imageType::New(); >> > >>>>> >> > >>>>> #pragma endregion "Variable declaration" >> > >>>>> >> > >>>>> Projections = >> > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> > >> nProj); >> > >>>>> imageType::SpacingType pSpacing; >> > >>>>> pSpacing[0] = 0.2960; >> > >>>>> pSpacing[1] = 0.2960; >> > >>>>> pSpacing[2] = 0.2960; >> > >>>>> Projections->SetSpacing(pSpacing); >> > >>>>> >> > >>>>> imageType::PointType pOrigin; >> > >>>>> pOrigin[0] = -212.972; >> > >>>>> pOrigin[1] = -212.972; >> > >>>>> pOrigin[2] = -212.972; //-158.50; >> > >>>>> Projections->SetOrigin(pOrigin); >> > >>>>> >> > >>>>> Projections->Update(); >> > >>>>> >> > >>>>> //Read angles. >> > >>>>> char *angles_file = >> "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >> > >>>>> angles = new float[nProj]; >> > >>>>> angles = readAngles(angles_file, angles); >> > >>>>> >> > >>>>> #pragma region"Geometry" >> > >>>>> // Geometry object >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> > >>>>> GeometryType::Pointer geometry = GeometryType::New(); >> > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >> > >>>>> { >> > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, >> 0, >> > >> 0); >> > >>>> // 136 half fan //2.07 Kidwai // >> > >>>>> } >> > >>>>> >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> > >>>> GeometryWriterType; >> > >>>>> GeometryWriterType::Pointer geometryWriter = >> > GeometryWriterType::New(); >> > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >> > >>>>> geometryWriter->SetObject(geometry); >> > >>>>> geometryWriter->WriteFile(); >> > >>>>> geometry->Update(); >> > >>>>> #pragma endregion "Geometry" >> > >>>>> >> > >>>>> //Define output image type >> > >>>>> >> > >>>>> #ifdef USE_CUDA >> > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > >> PSSFType; >> > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> > >>>>> #else >> > >>>>> typedef itk::Image OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter >> PSSFType; >> > >>>>> typedef rtk::FDKConeBeamReconstructionFilter >> > FDKType; >> > >>>>> #endif >> > >>>>> >> > >>>>> //ScatterCorrection >> > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter> > imageType >> > >>>> BoellaardScatterCorrectionImageFilterType; >> > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer >> ScatterCorrection >> > = >> > >>>> BoellaardScatterCorrectionImageFilterType::New(); >> > >>>>> ScatterCorrection->SetInput(Projections); >> > >>>>> >> > >>>>> //VarianObiRawImageFilter >> > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> > >>>> RawImageFilterType; >> > >>>>> RawImageFilterType::Pointer AttenuationFilter = >> > >>>> RawImageFilterType::New(); >> > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >> > >>>>> >> > >>>>> //Create the output image >> > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >> > >>>> ConstantImageSourceType; >> > >>>>> ConstantImageSourceType::PointType origin_p; >> > >>>>> ConstantImageSourceType::SizeType size_p; >> > >>>>> ConstantImageSourceType::SpacingType spacing_p; >> > >>>>> ConstantImageSourceType::Pointer projectionsSource = >> > >>>> ConstantImageSourceType::New(); >> > >>>>> origin_p[0] = -127.5; >> > >>>>> origin_p[1] = -127.5; >> > >>>>> origin_p[2] = -127.5; >> > >>>>> size_p[0] = 512; >> > >>>>> size_p[1] = 512; >> > >>>>> size_p[2] = 512; >> > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >> > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >> > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >> > >>>>> >> > >>>>> projectionsSource->SetOrigin(origin_p); >> > >>>>> projectionsSource->SetSpacing(spacing_p); >> > >>>>> projectionsSource->SetSize(size_p); >> > >>>>> projectionsSource->SetConstant(0); >> > >>>>> >> > >>>>> // Short scan image filter >> > >>>>> PSSFType::Pointer pssf = PSSFType::New(); >> > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >> > >>>>> pssf->SetGeometry(geometry); >> > >>>>> pssf->InPlaceOff(); >> > >>>>> std::cout << "short scan image filter success" << std::endl; >> > >>>>> >> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); >> > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >> > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >> > >>>>> feldkamp->SetGeometry(geometry); >> > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >> > >>>>> feldkamp->SetGPUEnabled(1); >> > >>>>> feldkamp->SetNumberOfThreads(10000); >> > >>>>> >> > >>>>> #pragma region "Write volume" >> > >>>>> >> > >>>>> //Create a raw io for writing >> > >>>>> >> > >>>>> itk::RawImageIO::Pointer io; >> > >>>>> io = itk::RawImageIO::New(); >> > >>>>> >> > >>>>> for (unsigned int i = 0; i < dimension; i++) >> > >>>>> { >> > >>>>> io->SetDimensions(i, size_p[i]); >> > >>>>> io->SetSpacing(i, spacing_p[i]); >> > >>>>> io->SetOrigin(i, origin_p[i]); >> > >>>>> } >> > >>>>> io->SetHeaderSize(0); >> > >>>>> io->SetByteOrderToLittleEndian(); >> > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >> > >>>>> io->SetNumberOfComponents(1); >> > >>>>> io->SetNumberOfDimensions(3); >> > >>>>> >> > >>>>> //create a writer and write reconstructed file >> > >>>>> itk::ImageFileWriter::Pointer writer; >> > >>>>> writer = itk::ImageFileWriter::New(); >> > >>>>> writer->SetFileName("D:\\Output.raw"); >> > >>>>> writer->SetImageIO(io); >> > >>>>> writer->SetInput(feldkamp->GetOutput()); >> > >>>>> >> > >>>>> try >> > >>>>> { >> > >>>>> writer->Update(); >> > >>>>> } >> > >>>>> catch (itk::ExceptionObject & excp) >> > >>>>> { >> > >>>>> std::cerr << "Error while writing the image " << std::endl; >> > >>>>> std::cerr << excp << std::endl; >> > >>>>> getchar(); >> > >>>>> } >> > >>>>> #pragma endregion "WriteVolume" >> > >>>>> delete[] angles; >> > >>>>> return 0; >> > >>>>> } >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> Thanks & Regards >> > >>>>> >> > >>>>> Zahid Hasan Ansari >> > >>>>> Senior Design Engineer >> > >>>>> Mobile No. +91-9738379729 >> > >>>>> >> > >>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >>>> http://www.panaceamedical.com >> > >>>>> Bangalore - India. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> ----- Original Message ----- >> > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >> > >> Rit >> > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>> >> > >>>>> >> > >>>>>> Dear Zahid, >> > >>>>>> >> > >>>>>> I was able to perform a reconstruction from your header and >> geometry >> > >>>>>> file, using the following command lines: >> > >>>>>> >> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> > >>>>>> --phantomscale "128,128,128" --like Output.mhd >> > >>>>>> >> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> > >> --hardware >> > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> > >>>>>> >> > >>>>>> The first computes projections through a Shepp & Logan phantom, >> with >> > >> the >> > >>>>>> same size, spacing, origin, etc... as your projections, using your >> > >>>>>> geometry file geo.xml. >> > >>>>>> >> > >>>>>> The second line performs the FDK reconstruction. I had to use both >> > the >> > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory >> > (3GB, >> > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory >> > by >> > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> > >>>>>> parts, reconstructs them one by one, then assembles the results. >> Can >> > >> you >> > >>>>>> run the same commands and let us know whether you still encounter >> the >> > >>>>>> crash you mentioned ? If it works, you can use your own projection >> > data >> > >>>>>> in the second command line instead of "simulatedprojections.mha". >> > >>>>>> >> > >>>>>> Best, >> > >>>>>> >> > >>>>>> Cyril >> > >>>>>> >> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> > >>>>>> >> > >>>>>>> Dear Sir, >> > >>>>>>> >> > >>>>>>> Please find the Header file in the attachment. >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> Thanks & Regards >> > >>>>>>> >> > >>>>>>> Zahid Hasan Ansari >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> ----- Original Message ----- >> > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > Simon >> > >>>> Rit >> > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>> >> > >>>>>>> >> > >>>>>>>> Dear Zahid, >> > >>>>>>>> >> > >>>>>>>> We do not need the projections file, at least not for a first >> stage >> > >> of >> > >>>>>>>> error tracking. We only need the header. >> > >>>>>>>> Try the following command line: >> > >>>>>>>> >> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >> > >>>>>>>> >> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" >> file >> > is >> > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> > >> contains >> > >>>>>>>> the pixel values, but at the moment we do not need them. We will >> > >> create >> > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough >> to >> > >>>>>>>> track down the error you encounter. >> > >>>>>>>> >> > >>>>>>>> Looking forward to receiving your file, >> > >>>>>>>> Cyril >> > >>>>>>>> >> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >> > >>>>>>>>> Dear Sir, >> > >>>>>>>>> >> > >>>>>>>>> The single raw file of the projections is 1.4 GB >> > and >> > >> we >> > >>>> are >> > >>>>>> not >> > >>>>>>>> able to send this big file to you. Can you please suggest other >> > >>>>>> alternatives >> > >>>>>>>> for this? >> > >>>>>>>>> Or can you provide us the PC configuration to >> solve >> > >> the >> > >>>>>> issue? >> > >>>>>>>>> Let me know if any other clarification is >> required. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> Thanks & Regards >> > >>>>>>>>> >> > >>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> ----- Original Message ----- >> > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > >> Simon >> > >>>>>> Rit >> > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>>> Hello Zahid, >> > >>>>>>>>>> >> > >>>>>>>>>> We will need the header of your projections file, too (It is >> best >> > >> if >> > >>>>>> you >> > >>>>>>>>>> have all your projections as a single .mhd and a single .raw >> > file, >> > >> so >> > >>>>>> it >> > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >> > >>>>>>>>>> >> > >>>>>>>>>> Regards, >> > >>>>>>>>>> Cyril >> > >>>>>>>>>> >> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>> Dear Cyril Mory, >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> I have only used RTK version 1.3.0. but >> in >> > the >> > >>>> error >> > >>>>>>>>>> message it is showing RTK version 1.2.0. >> > >>>>>>>>>>> Please find the attachment of the >> geometry >> > >> file >> > >>>> of >> > >>>>>> our >> > >>>>>>>>>> projections. >> > >>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>> >> > >>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>>>> To: Zahid Hasan Ansari >> [mailto:zahidhasan.a at panaceamedical.com], >> > >>>> Simon >> > >>>>>>>> Rit >> > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, >> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the >> > >>>> source >> > >>>>>> of >> > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >> > >>>>>> therefore >> > >>>>>>>>>>>> yourself): >> > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable >> > changes >> > >> in >> > >>>>>> the >> > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so >> your >> > >>>>>> problem >> > >>>>>>>>>>>> might disappear just by upgrading to the new version >> > >>>>>>>>>>>> - create a small example that reproduces your problem. You >> can, >> > >> for >> > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> > >> logan >> > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look >> at >> > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need >> > an >> > >>>>>>>>>>>> example). And send us the script >> > >>>>>>>>>>>> - OR send us your geometry file and the header of your >> > >> projections >> > >>>>>> file >> > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >> > >>>>>> zero-filled >> > >>>>>>>>>>>> stack of projections), and the command line that crashes >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Best regards, >> > >>>>>>>>>>>> Cyril >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>>>> Dear Simon Rit, >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Please find the screen shot in the >> > >> attachment. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >> > : >> > >>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>>>> To: Zahid Hasan Ansari >> > [mailto:zahidhasan.a at panaceamedical.com] >> > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >> > >>>>>>>> [mailto:rtk-users at public.kitware.com], >> > >>>>>>>>>>>> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is >> a >> > >> CUDA >> > >>>>>>>>>> memory >> > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> > >> first >> > >>>>>> make >> > >>>>>>>>>>>> sure >> > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> > >> images. >> > >>>>>> If >> > >>>>>>>> it >> > >>>>>>>>>>>> is >> > >>>>>>>>>>>>>> no sufficient, you can split your volume using the >> > --divisions. >> > >>>> The >> > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >> > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the >> > use >> > >>>> of >> > >>>>>>>> RTK >> > >>>>>>>>>> on >> > >>>>>>>>>>>>>> our case studies webpage >> > >>>>>>>>>>>> . >> > >>>>>>>>>>>>>> Simon >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >> > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Dear Sir\Madam, >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >> > >>>>>> reconstruction >> > >>>>>>>>>> using >> > >>>>>>>>>>>> RTK >> > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the >> > screen >> > >>>>>> shoot >> > >>>>>>>> of >> > >>>>>>>>>>>>>>> the >> > >>>>>>>>>>>>>>>> same. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am using the following items >> given >> > >> below. >> > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >> > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >> > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit >> > console >> > >>>>>>>> application >> > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >> > >>>>>>>>>>>>>>>> 5. CUDA 7. >> > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >> > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Please provide the solution of this >> > and >> > >> let >> > >>>> me >> > >>>>>>>> know >> > >>>>>>>>>> if >> > >>>>>>>>>>>>>> any >> > >>>>>>>>>>>>>>>> other clarification is required. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> > EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, >> > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 >> | >> > >> Url >> > >>>> : >> > >>>>>>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>>>> >> ____________________________________________________________ >> > >>>>>>>>>>>>>>> ________________ >> > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> This email and any files transmitted with it are >> > confidential >> > >>>> and >> > >>>>>>>>>>>> intended >> > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom >> they >> > >> are >> > >>>>>>>>>>>> addressed. >> > >>>>>>>>>>>>>>> If you have received this email in error please notify the >> > >>>> system >> > >>>>>>>>>>>> manager. >> > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this >> > email >> > >>>> are >> > >>>>>>>>>>>> solely >> > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those >> > of >> > >>>> the >> > >>>>>>>>>>>> company. >> > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >>>> attachments >> > >>>>>>>> for >> > >>>>>>>>>>>> the >> > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> > any >> > >>>>>> damage >> > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> This email and any files transmitted with it are >> confidential >> > >> and >> > >>>>>>>>>> intended >> > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> > are >> > >>>>>>>>>> addressed. >> > >>>>>>>>>>>>> If you have received this email in error please notify the >> > >> system >> > >>>>>>>>>> manager. >> > >>>>>>>>>>>>> Please note that any views or opinions presented in this >> email >> > >> are >> > >>>>>>>>>> solely >> > >>>>>>>>>>>>> those of the author and do not necessarily represent those >> of >> > >> the >> > >>>>>>>>>> company. >> > >>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >> attachments >> > >>>>>> for >> > >>>>>>>>>> the >> > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> any >> > >>>> damage >> > >>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > Area >> > >>>>>> Phase >> > >>>>>>>> 1, >> > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > Industrial >> > >>>>>> Area, >> > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>> >> > >>>>>>>>>>> This email and any files transmitted with it are confidential >> > and >> > >>>>>>>> intended >> > >>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >> > >>>>>>>> addressed. >> > >>>>>>>>>>> If you have received this email in error please notify the >> > system >> > >>>>>>>> manager. >> > >>>>>>>>>>> Please note that any views or opinions presented in this email >> > are >> > >>>>>>>> solely >> > >>>>>>>>>>> those of the author and do not necessarily represent those of >> > the >> > >>>>>>>> company. >> > >>>>>>>>>>> Finally, the recipient should check this email and any >> > attachments >> > >>>> for >> > >>>>>>>> the >> > >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> > >> damage >> > >>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>> >> > >>>>>>>>> ________________________________________ >> > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >> > >>>> Phase >> > >>>>>> 1, >> > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >> > >>>> Area, >> > >>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>> >> > >>>>>>>>> This email and any files transmitted with it are confidential >> and >> > >>>>>> intended >> > >>>>>>>>> solely for the use of the individual or entity to whom they are >> > >>>>>> addressed. >> > >>>>>>>>> If you have received this email in error please notify the >> system >> > >>>>>> manager. >> > >>>>>>>>> Please note that any views or opinions presented in this email >> are >> > >>>>>> solely >> > >>>>>>>>> those of the author and do not necessarily represent those of >> the >> > >>>>>> company. >> > >>>>>>>>> Finally, the recipient should check this email and any >> attachments >> > >> for >> > >>>>>> the >> > >>>>>>>>> presence of viruses. The company accepts no liability for any >> > damage >> > >>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>> ________________________________________ >> > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > >> Phase >> > >>>> 1, >> > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > >> Area, >> > >>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>> Fax : + 91 80 42428710 >> > >>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>> >> > >>>>>>> This email and any files transmitted with it are confidential and >> > >>>> intended >> > >>>>>>> solely for the use of the individual or entity to whom they are >> > >>>> addressed. >> > >>>>>>> If you have received this email in error please notify the system >> > >>>> manager. >> > >>>>>>> Please note that any views or opinions presented in this email are >> > >>>> solely >> > >>>>>>> those of the author and do not necessarily represent those of the >> > >>>> company. >> > >>>>>>> Finally, the recipient should check this email and any attachments >> > for >> > >>>> the >> > >>>>>>> presence of viruses. The company accepts no liability for any >> damage >> > >>>>>>> caused by any virus transmitted by this email. >> > >>>>>>> >> > >>>>> ________________________________________ >> > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>> Fax : + 91 80 42428710 >> > >>>>> Url : http://www.panaceamedical.com >> > >>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>> PMT EMAIL DISCLAIMER: >> > >>>>> >> > >>>>> This email and any files transmitted with it are confidential and >> > >> intended >> > >>>>> solely for the use of the individual or entity to whom they are >> > >> addressed. >> > >>>>> If you have received this email in error please notify the system >> > >> manager. >> > >>>>> Please note that any views or opinions presented in this email are >> > >> solely >> > >>>>> those of the author and do not necessarily represent those of the >> > >> company. >> > >>>>> Finally, the recipient should check this email and any attachments >> for >> > >> the >> > >>>>> presence of viruses. The company accepts no liability for any damage >> > >>>>> caused by any virus transmitted by this email. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>> >> > >>> ________________________________________ >> > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>> Fax : + 91 80 42428710 >> > >>> Url : http://www.panaceamedical.com >> > >>> >> > >> >> > >> ____________________________________________________________________________ >> > >>> PMT EMAIL DISCLAIMER: >> > >>> >> > >>> This email and any files transmitted with it are confidential and >> > intended >> > >>> solely for the use of the individual or entity to whom they are >> > addressed. >> > >>> If you have received this email in error please notify the system >> > manager. >> > >>> Please note that any views or opinions presented in this email are >> > solely >> > >>> those of the author and do not necessarily represent those of the >> > company. >> > >>> Finally, the recipient should check this email and any attachments for >> > the >> > >>> presence of viruses. The company accepts no liability for any damage >> > >>> caused by any virus transmitted by this email. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > >> >> > >> >> > > >> > > ________________________________________ >> > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >> > Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> > Malur - 563130. Kolar District. INDIA. >> > > >> > > Tel : +91 80 4242 8700 / 2845 4785 >> > > Fax : + 91 80 42428710 >> > > Url : http://www.panaceamedical.com >> > > >> > >> ____________________________________________________________________________ >> > > PMT EMAIL DISCLAIMER: >> > > >> > > This email and any files transmitted with it are confidential and >> intended >> > > solely for the use of the individual or entity to whom they are >> addressed. >> > > If you have received this email in error please notify the system >> manager. >> > > Please note that any views or opinions presented in this email are >> solely >> > > those of the author and do not necessarily represent those of the >> company. >> > > Finally, the recipient should check this email and any attachments for >> the >> > > presence of viruses. The company accepts no liability for any damage >> > > caused by any virus transmitted by this email. >> > > >> > >> > >> > > > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Thu Nov 3 16:10:31 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 20:10:31 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Message-ID: <1775591917.651990.1478203831679@mail.yahoo.com> OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right?About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question:I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards,Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Fri Nov 4 02:31:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 4 Nov 2016 07:31:18 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1775591917.651990.1478203831679@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> Message-ID: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: > OK. good. Thank Cyril to clarify it to me. To implement the Newton's > methods instead of multiplication of R with R^T, we need the > multiplication of Jacobian/Sensitivity (R here) matrix with vector > variable (here x) and the gradient vector (here multiplication of R > with -r). I think it is possible to implement the Newton optimization > methods with the current modules as I think we could extract the R and > f dot product and R and r dot product. Am I right? > About the displayed algorithms, I think the gradient vector is dot > product of matrix A (Jacobian) with the minus residual vector (-r). > > One more question: > I already developed my codes in python. Do you think it is easy to > wrap your modules in python? I don't have experience in these subject. > > Regards, > Vahid > > > On Thursday, November 3, 2016 2:23 AM, Cyril Mory > wrote: > > > Hello Vahid, > Thank you for this insight on Newton's methods. Yes, the output of the > backprojection filter, in SART, is the gradient of the cost function. > You may have noticed that the pipeline performs a division of the > forward projection by something coming from > "RayBoxIntersectionFilter". This is to normalize the forward > projection, so that R^T R f ~= blurry f. If you don't do it, you'll > have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, > and your algorithm will quickly diverge. > You could try to extract the gradient from the conjugate gradient > filter as well, but it is significantly more tricky: first, the CG > filter was implemented from the following algorithm, taken from > wikipedia (which embeds the normalization I was mentioning earlier): > In this algorithm, it is not clear to me what exactly is the gradient > of the cost function. I would say it is something like "- r_k", but > I'm not sure. Second, as you see, the CG filter needs an operator A, > which may differ from one problem to another, so this operator is > implemented in a separate filter, which in your case would be > rtkReconstructionConjugateGradientOperator, with the laplacian > regularization parameter gamma set to 0. > Note that we never actually store the system matrix R. Instead, the > interpolation coefficient it contains are re-computed on the fly > everytime we forward project. And the same holds for backprojection, > i.e the matrix R^T. > Best, > Cyril > > On 11/03/2016 03:38 AM, vahid ettehadi wrote: >> Hello Simon and Cyril, >> Thanks for the reply. >> You are right Simon. I did not notice it too in the literature. The >> main problem as you said is the storage. Actually I developed the >> conjugate gradient (CG), quasi-Newton and Newton optimization methods >> for optical tomography and I intended to apply them to the CT >> reconstruction as well. I implemented the Newton's methods >> (Gauss-Newton and Levenberg-Marquardt) in a >> Jacobian-Free-Newton-Krylov approaches to avoid the matrix >> multiplication of Jacobians (sensitivity). It means we only need to >> store the Jacobian matrix for the these methods (the matrix R that >> Cyril was mentioned), that is still a big matrix for practical >> problems in CT reconstruction. For the quasi-Newton I adapted an >> L-BFGS algorithm that only need the 3 or 8 last iterations of the >> gradient vector to calculate the Hessian matrix. In my case, the >> L-BFGS and Newton's methods was much faster than the CG as you know >> because of using the second order derivative (hessian matrix). I saw >> in your last paper you implement the conjugate gradient method, so I >> thought it might be easy to extract the gradient vector from CG >> modules and solve the cost function within the quasi-Newton/Newton >> methods. I will look at the codes to see what I can do. >> Thanks again for the reply. >> >> @Cyril: >> Please correct me if I am wrong. you mean the output of >> backProjectionFilter is the gradient of defined cost function? >> >> Regards, >> Vahid >> >> >> On Wednesday, November 2, 2016 2:53 AM, Cyril Mory >> >> wrote: >> >> >> Hi Vahid, >> Welcome to RTK :) >> Indeed, there are several iterative methods already implemented in >> RTK, but none of the filters allows you to easily extract the >> gradient of the least squares function there are minimizing. >> If you need to minimize the classical non-regularized tomographic >> cost function, ie || R f - p ||?, with R the forward projection >> operator, f the volume you are looking for, and p the measured >> projections, my best advice would be to copy some part of the >> pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, >> ie the following part (copy-paste this into webgraphviz.com) >> >> digraph SARTConeBeamReconstructionFilter { >> >> Input0 [ label="Input 0 (Volume)"]; >> Input0 [shape=Mdiamond]; >> Input1 [label="Input 1 (Projections)"]; >> Input1 [shape=Mdiamond]; >> >> node [shape=box]; >> ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref >> rtk::ForwardProjectionImageFilter"]; >> Extract [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref >> itk::MultiplyImageFilter"]; >> AfterExtract [label="", fixedsize="false", width=0, height=0, >> shape=none]; >> Subtract [ label="itk::SubtractImageFilter" URL="\ref >> itk::SubtractImageFilter"]; >> MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" >> URL="\ref itk::MultiplyImageFilter"]; >> Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref >> itk::DivideOrZeroOutImageFilter"]; >> GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" >> URL="\ref itk::MultiplyImageFilter", style=dashed]; >> Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref >> rtk::DisplacedDetectorImageFilter"]; >> ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref >> rtk::RayBoxIntersectionImageFilter"]; >> ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref >> rtk::BackProjectionImageFilter"]; >> OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; >> OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; >> Input0 -> OutofInput0 [arrowhead=none]; >> OutofInput0 -> ForwardProject; >> ConstantVolume -> BeforeBP [arrowhead=none]; >> BeforeBP -> BackProjection; >> Extract -> AfterExtract[arrowhead=none]; >> AfterExtract -> MultiplyByZero; >> AfterExtract -> Subtract; >> MultiplyByZero -> ForwardProject; >> Input1 -> Extract; >> ForwardProject -> Subtract; >> Subtract -> MultiplyByLambda; >> MultiplyByLambda -> Divide; >> Divide -> GatingWeight; >> GatingWeight -> Displaced; >> ConstantProjectionStack -> ExtractConstantProjection; >> ExtractConstantProjection -> RayBox; >> RayBox -> Divide; >> Displaced -> BackProjection; >> BackProjection -> OutofBP [arrowhead=none]; >> } >> >> As you can see, it is a very large part of the SART reconstruction >> filter, so yoiu might be better off just copying the whole >> SARTConeBeamReconstructionFilter and modifying it. >> >> Of course, you could also look into ITK's cost function class, and >> see if one of the classes inherited from it suits your needs, >> implement your cost function this way, and use ITK's off-the-shelf >> solvers to minimize it. See the inheritance diagram in >> https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if >> you want to try this approach. >> >> Best regards, >> Cyril >> >> On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >>> Hello RTK users and developers, >>> >>> I already implemented the RTK and reconstructed some images with the >>> FDK algorithm implemented in RTK. It works well. Thanks to RTK >>> developers. >>> Now, I am trying to develop a model-based image reconstruction for >>> our cone-beam micro-CT. I see already that some iterative algorithms >>> like ART and its modifications and conjugate-gradient (CG) method >>> are implemented in the RTK. I want to develop a model-based >>> reconstruction through the Newton/quasi-Newton optimizations >>> methods. I was wondering is it possible to extract the gradient of >>> least square function from implemented algorithms like CG module? >>> Any recommendation will be appreciated. >>> >>> Best Regards, >>> Vahid >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Fri Nov 4 16:42:08 2016 From: julien.jomier at kitware.com (Julien Jomier) Date: Fri, 4 Nov 2016 21:42:08 +0100 Subject: [Rtk-users] SimpleRTK + Matlab In-Reply-To: References: <06d4327e-9fd4-bf08-565d-5304f577b521@creatis.insa-lyon.fr> Message-ID: <89255846-9a06-a625-45f1-88d140c0013d@kitware.com> Hi Arvid, Sorry for the late reply. We successfully build the latest RTK with ITK 4.11.0 on Visual Studio 2013 with static libraries (BUILD_SHARED_LIBS set to OFF). I have just pushed a fix to SimpleRTK to build as shared libraries. Note that you would need to have ITK built as shared libraries as well. Let us know if you still have any issues, Julien On 23/09/2016 10:29, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi again. > > I've been spending some more time with this, and feel I learned a little > bit more. I have now tested this on several machines with several > compiler versions (more or less all of them) and serveral cmake versions > - all with Windows 7. > > I can actually reproduce the successful build you linked to, but this > can only be done if you do not include any of the language wrappings, > like in the build you linked to. Enable any of them, and the build will > break. (see attachment) > > I suspect it must have been working in the past, but since none of them > are included in your test there have been a breaking change, and none of > them work anymore. > > I am still trying to tweak then projects manually to build SimpleRTK > with some sort of language support, but still without any luck. > > best > > Arvid > > On Tue, Sep 20, 2016 at 4:19 PM, Simon Rit > > > wrote: > > Hi, > Sorry, I won't be able to help but I'd advise to tick on WRAP_PYTHON > only at first in cmake, not the other languages (i.e., tick off > WRAP_LUA). > I can't solve your problem but Kitware is going to look into an > upgrade of SimpleRTK in the coming days, I'll ask them if they know > what is the issue. If you look here: > http://my.cdash.org/viewNotes.php?buildid=1052065 > > this is a nightly build of SimpleRTK on Windows and it seems to > work. I don't see why it wouldn't work for you. > Simon > > On Tue, Sep 20, 2016 at 2:17 PM, Arvid Piehl Lauritsen B?ttiger > > wrote: > > Hi again. > > I understand, but could you please help me get in contact with > the person who knows something about the windows build (if any), > I think there is something wrong. > > I have been investigating the build problems I had and found > that in the sub folder "SimpleRTK-build" there is a solutions > file with SimpleRTK. I opened it up and found the projects which > I had problems building: "SimpleRTKCommon", > "SimpleRTKBasicFilters0", "SimpleRTKBasicFilters1" etc. > > When I then tried to build SimpleRTKCommon manually it just > compiled without any problems. However, when I followed up by > building "SimpleRTKBasicFilters0" it gave me an error which > stated that it couldn't find "SimpleRTKCommon-0.9.lib" - which I > just build. > > After some more investigation I realized that the > SimpleRTKCommon is set to build a dynamic linked library (DLL), > and SimpleRTKBasicFilters0 expects it to be a static linked > library (LIB). After changing SimpleRTKCommon to be build as a > static library - and changing the output location - I could > build SimpleRTKBasicFilters0. > > However, SimpleRTKBasicFilters0 is also build as an DLL, but > changing that to a LIB as well I could build > SimpleRTKBasicFilters1, then SimpleRTKBasicFilters2 and then > SimpleRTKBasicFilters3. You get the point. > > I'm unsure if the intention is to build them as static or > dynamic libraries, but in any case the current build > configuration doesn't work - on my setup at least. > > However, I should note than for some reason the "lua5" project > did build successfully out of the box. Whatever it does > differently works. > > best > > Arvid > > > > On Tue, Sep 20, 2016 at 7:33 AM, Simon Rit > > wrote: > > I'm not an msvc specialist but your first line suggests that > you have pasted only part of the log: > > 20> Done Building Project > "C:\Users\aplb\Work\RTK\RTK1.2-bin-vs13\SimpleRTK-build\ALL_BUILD.vcxproj" > (default targets) -- FAILED. > > What you need to find out is why this build failed. If the > build fails, the linking cannot work. > Cheers, > Simon > > > On 19/09/2016 19:44, Arvid Piehl Lauritsen B?ttiger wrote: >> I did a complete rebuild, and here is the end of the >> output: http://pastebin.com/hvQ33WWg >> >> I have to admit I'm not sure what to make of it. I should >> note that I'm trying to compile the version I just pulled >> from git earlier today, since the other version I normally >> work with is really old. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 6:50 PM, Simon Rit >> > > wrote: >> >> SimpleRTKCommon is a library generated when compiling. >> Don't you have another error before that which >> explains why it did not compile? >> Simon >> >> On Mon, Sep 19, 2016 at 2:30 PM, Arvid Piehl Lauritsen >> B?ttiger > > wrote: >> >> Hi again. >> >> I've been trying to get it working. However, I did >> run into some problems compiling SimpleRTK. The >> main issue seems to be that it depends on >> SimpleRTKCommon - which I do not have. >> >> Here is the last few lines from VS2013 >> >> > 5>LINK : fatal error LNK1181: cannot open input >> file '..\..\..\lib\Debug\SimpleRTKCommon-0.9.lib' >> [C:\Users\aplb\Work\RTK\RTK1.2- >> > >> bin-vs13\SimpleRTK-build\Code\IO\src\SimpleRTKIO.vcxproj] >> > 5> >> > 5> 0 Warning(s) >> > 5> 2 Error(s) >> > 5> >> > 5> Time Elapsed 00:00:25.26 >> > ========== Build: 4 succeeded, 1 failed, 0 >> up-to-date, 0 skipped ========== >> >> I'm not quite sure what is going on, because the >> only reference I can find to SimpleRTKCommon is >> the CMakeLists.txt on github: >> https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/CMakeLists.txt >> >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:19 AM, Simon Rit >> > > wrote: >> >> The latest MacOS. It's nice if you can test it >> on other platforms, I'll try to run it on >> Linux but I have to upgrade matlab first (I >> think python calls are available starting with >> Matlab 2014). >> Simon >> >> On Mon, Sep 19, 2016 at 11:14 AM, Arvid Piehl >> Lauritsen B?ttiger > > wrote: >> >> Dear Simon >> >> This look very interesting! Which platform >> did you successfully execute this on? >> I will give it a try at once (on windows) >> and let you know if I run into any problems. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:05 AM, Simon >> Rit > > >> wrote: >> >> Dear RTK users, >> I have quickly tested calling the >> SimpleRTK python lib from Matlab and >> it seems to work well: >> http://wiki.openrtk.org/index.php/SimpleRTK#Matlab >> >> Therefore, I don't think we have to >> work on Matlab wrappings but let us >> know if you think otherwise. >> Future works include a simple >> installation mechanism for >> pre-compiled SimpleRTK libraries. >> We'll keep you posted! >> Simon >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> >> >> >> >> > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From w_ettehadi at yahoo.com Mon Nov 7 16:53:54 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Mon, 7 Nov 2016 21:53:54 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Message-ID: <1477848112.17731.1478555634307@mail.yahoo.com> Thanks Cyril for your time and advises. Vahid On Friday, November 4, 2016 2:31 AM, Cyril Mory wrote: Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right? About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question: I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards, Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Philipp.Freislederer at med.uni-muenchen.de Thu Nov 17 05:08:09 2016 From: Philipp.Freislederer at med.uni-muenchen.de (Freislederer, Philipp) Date: Thu, 17 Nov 2016 10:08:09 +0000 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac Message-ID: Dear all, I currently have some issues in generating off-plane projections where I think rtk might be helpful. I am trying to generate projections from an Brainlab ExacTrac geometry. What I am getting is a projection matrix generated by the system itself. Using only this information I am able to project any voxel value in a CT onto a panel. Now, in order to speed everything up a little and not re-implement everything that has been done sufficiently already I am hoping to use 'rtkforwardprojections'. The problem is I am not able to reproduce the Brainlab geometry using 'rtksimulatedgeometry' from the projection matrix directly. I could calculate the room angle of the source to the panel from the projection matrix but I am getting weird results when applying these on something like plastimatch, so I think I have an error in there. Is there a way of creating a geometry simply from the projection matrix or do I have to work around and calculate every parameter needed specifically? Maybe someone has some experience with this type of issue. Thanks in advance! Philipp -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 17 05:27:14 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 17 Nov 2016 11:27:14 +0100 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac In-Reply-To: References: Message-ID: Hi, Yes ! I have actually added that functionality recently from Thibault Notargiacomo's code see bool rtk::ThreeDCircularProjectionGeometry::AddProjection ( const HomogeneousProjectionMatrixType & pMat) Note that the projection matrix must be for a 3D position in mm to a 2D position in mm. You can add pre-/post-matrices to go from mm to voxel. There is no command line tool to do it but you can easily create your command line tool to do it. This is tested in testing/rtkgeometryfrommatrixtest.cxx. Let me know if you need more info, Simon On Thu, Nov 17, 2016 at 11:08 AM, Freislederer, Philipp < Philipp.Freislederer at med.uni-muenchen.de> wrote: > Dear all, > > > > I currently have some issues in generating off-plane projections where I > think rtk might be helpful. > > I am trying to generate projections from an Brainlab ExacTrac geometry. > > What I am getting is a projection matrix generated by the system itself. > Using only this information I am able to project any voxel value in a CT > onto a panel. > > Now, in order to speed everything up a little and not re-implement > everything that has been done sufficiently already I am hoping to use > ?rtkforwardprojections?. > > The problem is I am not able to reproduce the Brainlab geometry using > ?rtksimulatedgeometry? from the projection matrix directly. > > I could calculate the room angle of the source to the panel from the > projection matrix but I am getting weird results when applying these on > something like plastimatch, so I think I have an error in there. > > > > Is there a way of creating a geometry simply from the projection matrix or > do I have to work around and calculate every parameter needed specifically? > > Maybe someone has some experience with this type of issue. > > > > Thanks in advance! > > > > Philipp > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Sat Nov 19 14:51:24 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Sat, 19 Nov 2016 19:51:24 +0000 Subject: [Rtk-users] Geometric calibration Message-ID: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ From simon.rit at creatis.insa-lyon.fr Tue Nov 22 02:01:19 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 22 Nov 2016 08:01:19 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: Message-ID: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper ). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > Hi RTK users, > > I'm interested in reconstructing images acquired by a fluoroscopy system > rotating around a knee phantom. Unfortunately, I've been unsuccessful so > far. I recognize some of the phantom in the reconstructed image, but it > contains double contours and the shape is deformed. > > I think the issue might be incorrect geometry specification. I have images > also including a phantom containing markers for which we know the > coordinates, which should allow us to calibrate the system. On the wiki on > image quality, I saw that some users had developed scripts to do the > calibration? Would someone be willing to share it? > > Kind regards, > Sepp > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: after.pdf Type: application/pdf Size: 5974 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: before.pdf Type: application/pdf Size: 5678 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: calib.py Type: text/x-python Size: 2488 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 23 12:44:11 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 23 Nov 2016 18:44:11 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Andreas, Today we had the RTK training and some users were looking for a XIM file reader. I pointed to your contributions but any chance to have it put in RTK soon? Thanks in advance, Simon On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit wrote: > Hi, > Thanks for sharing. There still seems to be some streak artefacts, do you > see the same in the Varian reconstruction? > I'm looking forward to the pull-request, I think we should try to make the > bzip2 optional. > Simon > > On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < > andreasg at phys.au.dk> wrote: > >> Thanks for the fast response Simon! >> >> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >> right all along! >> I just didn't get why it makes a difference. I think I do now, as the >> resulting image was flipped upside down and not left/right as I expected. >> [attached] >> >> The reconstruction is significantly better, I'll look into what should be >> included in the reader and what I should keep in my program to keep >> conformity with the other readers. Then I'll create a pull request. >> >> Just for the purpose of others hitting the same or a similar bug, I also >> attempted: >> I did the SART reconstruction with 10 iterations, lambda=0.3, and Joseph >> back/forward projection, *but with no* significant improvement [attached] >> >> And: >> If you want you can download the data set from: [Dropbox link to 460MB >> zip (I'll >> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >> is used along with the Scan.xml (Calibrations folder may be used in the >> future in my program, but I'm not sure if you can rely on the existence of >> the content). >> >> A MatLab XimReader is available: link >> (also >> available from Varian bitbucket along a with a python version and a >> C#->matlab plugin >> ). >> Otherwise my fork with the RTK-style reader is available from the same >> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >> so bzip2 is a new dependancy). >> >> Best regards >> Andreas >> >> >> __________________________________ >> >> Andreas Gravgaard Andersen >> >> Department of Oncology, >> >> Aarhus University Hospital >> >> N?rrebrogade 44, >> >> 8000, Aarhus C >> >> Mail: andreasg at phys.au.dk >> >> Cell: +45 3165 8140 >> >> >> >> 2016-09-16 16:13 GMT+02:00 Simon Rit : >> >>> Hi, >>> You can try any iterative reconstruction, they can also handle short >>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>> However, the nature of the artifacts indicate more a problem in the >>> geometry in my opinion. I have seen such errors when, for example, rotating >>> in the wrong direction. I can have a look if you share the dataset. >>> Cheers, >>> Simon >>> >>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>> andreasg at phys.au.dk> wrote: >>> >>>> Thanks for the suggestions, Simon and Cyril! >>>> >>>> I have been carefully looking though the geometry and from what I >>>> understand of the transformations matrices, the geometry looks correct/(as >>>> expected). >>>> >>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>> were because had used half-fan scans (full-arc). >>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>> artifacts occurs! >>>> >>>> Are there other (built-in) means of improving half-arc scans, than the >>>> parker short scan filter? >>>> >>>> Parker short scan does a decent job, but the result is still far from >>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>> >>>> Best regards >>>> Andreas >>>> >>>> >>>> __________________________________ >>>> >>>> Andreas Gravgaard Andersen >>>> >>>> Department of Oncology, >>>> >>>> Aarhus University Hospital >>>> >>>> N?rrebrogade 44, >>>> >>>> 8000, Aarhus C >>>> >>>> Mail: andreasg at phys.au.dk >>>> >>>> Cell: +45 3165 8140 >>>> >>>> >>>> >>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory : >>>> >>>>> One suggestion since it works with the Hnd projections: >>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>> Xim projections) and output two projection stack files and two geometry >>>>> files, then compare the projection stack files by subtracting one to the >>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>> are identical, then I do not see any reason why the reconstructions should >>>>> be different, so my guess is that you will find differences. >>>>> >>>>> >>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>> >>>>>> Hi, >>>>>> I have almost never worked with Varian data but it looks like a >>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>> projections which results in assigning a bad geometry to each >>>>>> projection. How did you name your projections? Maybe check that the >>>>>> order matches that of the RTK geometry file. Otherwise, there might be >>>>>> an issue in the creation of the geometry file itself. >>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>> code when you feel it's ready. >>>>>> Simon >>>>>> >>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>> wrote: >>>>>> >>>>>>> Dear RTK experts, >>>>>>> >>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>> format. I >>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>> available with RTK. >>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>> >>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>> in UI), >>>>>>> however when reconstructing with a regular FDK I get a reconstructed >>>>>>> image >>>>>>> that is smeared out around the high and low density areas [see >>>>>>> attached >>>>>>> image] >>>>>>> >>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>> Scripps >>>>>>> (~520 projections). Fixed detector and source (offset=0) with SID=2m, >>>>>>> SDD=3m. >>>>>>> >>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>> algorithm). >>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>> software works >>>>>>> perfectly. >>>>>>> >>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>> creates >>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>> If the first few projections are excluded, the following projection >>>>>>> will act >>>>>>> the same way. >>>>>>> >>>>>>> The projections are corrected for beam hardening and all the >>>>>>> projections >>>>>>> have the expected attenuation. >>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>> reconstruction >>>>>>> makes the same artifacts. >>>>>>> >>>>>>> Setting the value of the first and last projection to zero has the >>>>>>> same >>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>> not the >>>>>>> artifacts. >>>>>>> >>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>> >>>>>>> Best regards >>>>>>> Andreas >>>>>>> >>>>>>> __________________________________ >>>>>>> >>>>>>> Andreas Gravgaard Andersen >>>>>>> >>>>>>> Department of Oncology, >>>>>>> >>>>>>> Aarhus University Hospital >>>>>>> >>>>>>> N?rrebrogade 44, >>>>>>> >>>>>>> 8000, Aarhus C >>>>>>> >>>>>>> Mail: andreasg at phys.au.dk >>>>>>> >>>>>>> Cell: +45 3165 8140 >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Thu Nov 24 01:34:58 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Thu, 24 Nov 2016 06:34:58 +0000 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: , Message-ID: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Hi Simon, Thanks for the script. I was wondering if you could also share the csv or a dummy file? I'm unsure of what the second column contains. An offset distance to the rotation axis? Or the height? Which distance was known in your example? From the code it looks like the distance to the rotation axis? Sepp On 22 Nov 2016, at 08.01, Simon Rit > wrote: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt > wrote: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 24 01:44:42 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 24 Nov 2016 07:44:42 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> References: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Message-ID: Hi, Enclosed. Column 1 is platform angle, 2 is bb height, 3 is the u coordinate (in pixel) and 4 is the v coordinate (in pixel too). I had approximately measured the source-to-detector (270) and source-to-isocenter (210) distances but they were still optimized to have a better assessment. Simon On Thu, Nov 24, 2016 at 7:34 AM, Sepp de Raedt wrote: > Hi Simon, > > Thanks for the script. I was wondering if you could also share the csv or > a dummy file? I'm unsure of what the second column contains. An offset > distance to the rotation axis? Or the height? > > Which distance was known in your example? From the code it looks like the > distance to the rotation axis? > > Sepp > > On 22 Nov 2016, at 08.01, Simon Rit > wrote: > > Hi Sepp, > I did do a calibration script on a micro CT platform. The idea was that I > had a bb taken from 4 different view points at 4 different heights with a > known distance. Their projected position was segmented beforehand on the > projections and I tried to match the projections by optimizing the > calibration (which we see in before.pdf and after.pdf). I don't think it's > a good script, e.g., because I tried to find 8 parameters when 7 are > sufficient for my system (see, e.g., this paper > ). > But this gives you a starting point to develop your own script which will > hopefully be better. Please share if you do something from it! > Thanks, > Simon > > On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > >> Hi RTK users, >> >> I'm interested in reconstructing images acquired by a fluoroscopy system >> rotating around a knee phantom. Unfortunately, I've been unsuccessful so >> far. I recognize some of the phantom in the reconstructed image, but it >> contains double contours and the shape is deformed. >> >> I think the issue might be incorrect geometry specification. I have >> images also including a phantom containing markers for which we know the >> coordinates, which should allow us to calibrate the system. On the wiki on >> image quality, I saw that some users had developed scripts to do the >> calibration? Would someone be willing to share it? >> >> Kind regards, >> Sepp >> >> ______________________________________________________________________ >> This email has been scanned by the Symantec Email Security.cloud service. >> For more information please visit http://www.symanteccloud.com >> ______________________________________________________________________ >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > > > > > > > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CentroidPositions_H5_to_H25_90degstep.csv Type: text/csv Size: 321 bytes Desc: not available URL: From andreasg at phys.au.dk Fri Nov 25 10:25:55 2016 From: andreasg at phys.au.dk (Andreas Gravgaard Andersen) Date: Fri, 25 Nov 2016 16:25:55 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Simon, I have created a pull-request with the XIM file reader. I'm sorry for being late with the promised pull-request (there were a lot of merge conflicts, so it got postponed). I have cleaned it up, but it is still not flawless as mentioned in the pull-request-message. I have tried to keep the RTK coding-style by creating it as a modified HND file reader, but I have only a year of experience with C++, so I apologize if I've left some ugly code in there.. Best regards Andreas __________________________________ Andreas Gravgaard Andersen Department of Oncology, Aarhus University Hospital N?rrebrogade 44, 8000, Aarhus C Mail: andreasg at phys.au.dk Cell: +45 3165 8140 2016-11-23 18:44 GMT+01:00 Simon Rit : > Dear Andreas, > Today we had the RTK training and some users were looking for a XIM file > reader. I pointed to your contributions but any chance to have it put in > RTK soon? > Thanks in advance, > Simon > > On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit > wrote: > >> Hi, >> Thanks for sharing. There still seems to be some streak artefacts, do you >> see the same in the Varian reconstruction? >> I'm looking forward to the pull-request, I think we should try to make >> the bzip2 optional. >> Simon >> >> On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < >> andreasg at phys.au.dk> wrote: >> >>> Thanks for the fast response Simon! >>> >>> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >>> right all along! >>> I just didn't get why it makes a difference. I think I do now, as the >>> resulting image was flipped upside down and not left/right as I expected. >>> [attached] >>> >>> The reconstruction is significantly better, I'll look into what should >>> be included in the reader and what I should keep in my program to keep >>> conformity with the other readers. Then I'll create a pull request. >>> >>> Just for the purpose of others hitting the same or a similar bug, I also >>> attempted: >>> I did the SART reconstruction with 10 iterations, lambda=0.3, and >>> Joseph back/forward projection, *but with no* significant improvement >>> [attached] >>> >>> And: >>> If you want you can download the data set from: [Dropbox link to 460MB >>> zip (I'll >>> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >>> is used along with the Scan.xml (Calibrations folder may be used in the >>> future in my program, but I'm not sure if you can rely on the existence of >>> the content). >>> >>> A MatLab XimReader is available: link >>> (also >>> available from Varian bitbucket along a with a python version and a >>> C#->matlab plugin >>> ). >>> Otherwise my fork with the RTK-style reader is available from the same >>> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >>> so bzip2 is a new dependancy). >>> >>> Best regards >>> Andreas >>> >>> >>> __________________________________ >>> >>> Andreas Gravgaard Andersen >>> >>> Department of Oncology, >>> >>> Aarhus University Hospital >>> >>> N?rrebrogade 44, >>> >>> 8000, Aarhus C >>> >>> Mail: andreasg at phys.au.dk >>> >>> Cell: +45 3165 8140 >>> >>> >>> >>> 2016-09-16 16:13 GMT+02:00 Simon Rit : >>> >>>> Hi, >>>> You can try any iterative reconstruction, they can also handle short >>>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>>> However, the nature of the artifacts indicate more a problem in the >>>> geometry in my opinion. I have seen such errors when, for example, rotating >>>> in the wrong direction. I can have a look if you share the dataset. >>>> Cheers, >>>> Simon >>>> >>>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>>> andreasg at phys.au.dk> wrote: >>>> >>>>> Thanks for the suggestions, Simon and Cyril! >>>>> >>>>> I have been carefully looking though the geometry and from what I >>>>> understand of the transformations matrices, the geometry looks correct/(as >>>>> expected). >>>>> >>>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>>> were because had used half-fan scans (full-arc). >>>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>>> artifacts occurs! >>>>> >>>>> Are there other (built-in) means of improving half-arc scans, than the >>>>> parker short scan filter? >>>>> >>>>> Parker short scan does a decent job, but the result is still far from >>>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>>> >>>>> Best regards >>>>> Andreas >>>>> >>>>> >>>>> __________________________________ >>>>> >>>>> Andreas Gravgaard Andersen >>>>> >>>>> Department of Oncology, >>>>> >>>>> Aarhus University Hospital >>>>> >>>>> N?rrebrogade 44, >>>>> >>>>> 8000, Aarhus C >>>>> >>>>> Mail: andreasg at phys.au.dk >>>>> >>>>> Cell: +45 3165 8140 >>>>> >>>>> >>>>> >>>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory >>>>> : >>>>> >>>>>> One suggestion since it works with the Hnd projections: >>>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>>> Xim projections) and output two projection stack files and two geometry >>>>>> files, then compare the projection stack files by subtracting one to the >>>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>>> are identical, then I do not see any reason why the reconstructions should >>>>>> be different, so my guess is that you will find differences. >>>>>> >>>>>> >>>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>>> >>>>>>> Hi, >>>>>>> I have almost never worked with Varian data but it looks like a >>>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>>> projections which results in assigning a bad geometry to each >>>>>>> projection. How did you name your projections? Maybe check that the >>>>>>> order matches that of the RTK geometry file. Otherwise, there might >>>>>>> be >>>>>>> an issue in the creation of the geometry file itself. >>>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>>> code when you feel it's ready. >>>>>>> Simon >>>>>>> >>>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>>> wrote: >>>>>>> >>>>>>>> Dear RTK experts, >>>>>>>> >>>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>>> format. I >>>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>>> available with RTK. >>>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>>> >>>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>>> in UI), >>>>>>>> however when reconstructing with a regular FDK I get a >>>>>>>> reconstructed image >>>>>>>> that is smeared out around the high and low density areas [see >>>>>>>> attached >>>>>>>> image] >>>>>>>> >>>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>>> Scripps >>>>>>>> (~520 projections). Fixed detector and source (offset=0) with >>>>>>>> SID=2m, >>>>>>>> SDD=3m. >>>>>>>> >>>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>>> algorithm). >>>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>>> software works >>>>>>>> perfectly. >>>>>>>> >>>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>>> creates >>>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>>> If the first few projections are excluded, the following projection >>>>>>>> will act >>>>>>>> the same way. >>>>>>>> >>>>>>>> The projections are corrected for beam hardening and all the >>>>>>>> projections >>>>>>>> have the expected attenuation. >>>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>>> reconstruction >>>>>>>> makes the same artifacts. >>>>>>>> >>>>>>>> Setting the value of the first and last projection to zero has the >>>>>>>> same >>>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>>> not the >>>>>>>> artifacts. >>>>>>>> >>>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>>> >>>>>>>> Best regards >>>>>>>> Andreas >>>>>>>> >>>>>>>> __________________________________ >>>>>>>> >>>>>>>> Andreas Gravgaard Andersen >>>>>>>> >>>>>>>> Department of Oncology, >>>>>>>> >>>>>>>> Aarhus University Hospital >>>>>>>> >>>>>>>> N?rrebrogade 44, >>>>>>>> >>>>>>>> 8000, Aarhus C >>>>>>>> >>>>>>>> Mail: andreasg at phys.au.dk >>>>>>>> >>>>>>>> Cell: +45 3165 8140 >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rtk-users mailing list >>>>>>>> Rtk-users at public.kitware.com >>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From w_ettehadi at yahoo.com Tue Nov 1 12:50:12 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Tue, 1 Nov 2016 16:50:12 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> Message-ID: <1400014065.1872614.1478019012480@mail.yahoo.com> Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards,Vahid -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 02:53:39 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 07:53:39 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1400014065.1872614.1478019012480@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> Message-ID: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: > Hello RTK users and developers, > > I already implemented the RTK and reconstructed some images with the > FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. > Now, I am trying to develop a model-based image reconstruction for our > cone-beam micro-CT. I see already that some iterative algorithms like > ART and its modifications and conjugate-gradient (CG) method are > implemented in the RTK. I want to develop a model-based reconstruction > through the Newton/quasi-Newton optimizations methods. I was wondering > is it possible to extract the gradient of least square function from > implemented algorithms like CG module? Any recommendation will be > appreciated. > > Best Regards, > Vahid > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Wed Nov 2 04:01:30 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 08:01:30 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have tried but I am not getting where to give --division 4 in my code. Please find my code given below and please let me know where I need to change in my code to make it work. int _tmain(int argc, _TCHAR* argv[]) { #pragma region "Variable declaration" const double PI = 3.14159265358979323846; float *angles; int nProj = 349; typedef unsigned short pixelType; typedef float OutpixelType; const int dimension = 3; typedef itk::Image imageType; typedef itk::ImageRegionConstIterator ImageIteratorType; imageType::Pointer Projections = imageType::New(); #pragma endregion "Variable declaration" Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); imageType::SpacingType pSpacing; pSpacing[0] = 0.2960; pSpacing[1] = 0.2960; pSpacing[2] = 0.2960; Projections->SetSpacing(pSpacing); imageType::PointType pOrigin; pOrigin[0] = -212.972; pOrigin[1] = -212.972; pOrigin[2] = -212.972; //-158.50; Projections->SetOrigin(pOrigin); Projections->Update(); //Read angles. char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; angles = new float[nProj]; angles = readAngles(angles_file, angles); #pragma region"Geometry" // Geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); for (unsigned int noProj = 0; noProj < nProj; noProj++) { geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // } typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); geometryWriter->SetFilename("D:\\geo.xml"); geometryWriter->SetObject(geometry); geometryWriter->WriteFile(); geometry->Update(); #pragma endregion "Geometry" //Define output image type #ifdef USE_CUDA typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #else typedef itk::Image OutPutImageType; typedef rtk::ParkerShortScanImageFilter PSSFType; typedef rtk::FDKConeBeamReconstructionFilter FDKType; #endif //ScatterCorrection typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); ScatterCorrection->SetInput(Projections); //VarianObiRawImageFilter typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); //Create the output image typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; ConstantImageSourceType::PointType origin_p; ConstantImageSourceType::SizeType size_p; ConstantImageSourceType::SpacingType spacing_p; ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); origin_p[0] = -127.5; origin_p[1] = -127.5; origin_p[2] = -127.5; size_p[0] = 512; size_p[1] = 512; size_p[2] = 512; spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); projectionsSource->SetOrigin(origin_p); projectionsSource->SetSpacing(spacing_p); projectionsSource->SetSize(size_p); projectionsSource->SetConstant(0); // Short scan image filter PSSFType::Pointer pssf = PSSFType::New(); pssf->SetInput(AttenuationFilter->GetOutput()); pssf->SetGeometry(geometry); pssf->InPlaceOff(); std::cout << "short scan image filter success" << std::endl; FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput(0, projectionsSource->GetOutput()); feldkamp->SetInput(1, pssf->GetOutput()); feldkamp->SetGeometry(geometry); feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); feldkamp->GetRampFilter()->SetHammingFrequency(5.0); feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); feldkamp->SetGPUEnabled(1); feldkamp->SetNumberOfThreads(10000); #pragma region "Write volume" //Create a raw io for writing itk::RawImageIO::Pointer io; io = itk::RawImageIO::New(); for (unsigned int i = 0; i < dimension; i++) { io->SetDimensions(i, size_p[i]); io->SetSpacing(i, spacing_p[i]); io->SetOrigin(i, origin_p[i]); } io->SetHeaderSize(0); io->SetByteOrderToLittleEndian(); io->SetPixelType(itk::ImageIOBase::SCALAR); io->SetNumberOfComponents(1); io->SetNumberOfDimensions(3); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(feldkamp->GetOutput()); try { writer->Update(); } catch (itk::ExceptionObject & excp) { std::cerr << "Error while writing the image " << std::endl; std::cerr << excp << std::endl; getchar(); } #pragma endregion "WriteVolume" delete[] angles; return 0; } Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > I was able to perform a reconstruction from your header and geometry > file, using the following command lines: > > rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > --phantomscale "128,128,128" --like Output.mhd > > rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > The first computes projections through a Shepp & Logan phantom, with the > same size, spacing, origin, etc... as your projections, using your > geometry file geo.xml. > > The second line performs the FDK reconstruction. I had to use both the > "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > on a Geforce GTX 780). "--lowmem" loads the projections into memory by > subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > parts, reconstructs them one by one, then assembles the results. Can you > run the same commands and let us know whether you still encounter the > crash you mentioned ? If it works, you can use your own projection data > in the second command line instead of "simulatedprojections.mha". > > Best, > > Cyril > > On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > > Dear Sir, > > > > Please find the Header file in the attachment. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> We do not need the projections file, at least not for a first stage of > >> error tracking. We only need the header. > >> Try the following command line: > >> > >> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >> > >> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >> what we need, and it is a very light text file. The "proj.raw" contains > >> the pixel values, but at the moment we do not need them. We will create > >> our own proj.raw file, filled with zeros, which should be enough to > >> track down the error you encounter. > >> > >> Looking forward to receiving your file, > >> Cyril > >> > >> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>> Dear Sir, > >>> > >>> The single raw file of the projections is 1.4 GB and we are > not > >> able to send this big file to you. Can you please suggest other > alternatives > >> for this? > >>> Or can you provide us the PC configuration to solve the > issue? > >>> > >>> Let me know if any other clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Hello Zahid, > >>>> > >>>> We will need the header of your projections file, too (It is best if > you > >>>> have all your projections as a single .mhd and a single .raw file, so > it > >>>> should be 3-D image, and you send only the .mhd file). > >>>> > >>>> Regards, > >>>> Cyril > >>>> > >>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> > >>>>> I have only used RTK version 1.3.0. but in the error > >>>> message it is showing RTK version 1.2.0. > >>>>> Please find the attachment of the geometry file of > our > >>>> projections. > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> Without some more information, it's unlikely that we find the source > of > >>>>>> the problem. Here are a few things you can do to help us (and > therefore > >>>>>> yourself): > >>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > the > >>>>>> Cuda forward and back projection filters since v1.2.0, so your > problem > >>>>>> might disappear just by upgrading to the new version > >>>>>> - create a small example that reproduces your problem. You can, for > >>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>> example). And send us the script > >>>>>> - OR send us your geometry file and the header of your projections > file > >>>>>> (no need to send the projection data itself, we'll create a > zero-filled > >>>>>> stack of projections), and the command line that crashes > >>>>>> > >>>>>> Best regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Simon Rit, > >>>>>>> > >>>>>>> Please find the screen shot in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> Senior Design Engineer > >>>>>>> Mobile No. +91-9738379729 > >>>>>>> > >>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>> http://www.panaceamedical.com > >>>>>>> Bangalore - India. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>> Cc: rtk-users at public.kitware.com > >> [mailto:rtk-users at public.kitware.com], > >>>>>> saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>> memory > >>>>>>>> error. If you use the command line tool rtkfdk, you should first > make > >>>>>> sure > >>>>>>>> that you use the --lowmem option to stream the projection images. > If > >> it > >>>>>> is > >>>>>>>> no sufficient, you can split your volume using the --divisions. The > >>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of > >> RTK > >>>> on > >>>>>>>> our case studies webpage > >>>>>> . > >>>>>>>> Simon > >>>>>>>> > >>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>> > >>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>> > >>>>>>>>>> I am unable to do 1024x1024x1024 > reconstruction > >>>> using > >>>>>> RTK > >>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > shoot > >> of > >>>>>>>>> the > >>>>>>>>>> same. > >>>>>>>>>> > >>>>>>>>>> I am using the following items given below. > >>>>>>>>>> > >>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >> application > >>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>> 5. CUDA 7. > >>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>> > >>>>>>>>>> Please provide the solution of this and let me > >> know > >>>> if > >>>>>>>> any > >>>>>>>>>> other clarification is required. > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> Thanks & Regards > >>>>>>>>>> > >>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>> Senior Design Engineer > >>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>> > >>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>> Bangalore - India. > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> ____________________________________________________________ > >>>>>>>>> ________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> Rtk-users mailing list > >>>>>>> Rtk-users at public.kitware.com > >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 04:33:32 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 09:33:32 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> References: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Message-ID: <398170fb-a69e-9781-73d5-2a419542d06d@creatis.insa-lyon.fr> Dear Zahid, The --divisions is an option of the command-line application rtkfdk. It is not directly an option of the FDKConeBeamReconstructionFilter : rather, it is passed to a streaming filter at the end of the pipeline. Look for the following bit of code in rtkfdk.cxx : // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput( pfeldkamp ); streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); You can find information on how a streaming filter works on this page: https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html I hope it helps, Cyril On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have tried but I am not getting where to give --division 4 in my code. > > > Please find my code given below and please let me know where I need to change in my code to make it work. > > > int _tmain(int argc, _TCHAR* argv[]) > { > #pragma region "Variable declaration" > const double PI = 3.14159265358979323846; > float *angles; > int nProj = 349; > typedef unsigned short pixelType; > typedef float OutpixelType; > const int dimension = 3; > typedef itk::Image imageType; > typedef itk::ImageRegionConstIterator ImageIteratorType; > imageType::Pointer Projections = imageType::New(); > > #pragma endregion "Variable declaration" > > Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > imageType::SpacingType pSpacing; > pSpacing[0] = 0.2960; > pSpacing[1] = 0.2960; > pSpacing[2] = 0.2960; > Projections->SetSpacing(pSpacing); > > imageType::PointType pOrigin; > pOrigin[0] = -212.972; > pOrigin[1] = -212.972; > pOrigin[2] = -212.972; //-158.50; > Projections->SetOrigin(pOrigin); > > Projections->Update(); > > //Read angles. > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > angles = new float[nProj]; > angles = readAngles(angles_file, angles); > > #pragma region"Geometry" > // Geometry object > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > GeometryType::Pointer geometry = GeometryType::New(); > for (unsigned int noProj = 0; noProj < nProj; noProj++) > { > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // > } > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > geometryWriter->SetFilename("D:\\geo.xml"); > geometryWriter->SetObject(geometry); > geometryWriter->WriteFile(); > geometry->Update(); > #pragma endregion "Geometry" > > //Define output image type > > #ifdef USE_CUDA > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > #else > typedef itk::Image OutPutImageType; > typedef rtk::ParkerShortScanImageFilter PSSFType; > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > #endif > > //ScatterCorrection > typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); > ScatterCorrection->SetInput(Projections); > > //VarianObiRawImageFilter > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; > RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > //Create the output image > typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; > ConstantImageSourceType::PointType origin_p; > ConstantImageSourceType::SizeType size_p; > ConstantImageSourceType::SpacingType spacing_p; > ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); > origin_p[0] = -127.5; > origin_p[1] = -127.5; > origin_p[2] = -127.5; > size_p[0] = 512; > size_p[1] = 512; > size_p[2] = 512; > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > projectionsSource->SetOrigin(origin_p); > projectionsSource->SetSpacing(spacing_p); > projectionsSource->SetSize(size_p); > projectionsSource->SetConstant(0); > > // Short scan image filter > PSSFType::Pointer pssf = PSSFType::New(); > pssf->SetInput(AttenuationFilter->GetOutput()); > pssf->SetGeometry(geometry); > pssf->InPlaceOff(); > std::cout << "short scan image filter success" << std::endl; > > FDKType::Pointer feldkamp = FDKType::New(); > feldkamp->SetInput(0, projectionsSource->GetOutput()); > feldkamp->SetInput(1, pssf->GetOutput()); > feldkamp->SetGeometry(geometry); > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > feldkamp->SetGPUEnabled(1); > feldkamp->SetNumberOfThreads(10000); > > #pragma region "Write volume" > > //Create a raw io for writing > > itk::RawImageIO::Pointer io; > io = itk::RawImageIO::New(); > > for (unsigned int i = 0; i < dimension; i++) > { > io->SetDimensions(i, size_p[i]); > io->SetSpacing(i, spacing_p[i]); > io->SetOrigin(i, origin_p[i]); > } > io->SetHeaderSize(0); > io->SetByteOrderToLittleEndian(); > io->SetPixelType(itk::ImageIOBase::SCALAR); > io->SetNumberOfComponents(1); > io->SetNumberOfDimensions(3); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(feldkamp->GetOutput()); > > try > { > writer->Update(); > } > catch (itk::ExceptionObject & excp) > { > std::cerr << "Error while writing the image " << std::endl; > std::cerr << excp << std::endl; > getchar(); > } > #pragma endregion "WriteVolume" > delete[] angles; > return 0; > } > > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> I was able to perform a reconstruction from your header and geometry >> file, using the following command lines: >> >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> --phantomscale "128,128,128" --like Output.mhd >> >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> >> The first computes projections through a Shepp & Logan phantom, with the >> same size, spacing, origin, etc... as your projections, using your >> geometry file geo.xml. >> >> The second line performs the FDK reconstruction. I had to use both the >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> parts, reconstructs them one by one, then assembles the results. Can you >> run the same commands and let us know whether you still encounter the >> crash you mentioned ? If it works, you can use your own projection data >> in the second command line instead of "simulatedprojections.mha". >> >> Best, >> >> Cyril >> >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> >>> Dear Sir, >>> >>> Please find the Header file in the attachment. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> We do not need the projections file, at least not for a first stage of >>>> error tracking. We only need the header. >>>> Try the following command line: >>>> >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>> >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>> what we need, and it is a very light text file. The "proj.raw" contains >>>> the pixel values, but at the moment we do not need them. We will create >>>> our own proj.raw file, filled with zeros, which should be enough to >>>> track down the error you encounter. >>>> >>>> Looking forward to receiving your file, >>>> Cyril >>>> >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>> Dear Sir, >>>>> >>>>> The single raw file of the projections is 1.4 GB and we are >> not >>>> able to send this big file to you. Can you please suggest other >> alternatives >>>> for this? >>>>> Or can you provide us the PC configuration to solve the >> issue? >>>>> Let me know if any other clarification is required. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Hello Zahid, >>>>>> >>>>>> We will need the header of your projections file, too (It is best if >> you >>>>>> have all your projections as a single .mhd and a single .raw file, so >> it >>>>>> should be 3-D image, and you send only the .mhd file). >>>>>> >>>>>> Regards, >>>>>> Cyril >>>>>> >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>> Dear Cyril Mory, >>>>>>> >>>>>>> >>>>>>> I have only used RTK version 1.3.0. but in the error >>>>>> message it is showing RTK version 1.2.0. >>>>>>> Please find the attachment of the geometry file of >> our >>>>>> projections. >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> Without some more information, it's unlikely that we find the source >> of >>>>>>>> the problem. Here are a few things you can do to help us (and >> therefore >>>>>>>> yourself): >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >> the >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >> problem >>>>>>>> might disappear just by upgrading to the new version >>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>> example). And send us the script >>>>>>>> - OR send us your geometry file and the header of your projections >> file >>>>>>>> (no need to send the projection data itself, we'll create a >> zero-filled >>>>>>>> stack of projections), and the command line that crashes >>>>>>>> >>>>>>>> Best regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Simon Rit, >>>>>>>>> >>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> Senior Design Engineer >>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>> >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>> http://www.panaceamedical.com >>>>>>>>> Bangalore - India. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>> Cc: rtk-users at public.kitware.com >>>> [mailto:rtk-users at public.kitware.com], >>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>> memory >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >> make >>>>>>>> sure >>>>>>>>>> that you use the --lowmem option to stream the projection images. >> If >>>> it >>>>>>>> is >>>>>>>>>> no sufficient, you can split your volume using the --divisions. The >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of >>>> RTK >>>>>> on >>>>>>>>>> our case studies webpage >>>>>>>> . >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>> >>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>> >>>>>>>>>>>> I am unable to do 1024x1024x1024 >> reconstruction >>>>>> using >>>>>>>> RTK >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >> shoot >>>> of >>>>>>>>>>> the >>>>>>>>>>>> same. >>>>>>>>>>>> >>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>> >>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>> application >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>> >>>>>>>>>>>> Please provide the solution of this and let me >>>> know >>>>>> if >>>>>>>>>> any >>>>>>>>>>>> other clarification is required. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>> >>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>> >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>> Bangalore - India. >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>> ________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rtk-users mailing list >>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 06:57:15 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 10:57:15 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. Please check my modified file writer code given below. // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput(feldkamp->GetOutput()); streamerBP->SetNumberOfStreamDivisions(4); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(streamerBP->GetOutput()); writer->SetNumberOfStreamDivisions(4); Please let me know if any clarification is required. Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The --divisions is an option of the command-line application rtkfdk. It > is not directly an option of the FDKConeBeamReconstructionFilter : > rather, it is passed to a streaming filter at the end of the pipeline. > Look for the following bit of code in rtkfdk.cxx : > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter CPUOutputImageType> StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput( pfeldkamp ); > streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > > You can find information on how a streaming filter works on this page: > > https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > I hope it helps, > > Cyril > > On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have tried but I am not getting where to give > --division 4 in my code. > > > > > > Please find my code given below and please let me know > where I need to change in my code to make it work. > > > > > > int _tmain(int argc, _TCHAR* argv[]) > > { > > #pragma region "Variable declaration" > > const double PI = 3.14159265358979323846; > > float *angles; > > int nProj = 349; > > typedef unsigned short pixelType; > > typedef float OutpixelType; > > const int dimension = 3; > > typedef itk::Image imageType; > > typedef itk::ImageRegionConstIterator ImageIteratorType; > > imageType::Pointer Projections = imageType::New(); > > > > #pragma endregion "Variable declaration" > > > > Projections = > ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > > imageType::SpacingType pSpacing; > > pSpacing[0] = 0.2960; > > pSpacing[1] = 0.2960; > > pSpacing[2] = 0.2960; > > Projections->SetSpacing(pSpacing); > > > > imageType::PointType pOrigin; > > pOrigin[0] = -212.972; > > pOrigin[1] = -212.972; > > pOrigin[2] = -212.972; //-158.50; > > Projections->SetOrigin(pOrigin); > > > > Projections->Update(); > > > > //Read angles. > > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > angles = new float[nProj]; > > angles = readAngles(angles_file, angles); > > > > #pragma region"Geometry" > > // Geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > for (unsigned int noProj = 0; noProj < nProj; noProj++) > > { > > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); > // 136 half fan //2.07 Kidwai // > > } > > > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > GeometryWriterType; > > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > > geometryWriter->SetFilename("D:\\geo.xml"); > > geometryWriter->SetObject(geometry); > > geometryWriter->WriteFile(); > > geometry->Update(); > > #pragma endregion "Geometry" > > > > //Define output image type > > > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef itk::Image OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter PSSFType; > > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > > #endif > > > > //ScatterCorrection > > typedef rtk::BoellaardScatterCorrectionImageFilter > BoellaardScatterCorrectionImageFilterType; > > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > BoellaardScatterCorrectionImageFilterType::New(); > > ScatterCorrection->SetInput(Projections); > > > > //VarianObiRawImageFilter > > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > RawImageFilterType; > > RawImageFilterType::Pointer AttenuationFilter = > RawImageFilterType::New(); > > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > > > //Create the output image > > typedef rtk::ConstantImageSource< OutPutImageType > > ConstantImageSourceType; > > ConstantImageSourceType::PointType origin_p; > > ConstantImageSourceType::SizeType size_p; > > ConstantImageSourceType::SpacingType spacing_p; > > ConstantImageSourceType::Pointer projectionsSource = > ConstantImageSourceType::New(); > > origin_p[0] = -127.5; > > origin_p[1] = -127.5; > > origin_p[2] = -127.5; > > size_p[0] = 512; > > size_p[1] = 512; > > size_p[2] = 512; > > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > > > projectionsSource->SetOrigin(origin_p); > > projectionsSource->SetSpacing(spacing_p); > > projectionsSource->SetSize(size_p); > > projectionsSource->SetConstant(0); > > > > // Short scan image filter > > PSSFType::Pointer pssf = PSSFType::New(); > > pssf->SetInput(AttenuationFilter->GetOutput()); > > pssf->SetGeometry(geometry); > > pssf->InPlaceOff(); > > std::cout << "short scan image filter success" << std::endl; > > > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput(0, projectionsSource->GetOutput()); > > feldkamp->SetInput(1, pssf->GetOutput()); > > feldkamp->SetGeometry(geometry); > > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > feldkamp->SetGPUEnabled(1); > > feldkamp->SetNumberOfThreads(10000); > > > > #pragma region "Write volume" > > > > //Create a raw io for writing > > > > itk::RawImageIO::Pointer io; > > io = itk::RawImageIO::New(); > > > > for (unsigned int i = 0; i < dimension; i++) > > { > > io->SetDimensions(i, size_p[i]); > > io->SetSpacing(i, spacing_p[i]); > > io->SetOrigin(i, origin_p[i]); > > } > > io->SetHeaderSize(0); > > io->SetByteOrderToLittleEndian(); > > io->SetPixelType(itk::ImageIOBase::SCALAR); > > io->SetNumberOfComponents(1); > > io->SetNumberOfDimensions(3); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(feldkamp->GetOutput()); > > > > try > > { > > writer->Update(); > > } > > catch (itk::ExceptionObject & excp) > > { > > std::cerr << "Error while writing the image " << std::endl; > > std::cerr << excp << std::endl; > > getchar(); > > } > > #pragma endregion "WriteVolume" > > delete[] angles; > > return 0; > > } > > > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> I was able to perform a reconstruction from your header and geometry > >> file, using the following command lines: > >> > >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >> --phantomscale "128,128,128" --like Output.mhd > >> > >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >> > >> The first computes projections through a Shepp & Logan phantom, with the > >> same size, spacing, origin, etc... as your projections, using your > >> geometry file geo.xml. > >> > >> The second line performs the FDK reconstruction. I had to use both the > >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >> parts, reconstructs them one by one, then assembles the results. Can you > >> run the same commands and let us know whether you still encounter the > >> crash you mentioned ? If it works, you can use your own projection data > >> in the second command line instead of "simulatedprojections.mha". > >> > >> Best, > >> > >> Cyril > >> > >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >> > >>> Dear Sir, > >>> > >>> Please find the Header file in the attachment. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> We do not need the projections file, at least not for a first stage of > >>>> error tracking. We only need the header. > >>>> Try the following command line: > >>>> > >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>> > >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>> what we need, and it is a very light text file. The "proj.raw" contains > >>>> the pixel values, but at the moment we do not need them. We will create > >>>> our own proj.raw file, filled with zeros, which should be enough to > >>>> track down the error you encounter. > >>>> > >>>> Looking forward to receiving your file, > >>>> Cyril > >>>> > >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Sir, > >>>>> > >>>>> The single raw file of the projections is 1.4 GB and we > are > >> not > >>>> able to send this big file to you. Can you please suggest other > >> alternatives > >>>> for this? > >>>>> Or can you provide us the PC configuration to solve the > >> issue? > >>>>> Let me know if any other clarification is required. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Hello Zahid, > >>>>>> > >>>>>> We will need the header of your projections file, too (It is best if > >> you > >>>>>> have all your projections as a single .mhd and a single .raw file, so > >> it > >>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>> > >>>>>> Regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Cyril Mory, > >>>>>>> > >>>>>>> > >>>>>>> I have only used RTK version 1.3.0. but in the > error > >>>>>> message it is showing RTK version 1.2.0. > >>>>>>> Please find the attachment of the geometry file > of > >> our > >>>>>> projections. > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> Without some more information, it's unlikely that we find the > source > >> of > >>>>>>>> the problem. Here are a few things you can do to help us (and > >> therefore > >>>>>>>> yourself): > >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > >> the > >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >> problem > >>>>>>>> might disappear just by upgrading to the new version > >>>>>>>> - create a small example that reproduces your problem. You can, for > >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>> example). And send us the script > >>>>>>>> - OR send us your geometry file and the header of your projections > >> file > >>>>>>>> (no need to send the projection data itself, we'll create a > >> zero-filled > >>>>>>>> stack of projections), and the command line that crashes > >>>>>>>> > >>>>>>>> Best regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Simon Rit, > >>>>>>>>> > >>>>>>>>> Please find the screen shot in the attachment. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> Senior Design Engineer > >>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>> > >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>> http://www.panaceamedical.com > >>>>>>>>> Bangalore - India. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>> Cc: rtk-users at public.kitware.com > >>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>>>> memory > >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first > >> make > >>>>>>>> sure > >>>>>>>>>> that you use the --lowmem option to stream the projection images. > >> If > >>>> it > >>>>>>>> is > >>>>>>>>>> no sufficient, you can split your volume using the --divisions. > The > >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > of > >>>> RTK > >>>>>> on > >>>>>>>>>> our case studies webpage > >>>>>>>> . > >>>>>>>>>> Simon > >>>>>>>>>> > >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>> > >>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>> > >>>>>>>>>>>> I am unable to do 1024x1024x1024 > >> reconstruction > >>>>>> using > >>>>>>>> RTK > >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >> shoot > >>>> of > >>>>>>>>>>> the > >>>>>>>>>>>> same. > >>>>>>>>>>>> > >>>>>>>>>>>> I am using the following items given below. > >>>>>>>>>>>> > >>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>> application > >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>> > >>>>>>>>>>>> Please provide the solution of this and let > me > >>>> know > >>>>>> if > >>>>>>>>>> any > >>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>> > >>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>> > >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>> ________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 08:27:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 13:27:18 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> References: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Message-ID: <84154ed0-3cb8-abf7-c253-3162d78bf7b7@creatis.insa-lyon.fr> I see two errors: Remove this line writer->SetNumberOfStreamDivisions(4); since only the streaming filter, not the write filter, needs to know about the number of divisions. And change the filename to "D:\\Output.mhd" It will write both the .mhd and the .raw files. I hope it helps, Cyril On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. > > Please check my modified file writer code given below. > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput(feldkamp->GetOutput()); > streamerBP->SetNumberOfStreamDivisions(4); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(streamerBP->GetOutput()); > writer->SetNumberOfStreamDivisions(4); > > > Please let me know if any clarification is required. > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> The --divisions is an option of the command-line application rtkfdk. It >> is not directly an option of the FDKConeBeamReconstructionFilter : >> rather, it is passed to a streaming filter at the end of the pipeline. >> Look for the following bit of code in rtkfdk.cxx : >> >> // Streaming depending on streaming capability of writer >> typedef itk::StreamingImageFilter> CPUOutputImageType> StreamerType; >> StreamerType::Pointer streamerBP = StreamerType::New(); >> streamerBP->SetInput( pfeldkamp ); >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >> >> You can find information on how a streaming filter works on this page: >> >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> >> I hope it helps, >> >> Cyril >> >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have tried but I am not getting where to give >> --division 4 in my code. >>> >>> Please find my code given below and please let me know >> where I need to change in my code to make it work. >>> >>> int _tmain(int argc, _TCHAR* argv[]) >>> { >>> #pragma region "Variable declaration" >>> const double PI = 3.14159265358979323846; >>> float *angles; >>> int nProj = 349; >>> typedef unsigned short pixelType; >>> typedef float OutpixelType; >>> const int dimension = 3; >>> typedef itk::Image imageType; >>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>> imageType::Pointer Projections = imageType::New(); >>> >>> #pragma endregion "Variable declaration" >>> >>> Projections = >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); >>> imageType::SpacingType pSpacing; >>> pSpacing[0] = 0.2960; >>> pSpacing[1] = 0.2960; >>> pSpacing[2] = 0.2960; >>> Projections->SetSpacing(pSpacing); >>> >>> imageType::PointType pOrigin; >>> pOrigin[0] = -212.972; >>> pOrigin[1] = -212.972; >>> pOrigin[2] = -212.972; //-158.50; >>> Projections->SetOrigin(pOrigin); >>> >>> Projections->Update(); >>> >>> //Read angles. >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>> angles = new float[nProj]; >>> angles = readAngles(angles_file, angles); >>> >>> #pragma region"Geometry" >>> // Geometry object >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> GeometryType::Pointer geometry = GeometryType::New(); >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>> { >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); >> // 136 half fan //2.07 Kidwai // >>> } >>> >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> GeometryWriterType; >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>> geometryWriter->SetFilename("D:\\geo.xml"); >>> geometryWriter->SetObject(geometry); >>> geometryWriter->WriteFile(); >>> geometry->Update(); >>> #pragma endregion "Geometry" >>> >>> //Define output image type >>> >>> #ifdef USE_CUDA >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> #else >>> typedef itk::Image OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>> #endif >>> >>> //ScatterCorrection >>> typedef rtk::BoellaardScatterCorrectionImageFilter >> BoellaardScatterCorrectionImageFilterType; >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >> BoellaardScatterCorrectionImageFilterType::New(); >>> ScatterCorrection->SetInput(Projections); >>> >>> //VarianObiRawImageFilter >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> RawImageFilterType; >>> RawImageFilterType::Pointer AttenuationFilter = >> RawImageFilterType::New(); >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>> >>> //Create the output image >>> typedef rtk::ConstantImageSource< OutPutImageType > >> ConstantImageSourceType; >>> ConstantImageSourceType::PointType origin_p; >>> ConstantImageSourceType::SizeType size_p; >>> ConstantImageSourceType::SpacingType spacing_p; >>> ConstantImageSourceType::Pointer projectionsSource = >> ConstantImageSourceType::New(); >>> origin_p[0] = -127.5; >>> origin_p[1] = -127.5; >>> origin_p[2] = -127.5; >>> size_p[0] = 512; >>> size_p[1] = 512; >>> size_p[2] = 512; >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>> >>> projectionsSource->SetOrigin(origin_p); >>> projectionsSource->SetSpacing(spacing_p); >>> projectionsSource->SetSize(size_p); >>> projectionsSource->SetConstant(0); >>> >>> // Short scan image filter >>> PSSFType::Pointer pssf = PSSFType::New(); >>> pssf->SetInput(AttenuationFilter->GetOutput()); >>> pssf->SetGeometry(geometry); >>> pssf->InPlaceOff(); >>> std::cout << "short scan image filter success" << std::endl; >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>> feldkamp->SetInput(1, pssf->GetOutput()); >>> feldkamp->SetGeometry(geometry); >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>> feldkamp->SetGPUEnabled(1); >>> feldkamp->SetNumberOfThreads(10000); >>> >>> #pragma region "Write volume" >>> >>> //Create a raw io for writing >>> >>> itk::RawImageIO::Pointer io; >>> io = itk::RawImageIO::New(); >>> >>> for (unsigned int i = 0; i < dimension; i++) >>> { >>> io->SetDimensions(i, size_p[i]); >>> io->SetSpacing(i, spacing_p[i]); >>> io->SetOrigin(i, origin_p[i]); >>> } >>> io->SetHeaderSize(0); >>> io->SetByteOrderToLittleEndian(); >>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>> io->SetNumberOfComponents(1); >>> io->SetNumberOfDimensions(3); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(feldkamp->GetOutput()); >>> >>> try >>> { >>> writer->Update(); >>> } >>> catch (itk::ExceptionObject & excp) >>> { >>> std::cerr << "Error while writing the image " << std::endl; >>> std::cerr << excp << std::endl; >>> getchar(); >>> } >>> #pragma endregion "WriteVolume" >>> delete[] angles; >>> return 0; >>> } >>> >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> I was able to perform a reconstruction from your header and geometry >>>> file, using the following command lines: >>>> >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>> --phantomscale "128,128,128" --like Output.mhd >>>> >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>> >>>> The first computes projections through a Shepp & Logan phantom, with the >>>> same size, spacing, origin, etc... as your projections, using your >>>> geometry file geo.xml. >>>> >>>> The second line performs the FDK reconstruction. I had to use both the >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>> parts, reconstructs them one by one, then assembles the results. Can you >>>> run the same commands and let us know whether you still encounter the >>>> crash you mentioned ? If it works, you can use your own projection data >>>> in the second command line instead of "simulatedprojections.mha". >>>> >>>> Best, >>>> >>>> Cyril >>>> >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>> >>>>> Dear Sir, >>>>> >>>>> Please find the Header file in the attachment. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> We do not need the projections file, at least not for a first stage of >>>>>> error tracking. We only need the header. >>>>>> Try the following command line: >>>>>> >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>> >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>> what we need, and it is a very light text file. The "proj.raw" contains >>>>>> the pixel values, but at the moment we do not need them. We will create >>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>> track down the error you encounter. >>>>>> >>>>>> Looking forward to receiving your file, >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>> Dear Sir, >>>>>>> >>>>>>> The single raw file of the projections is 1.4 GB and we >> are >>>> not >>>>>> able to send this big file to you. Can you please suggest other >>>> alternatives >>>>>> for this? >>>>>>> Or can you provide us the PC configuration to solve the >>>> issue? >>>>>>> Let me know if any other clarification is required. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Hello Zahid, >>>>>>>> >>>>>>>> We will need the header of your projections file, too (It is best if >>>> you >>>>>>>> have all your projections as a single .mhd and a single .raw file, so >>>> it >>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>> >>>>>>>> Regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Cyril Mory, >>>>>>>>> >>>>>>>>> >>>>>>>>> I have only used RTK version 1.3.0. but in the >> error >>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>> Please find the attachment of the geometry file >> of >>>> our >>>>>>>> projections. >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> >>>>>>>>>> Without some more information, it's unlikely that we find the >> source >>>> of >>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>> therefore >>>>>>>>>> yourself): >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >>>> the >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>> problem >>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>> example). And send us the script >>>>>>>>>> - OR send us your geometry file and the header of your projections >>>> file >>>>>>>>>> (no need to send the projection data itself, we'll create a >>>> zero-filled >>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>> >>>>>>>>>> Best regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>> >>>>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> Senior Design Engineer >>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>> >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>> Bangalore - India. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>>>> memory >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >>>> make >>>>>>>>>> sure >>>>>>>>>>>> that you use the --lowmem option to stream the projection images. >>>> If >>>>>> it >>>>>>>>>> is >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >> The >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >> of >>>>>> RTK >>>>>>>> on >>>>>>>>>>>> our case studies webpage >>>>>>>>>> . >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>> reconstruction >>>>>>>> using >>>>>>>>>> RTK >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>> shoot >>>>>> of >>>>>>>>>>>>> the >>>>>>>>>>>>>> same. >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>>>> >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>> application >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Please provide the solution of this and let >> me >>>>>> know >>>>>>>> if >>>>>>>>>>>> any >>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>> >>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>> >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url >> : >>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>> ________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>> >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>>>> >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 09:37:23 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 13:37:23 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. Please suggest us for further process. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > I see two errors: > > Remove this line > > writer->SetNumberOfStreamDivisions(4); > > since only the streaming filter, not the write filter, needs to know > about the number of divisions. > And change the filename to > > "D:\\Output.mhd" > > It will write both the .mhd and the .raw files. > > I hope it helps, > Cyril > > On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have modified my file writer code and used > StreamingImageFilter. Now its not giving any error message but the final > output is 0 byte for 1024 volume. It working fine for 512 volume. > > > > Please check my modified file writer code given below. > > > > // Streaming depending on streaming capability of writer > > typedef itk::StreamingImageFilter > StreamerType; > > StreamerType::Pointer streamerBP = StreamerType::New(); > > streamerBP->SetInput(feldkamp->GetOutput()); > > streamerBP->SetNumberOfStreamDivisions(4); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(streamerBP->GetOutput()); > > writer->SetNumberOfStreamDivisions(4); > > > > > > Please let me know if any clarification is required. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> The --divisions is an option of the command-line application rtkfdk. It > >> is not directly an option of the FDKConeBeamReconstructionFilter : > >> rather, it is passed to a streaming filter at the end of the pipeline. > >> Look for the following bit of code in rtkfdk.cxx : > >> > >> // Streaming depending on streaming capability of writer > >> typedef itk::StreamingImageFilter >> CPUOutputImageType> StreamerType; > >> StreamerType::Pointer streamerBP = StreamerType::New(); > >> streamerBP->SetInput( pfeldkamp ); > >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >> > >> You can find information on how a streaming filter works on this page: > >> > >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >> > >> I hope it helps, > >> > >> Cyril > >> > >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have tried but I am not getting where to give > >> --division 4 in my code. > >>> > >>> Please find my code given below and please let me know > >> where I need to change in my code to make it work. > >>> > >>> int _tmain(int argc, _TCHAR* argv[]) > >>> { > >>> #pragma region "Variable declaration" > >>> const double PI = 3.14159265358979323846; > >>> float *angles; > >>> int nProj = 349; > >>> typedef unsigned short pixelType; > >>> typedef float OutpixelType; > >>> const int dimension = 3; > >>> typedef itk::Image imageType; > >>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>> imageType::Pointer Projections = imageType::New(); > >>> > >>> #pragma endregion "Variable declaration" > >>> > >>> Projections = > >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > nProj); > >>> imageType::SpacingType pSpacing; > >>> pSpacing[0] = 0.2960; > >>> pSpacing[1] = 0.2960; > >>> pSpacing[2] = 0.2960; > >>> Projections->SetSpacing(pSpacing); > >>> > >>> imageType::PointType pOrigin; > >>> pOrigin[0] = -212.972; > >>> pOrigin[1] = -212.972; > >>> pOrigin[2] = -212.972; //-158.50; > >>> Projections->SetOrigin(pOrigin); > >>> > >>> Projections->Update(); > >>> > >>> //Read angles. > >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>> angles = new float[nProj]; > >>> angles = readAngles(angles_file, angles); > >>> > >>> #pragma region"Geometry" > >>> // Geometry object > >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>> GeometryType::Pointer geometry = GeometryType::New(); > >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>> { > >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > 0); > >> // 136 half fan //2.07 Kidwai // > >>> } > >>> > >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >> GeometryWriterType; > >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > >>> geometryWriter->SetFilename("D:\\geo.xml"); > >>> geometryWriter->SetObject(geometry); > >>> geometryWriter->WriteFile(); > >>> geometry->Update(); > >>> #pragma endregion "Geometry" > >>> > >>> //Define output image type > >>> > >>> #ifdef USE_CUDA > >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>> #else > >>> typedef itk::Image OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; > >>> #endif > >>> > >>> //ScatterCorrection > >>> typedef rtk::BoellaardScatterCorrectionImageFilter > > >> BoellaardScatterCorrectionImageFilterType; > >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > >> BoellaardScatterCorrectionImageFilterType::New(); > >>> ScatterCorrection->SetInput(Projections); > >>> > >>> //VarianObiRawImageFilter > >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >> RawImageFilterType; > >>> RawImageFilterType::Pointer AttenuationFilter = > >> RawImageFilterType::New(); > >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>> > >>> //Create the output image > >>> typedef rtk::ConstantImageSource< OutPutImageType > > >> ConstantImageSourceType; > >>> ConstantImageSourceType::PointType origin_p; > >>> ConstantImageSourceType::SizeType size_p; > >>> ConstantImageSourceType::SpacingType spacing_p; > >>> ConstantImageSourceType::Pointer projectionsSource = > >> ConstantImageSourceType::New(); > >>> origin_p[0] = -127.5; > >>> origin_p[1] = -127.5; > >>> origin_p[2] = -127.5; > >>> size_p[0] = 512; > >>> size_p[1] = 512; > >>> size_p[2] = 512; > >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>> > >>> projectionsSource->SetOrigin(origin_p); > >>> projectionsSource->SetSpacing(spacing_p); > >>> projectionsSource->SetSize(size_p); > >>> projectionsSource->SetConstant(0); > >>> > >>> // Short scan image filter > >>> PSSFType::Pointer pssf = PSSFType::New(); > >>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>> pssf->SetGeometry(geometry); > >>> pssf->InPlaceOff(); > >>> std::cout << "short scan image filter success" << std::endl; > >>> > >>> FDKType::Pointer feldkamp = FDKType::New(); > >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>> feldkamp->SetInput(1, pssf->GetOutput()); > >>> feldkamp->SetGeometry(geometry); > >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>> feldkamp->SetGPUEnabled(1); > >>> feldkamp->SetNumberOfThreads(10000); > >>> > >>> #pragma region "Write volume" > >>> > >>> //Create a raw io for writing > >>> > >>> itk::RawImageIO::Pointer io; > >>> io = itk::RawImageIO::New(); > >>> > >>> for (unsigned int i = 0; i < dimension; i++) > >>> { > >>> io->SetDimensions(i, size_p[i]); > >>> io->SetSpacing(i, spacing_p[i]); > >>> io->SetOrigin(i, origin_p[i]); > >>> } > >>> io->SetHeaderSize(0); > >>> io->SetByteOrderToLittleEndian(); > >>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>> io->SetNumberOfComponents(1); > >>> io->SetNumberOfDimensions(3); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(feldkamp->GetOutput()); > >>> > >>> try > >>> { > >>> writer->Update(); > >>> } > >>> catch (itk::ExceptionObject & excp) > >>> { > >>> std::cerr << "Error while writing the image " << std::endl; > >>> std::cerr << excp << std::endl; > >>> getchar(); > >>> } > >>> #pragma endregion "WriteVolume" > >>> delete[] angles; > >>> return 0; > >>> } > >>> > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> I was able to perform a reconstruction from your header and geometry > >>>> file, using the following command lines: > >>>> > >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>> --phantomscale "128,128,128" --like Output.mhd > >>>> > >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > --hardware > >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>> > >>>> The first computes projections through a Shepp & Logan phantom, with > the > >>>> same size, spacing, origin, etc... as your projections, using your > >>>> geometry file geo.xml. > >>>> > >>>> The second line performs the FDK reconstruction. I had to use both the > >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>> parts, reconstructs them one by one, then assembles the results. Can > you > >>>> run the same commands and let us know whether you still encounter the > >>>> crash you mentioned ? If it works, you can use your own projection data > >>>> in the second command line instead of "simulatedprojections.mha". > >>>> > >>>> Best, > >>>> > >>>> Cyril > >>>> > >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>> > >>>>> Dear Sir, > >>>>> > >>>>> Please find the Header file in the attachment. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> We do not need the projections file, at least not for a first stage > of > >>>>>> error tracking. We only need the header. > >>>>>> Try the following command line: > >>>>>> > >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>> > >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>>>> what we need, and it is a very light text file. The "proj.raw" > contains > >>>>>> the pixel values, but at the moment we do not need them. We will > create > >>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>> track down the error you encounter. > >>>>>> > >>>>>> Looking forward to receiving your file, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> The single raw file of the projections is 1.4 GB and > we > >> are > >>>> not > >>>>>> able to send this big file to you. Can you please suggest other > >>>> alternatives > >>>>>> for this? > >>>>>>> Or can you provide us the PC configuration to solve > the > >>>> issue? > >>>>>>> Let me know if any other clarification is required. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Hello Zahid, > >>>>>>>> > >>>>>>>> We will need the header of your projections file, too (It is best > if > >>>> you > >>>>>>>> have all your projections as a single .mhd and a single .raw file, > so > >>>> it > >>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>> > >>>>>>>> Regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Cyril Mory, > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> I have only used RTK version 1.3.0. but in the > >> error > >>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>> Please find the attachment of the geometry > file > >> of > >>>> our > >>>>>>>> projections. > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> > >>>>>>>>>> Without some more information, it's unlikely that we find the > >> source > >>>> of > >>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>> therefore > >>>>>>>>>> yourself): > >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes > in > >>>> the > >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>> problem > >>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>> - create a small example that reproduces your problem. You can, > for > >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > logan > >>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>>>> example). And send us the script > >>>>>>>>>> - OR send us your geometry file and the header of your > projections > >>>> file > >>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>> zero-filled > >>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>> > >>>>>>>>>> Best regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>> > >>>>>>>>>>> Please find the screen shot in the > attachment. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>> > >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > CUDA > >>>>>>>> memory > >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > first > >>>> make > >>>>>>>>>> sure > >>>>>>>>>>>> that you use the --lowmem option to stream the projection > images. > >>>> If > >>>>>> it > >>>>>>>>>> is > >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. > >> The > >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > >> of > >>>>>> RTK > >>>>>>>> on > >>>>>>>>>>>> our case studies webpage > >>>>>>>>>> . > >>>>>>>>>>>> Simon > >>>>>>>>>>>> > >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>> reconstruction > >>>>>>>> using > >>>>>>>>>> RTK > >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >>>> shoot > >>>>>> of > >>>>>>>>>>>>> the > >>>>>>>>>>>>>> same. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am using the following items given > below. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>>>> application > >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Please provide the solution of this and > let > >> me > >>>>>> know > >>>>>>>> if > >>>>>>>>>>>> any > >>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, > >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > >> : > >>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>> ________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>> > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: RTK_Error.png Type: image/png Size: 57211 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 10:00:50 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 15:00:50 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> References: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Message-ID: <94e0045d-ef88-726d-9b7b-8b5ebf5ac067@creatis.insa-lyon.fr> Dear Zahid, The output looks correct. If the command line solution I suggested in a previous email works, the best way to move forward would be to compare your code and that of rtkfdk.cxx, and where it differs, make sure you have not introduced an error. Cyril On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. > > Please suggest us for further process. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> I see two errors: >> >> Remove this line >> >> writer->SetNumberOfStreamDivisions(4); >> >> since only the streaming filter, not the write filter, needs to know >> about the number of divisions. >> And change the filename to >> >> "D:\\Output.mhd" >> >> It will write both the .mhd and the .raw files. >> >> I hope it helps, >> Cyril >> >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have modified my file writer code and used >> StreamingImageFilter. Now its not giving any error message but the final >> output is 0 byte for 1024 volume. It working fine for 512 volume. >>> Please check my modified file writer code given below. >>> >>> // Streaming depending on streaming capability of writer >>> typedef itk::StreamingImageFilter >> StreamerType; >>> StreamerType::Pointer streamerBP = StreamerType::New(); >>> streamerBP->SetInput(feldkamp->GetOutput()); >>> streamerBP->SetNumberOfStreamDivisions(4); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(streamerBP->GetOutput()); >>> writer->SetNumberOfStreamDivisions(4); >>> >>> >>> Please let me know if any clarification is required. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> The --divisions is an option of the command-line application rtkfdk. It >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >>>> rather, it is passed to a streaming filter at the end of the pipeline. >>>> Look for the following bit of code in rtkfdk.cxx : >>>> >>>> // Streaming depending on streaming capability of writer >>>> typedef itk::StreamingImageFilter>>> CPUOutputImageType> StreamerType; >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >>>> streamerBP->SetInput( pfeldkamp ); >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >>>> >>>> You can find information on how a streaming filter works on this page: >>>> >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >>>> >>>> I hope it helps, >>>> >>>> Cyril >>>> >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>>>> Dear Cyril Mory, >>>>> >>>>> I have tried but I am not getting where to give >>>> --division 4 in my code. >>>>> Please find my code given below and please let me know >>>> where I need to change in my code to make it work. >>>>> int _tmain(int argc, _TCHAR* argv[]) >>>>> { >>>>> #pragma region "Variable declaration" >>>>> const double PI = 3.14159265358979323846; >>>>> float *angles; >>>>> int nProj = 349; >>>>> typedef unsigned short pixelType; >>>>> typedef float OutpixelType; >>>>> const int dimension = 3; >>>>> typedef itk::Image imageType; >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>>>> imageType::Pointer Projections = imageType::New(); >>>>> >>>>> #pragma endregion "Variable declaration" >>>>> >>>>> Projections = >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> nProj); >>>>> imageType::SpacingType pSpacing; >>>>> pSpacing[0] = 0.2960; >>>>> pSpacing[1] = 0.2960; >>>>> pSpacing[2] = 0.2960; >>>>> Projections->SetSpacing(pSpacing); >>>>> >>>>> imageType::PointType pOrigin; >>>>> pOrigin[0] = -212.972; >>>>> pOrigin[1] = -212.972; >>>>> pOrigin[2] = -212.972; //-158.50; >>>>> Projections->SetOrigin(pOrigin); >>>>> >>>>> Projections->Update(); >>>>> >>>>> //Read angles. >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>>>> angles = new float[nProj]; >>>>> angles = readAngles(angles_file, angles); >>>>> >>>>> #pragma region"Geometry" >>>>> // Geometry object >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>>>> { >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, >> 0); >>>> // 136 half fan //2.07 Kidwai // >>>>> } >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >>>> GeometryWriterType; >>>>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >>>>> geometryWriter->SetObject(geometry); >>>>> geometryWriter->WriteFile(); >>>>> geometry->Update(); >>>>> #pragma endregion "Geometry" >>>>> >>>>> //Define output image type >>>>> >>>>> #ifdef USE_CUDA >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> #else >>>>> typedef itk::Image OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>>>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>>>> #endif >>>>> >>>>> //ScatterCorrection >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter>>> BoellaardScatterCorrectionImageFilterType; >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >>>> BoellaardScatterCorrectionImageFilterType::New(); >>>>> ScatterCorrection->SetInput(Projections); >>>>> >>>>> //VarianObiRawImageFilter >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >>>> RawImageFilterType; >>>>> RawImageFilterType::Pointer AttenuationFilter = >>>> RawImageFilterType::New(); >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>>>> >>>>> //Create the output image >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >>>> ConstantImageSourceType; >>>>> ConstantImageSourceType::PointType origin_p; >>>>> ConstantImageSourceType::SizeType size_p; >>>>> ConstantImageSourceType::SpacingType spacing_p; >>>>> ConstantImageSourceType::Pointer projectionsSource = >>>> ConstantImageSourceType::New(); >>>>> origin_p[0] = -127.5; >>>>> origin_p[1] = -127.5; >>>>> origin_p[2] = -127.5; >>>>> size_p[0] = 512; >>>>> size_p[1] = 512; >>>>> size_p[2] = 512; >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>>>> >>>>> projectionsSource->SetOrigin(origin_p); >>>>> projectionsSource->SetSpacing(spacing_p); >>>>> projectionsSource->SetSize(size_p); >>>>> projectionsSource->SetConstant(0); >>>>> >>>>> // Short scan image filter >>>>> PSSFType::Pointer pssf = PSSFType::New(); >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >>>>> pssf->SetGeometry(geometry); >>>>> pssf->InPlaceOff(); >>>>> std::cout << "short scan image filter success" << std::endl; >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >>>>> feldkamp->SetGeometry(geometry); >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>>>> feldkamp->SetGPUEnabled(1); >>>>> feldkamp->SetNumberOfThreads(10000); >>>>> >>>>> #pragma region "Write volume" >>>>> >>>>> //Create a raw io for writing >>>>> >>>>> itk::RawImageIO::Pointer io; >>>>> io = itk::RawImageIO::New(); >>>>> >>>>> for (unsigned int i = 0; i < dimension; i++) >>>>> { >>>>> io->SetDimensions(i, size_p[i]); >>>>> io->SetSpacing(i, spacing_p[i]); >>>>> io->SetOrigin(i, origin_p[i]); >>>>> } >>>>> io->SetHeaderSize(0); >>>>> io->SetByteOrderToLittleEndian(); >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>>>> io->SetNumberOfComponents(1); >>>>> io->SetNumberOfDimensions(3); >>>>> >>>>> //create a writer and write reconstructed file >>>>> itk::ImageFileWriter::Pointer writer; >>>>> writer = itk::ImageFileWriter::New(); >>>>> writer->SetFileName("D:\\Output.raw"); >>>>> writer->SetImageIO(io); >>>>> writer->SetInput(feldkamp->GetOutput()); >>>>> >>>>> try >>>>> { >>>>> writer->Update(); >>>>> } >>>>> catch (itk::ExceptionObject & excp) >>>>> { >>>>> std::cerr << "Error while writing the image " << std::endl; >>>>> std::cerr << excp << std::endl; >>>>> getchar(); >>>>> } >>>>> #pragma endregion "WriteVolume" >>>>> delete[] angles; >>>>> return 0; >>>>> } >>>>> >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> Senior Design Engineer >>>>> Mobile No. +91-9738379729 >>>>> >>>>> Panacea Medical Technologies Pvt. Ltd. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>> http://www.panaceamedical.com >>>>> Bangalore - India. >>>>> >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> I was able to perform a reconstruction from your header and geometry >>>>>> file, using the following command lines: >>>>>> >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>>>> --phantomscale "128,128,128" --like Output.mhd >>>>>> >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> --hardware >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>>>> >>>>>> The first computes projections through a Shepp & Logan phantom, with >> the >>>>>> same size, spacing, origin, etc... as your projections, using your >>>>>> geometry file geo.xml. >>>>>> >>>>>> The second line performs the FDK reconstruction. I had to use both the >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>>>> parts, reconstructs them one by one, then assembles the results. Can >> you >>>>>> run the same commands and let us know whether you still encounter the >>>>>> crash you mentioned ? If it works, you can use your own projection data >>>>>> in the second command line instead of "simulatedprojections.mha". >>>>>> >>>>>> Best, >>>>>> >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>>>> >>>>>>> Dear Sir, >>>>>>> >>>>>>> Please find the Header file in the attachment. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> We do not need the projections file, at least not for a first stage >> of >>>>>>>> error tracking. We only need the header. >>>>>>>> Try the following command line: >>>>>>>> >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>>>> >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> contains >>>>>>>> the pixel values, but at the moment we do not need them. We will >> create >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>>>> track down the error you encounter. >>>>>>>> >>>>>>>> Looking forward to receiving your file, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Sir, >>>>>>>>> >>>>>>>>> The single raw file of the projections is 1.4 GB and >> we >>>> are >>>>>> not >>>>>>>> able to send this big file to you. Can you please suggest other >>>>>> alternatives >>>>>>>> for this? >>>>>>>>> Or can you provide us the PC configuration to solve >> the >>>>>> issue? >>>>>>>>> Let me know if any other clarification is required. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Hello Zahid, >>>>>>>>>> >>>>>>>>>> We will need the header of your projections file, too (It is best >> if >>>>>> you >>>>>>>>>> have all your projections as a single .mhd and a single .raw file, >> so >>>>>> it >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Cyril Mory, >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I have only used RTK version 1.3.0. but in the >>>> error >>>>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>>>> Please find the attachment of the geometry >> file >>>> of >>>>>> our >>>>>>>>>> projections. >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >>>> Simon >>>>>>>> Rit >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> >>>>>>>>>>>> Without some more information, it's unlikely that we find the >>>> source >>>>>> of >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>>>> therefore >>>>>>>>>>>> yourself): >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes >> in >>>>>> the >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>>>> problem >>>>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>>>> - create a small example that reproduces your problem. You can, >> for >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> logan >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>>>> example). And send us the script >>>>>>>>>>>> - OR send us your geometry file and the header of your >> projections >>>>>> file >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >>>>>> zero-filled >>>>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>>>> >>>>>>>>>>>> Best regards, >>>>>>>>>>>> Cyril >>>>>>>>>>>> >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>>>> >>>>>>>>>>>>> Please find the screen shot in the >> attachment. >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>> >>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>> >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a >> CUDA >>>>>>>>>> memory >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> first >>>>>> make >>>>>>>>>>>> sure >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> images. >>>>>> If >>>>>>>> it >>>>>>>>>>>> is >>>>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >>>> The >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >>>> of >>>>>>>> RTK >>>>>>>>>> on >>>>>>>>>>>>>> our case studies webpage >>>>>>>>>>>> . >>>>>>>>>>>>>> Simon >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>>>> reconstruction >>>>>>>>>> using >>>>>>>>>>>> RTK >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>>>> shoot >>>>>>>> of >>>>>>>>>>>>>>> the >>>>>>>>>>>>>>>> same. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am using the following items given >> below. >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>>>> application >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Please provide the solution of this and >> let >>>> me >>>>>>>> know >>>>>>>>>> if >>>>>>>>>>>>>> any >>>>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >>>> : >>>>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>>>> ________________ >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> This email and any files transmitted with it are confidential >>>> and >>>>>>>>>>>> intended >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >>>>>>>>>>>> addressed. >>>>>>>>>>>>>>> If you have received this email in error please notify the >>>> system >>>>>>>>>>>> manager. >>>>>>>>>>>>>>> Please note that any views or opinions presented in this email >>>> are >>>>>>>>>>>> solely >>>>>>>>>>>>>>> those of the author and do not necessarily represent those of >>>> the >>>>>>>>>>>> company. >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >>>> attachments >>>>>>>> for >>>>>>>>>>>> the >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>>>> damage >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>>>> >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >>> >>> >> >> > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Wed Nov 2 22:38:38 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 02:38:38 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Message-ID: <24189134.77160.1478140718379@mail.yahoo.com> Hello Simon and Cyril,Thanks for the reply.You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do.Thanks again for the reply. @Cyril:Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards,Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 02:05:51 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 06:05:51 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103060551.f7bfa0c3@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, Thank you for your help. We are able to reconstruct 1024 volume now. But the reconstruction time is around 4 minutes. Can you please help us to reduce the reconstruction time? We are using NVIDIA TITAN X GPU which has 12 GB memory. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The output looks correct. > > If the command line solution I suggested in a previous email works, the > best way to move forward would be to compare your code and that of > rtkfdk.cxx, and where it differs, make sure you have not introduced an > error. > > Cyril > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have done the same but the Output.mhd file is still 0 > KB for 1024 volume. Please find the attachment of the status of the output > displayed. > > > > Please suggest us for further process. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> I see two errors: > >> > >> Remove this line > >> > >> writer->SetNumberOfStreamDivisions(4); > >> > >> since only the streaming filter, not the write filter, needs to know > >> about the number of divisions. > >> And change the filename to > >> > >> "D:\\Output.mhd" > >> > >> It will write both the .mhd and the .raw files. > >> > >> I hope it helps, > >> Cyril > >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have modified my file writer code and used > >> StreamingImageFilter. Now its not giving any error message but the final > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > >>> Please check my modified file writer code given below. > >>> > >>> // Streaming depending on streaming capability of writer > >>> typedef itk::StreamingImageFilter > >> StreamerType; > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>> streamerBP->SetInput(feldkamp->GetOutput()); > >>> streamerBP->SetNumberOfStreamDivisions(4); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(streamerBP->GetOutput()); > >>> writer->SetNumberOfStreamDivisions(4); > >>> > >>> > >>> Please let me know if any clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> The --divisions is an option of the command-line application rtkfdk. It > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > >>>> rather, it is passed to a streaming filter at the end of the pipeline. > >>>> Look for the following bit of code in rtkfdk.cxx : > >>>> > >>>> // Streaming depending on streaming capability of writer > >>>> typedef itk::StreamingImageFilter >>>> CPUOutputImageType> StreamerType; > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>>> streamerBP->SetInput( pfeldkamp ); > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >>>> > >>>> You can find information on how a streaming filter works on this page: > >>>> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >>>> > >>>> I hope it helps, > >>>> > >>>> Cyril > >>>> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> I have tried but I am not getting where to give > >>>> --division 4 in my code. > >>>>> Please find my code given below and please let me > know > >>>> where I need to change in my code to make it work. > >>>>> int _tmain(int argc, _TCHAR* argv[]) > >>>>> { > >>>>> #pragma region "Variable declaration" > >>>>> const double PI = 3.14159265358979323846; > >>>>> float *angles; > >>>>> int nProj = 349; > >>>>> typedef unsigned short pixelType; > >>>>> typedef float OutpixelType; > >>>>> const int dimension = 3; > >>>>> typedef itk::Image imageType; > >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>>>> imageType::Pointer Projections = imageType::New(); > >>>>> > >>>>> #pragma endregion "Variable declaration" > >>>>> > >>>>> Projections = > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > >> nProj); > >>>>> imageType::SpacingType pSpacing; > >>>>> pSpacing[0] = 0.2960; > >>>>> pSpacing[1] = 0.2960; > >>>>> pSpacing[2] = 0.2960; > >>>>> Projections->SetSpacing(pSpacing); > >>>>> > >>>>> imageType::PointType pOrigin; > >>>>> pOrigin[0] = -212.972; > >>>>> pOrigin[1] = -212.972; > >>>>> pOrigin[2] = -212.972; //-158.50; > >>>>> Projections->SetOrigin(pOrigin); > >>>>> > >>>>> Projections->Update(); > >>>>> > >>>>> //Read angles. > >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>>>> angles = new float[nProj]; > >>>>> angles = readAngles(angles_file, angles); > >>>>> > >>>>> #pragma region"Geometry" > >>>>> // Geometry object > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>>>> { > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > >> 0); > >>>> // 136 half fan //2.07 Kidwai // > >>>>> } > >>>>> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >>>> GeometryWriterType; > >>>>> GeometryWriterType::Pointer geometryWriter = > GeometryWriterType::New(); > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > >>>>> geometryWriter->SetObject(geometry); > >>>>> geometryWriter->WriteFile(); > >>>>> geometry->Update(); > >>>>> #pragma endregion "Geometry" > >>>>> > >>>>> //Define output image type > >>>>> > >>>>> #ifdef USE_CUDA > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>>>> #else > >>>>> typedef itk::Image OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > FDKType; > >>>>> #endif > >>>>> > >>>>> //ScatterCorrection > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter imageType > >>>> BoellaardScatterCorrectionImageFilterType; > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection > = > >>>> BoellaardScatterCorrectionImageFilterType::New(); > >>>>> ScatterCorrection->SetInput(Projections); > >>>>> > >>>>> //VarianObiRawImageFilter > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >>>> RawImageFilterType; > >>>>> RawImageFilterType::Pointer AttenuationFilter = > >>>> RawImageFilterType::New(); > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>>>> > >>>>> //Create the output image > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > >>>> ConstantImageSourceType; > >>>>> ConstantImageSourceType::PointType origin_p; > >>>>> ConstantImageSourceType::SizeType size_p; > >>>>> ConstantImageSourceType::SpacingType spacing_p; > >>>>> ConstantImageSourceType::Pointer projectionsSource = > >>>> ConstantImageSourceType::New(); > >>>>> origin_p[0] = -127.5; > >>>>> origin_p[1] = -127.5; > >>>>> origin_p[2] = -127.5; > >>>>> size_p[0] = 512; > >>>>> size_p[1] = 512; > >>>>> size_p[2] = 512; > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>>>> > >>>>> projectionsSource->SetOrigin(origin_p); > >>>>> projectionsSource->SetSpacing(spacing_p); > >>>>> projectionsSource->SetSize(size_p); > >>>>> projectionsSource->SetConstant(0); > >>>>> > >>>>> // Short scan image filter > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>>>> pssf->SetGeometry(geometry); > >>>>> pssf->InPlaceOff(); > >>>>> std::cout << "short scan image filter success" << std::endl; > >>>>> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > >>>>> feldkamp->SetGeometry(geometry); > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>>>> feldkamp->SetGPUEnabled(1); > >>>>> feldkamp->SetNumberOfThreads(10000); > >>>>> > >>>>> #pragma region "Write volume" > >>>>> > >>>>> //Create a raw io for writing > >>>>> > >>>>> itk::RawImageIO::Pointer io; > >>>>> io = itk::RawImageIO::New(); > >>>>> > >>>>> for (unsigned int i = 0; i < dimension; i++) > >>>>> { > >>>>> io->SetDimensions(i, size_p[i]); > >>>>> io->SetSpacing(i, spacing_p[i]); > >>>>> io->SetOrigin(i, origin_p[i]); > >>>>> } > >>>>> io->SetHeaderSize(0); > >>>>> io->SetByteOrderToLittleEndian(); > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>>>> io->SetNumberOfComponents(1); > >>>>> io->SetNumberOfDimensions(3); > >>>>> > >>>>> //create a writer and write reconstructed file > >>>>> itk::ImageFileWriter::Pointer writer; > >>>>> writer = itk::ImageFileWriter::New(); > >>>>> writer->SetFileName("D:\\Output.raw"); > >>>>> writer->SetImageIO(io); > >>>>> writer->SetInput(feldkamp->GetOutput()); > >>>>> > >>>>> try > >>>>> { > >>>>> writer->Update(); > >>>>> } > >>>>> catch (itk::ExceptionObject & excp) > >>>>> { > >>>>> std::cerr << "Error while writing the image " << std::endl; > >>>>> std::cerr << excp << std::endl; > >>>>> getchar(); > >>>>> } > >>>>> #pragma endregion "WriteVolume" > >>>>> delete[] angles; > >>>>> return 0; > >>>>> } > >>>>> > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> Senior Design Engineer > >>>>> Mobile No. +91-9738379729 > >>>>> > >>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>> http://www.panaceamedical.com > >>>>> Bangalore - India. > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> I was able to perform a reconstruction from your header and geometry > >>>>>> file, using the following command lines: > >>>>>> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>>>> --phantomscale "128,128,128" --like Output.mhd > >>>>>> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > >> --hardware > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>>>> > >>>>>> The first computes projections through a Shepp & Logan phantom, with > >> the > >>>>>> same size, spacing, origin, etc... as your projections, using your > >>>>>> geometry file geo.xml. > >>>>>> > >>>>>> The second line performs the FDK reconstruction. I had to use both > the > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > (3GB, > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > by > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>>>> parts, reconstructs them one by one, then assembles the results. Can > >> you > >>>>>> run the same commands and let us know whether you still encounter the > >>>>>> crash you mentioned ? If it works, you can use your own projection > data > >>>>>> in the second command line instead of "simulatedprojections.mha". > >>>>>> > >>>>>> Best, > >>>>>> > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>>>> > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> Please find the Header file in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> We do not need the projections file, at least not for a first stage > >> of > >>>>>>>> error tracking. We only need the header. > >>>>>>>> Try the following command line: > >>>>>>>> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>>>> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file > is > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > >> contains > >>>>>>>> the pixel values, but at the moment we do not need them. We will > >> create > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>>>> track down the error you encounter. > >>>>>>>> > >>>>>>>> Looking forward to receiving your file, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Sir, > >>>>>>>>> > >>>>>>>>> The single raw file of the projections is 1.4 GB > and > >> we > >>>> are > >>>>>> not > >>>>>>>> able to send this big file to you. Can you please suggest other > >>>>>> alternatives > >>>>>>>> for this? > >>>>>>>>> Or can you provide us the PC configuration to solve > >> the > >>>>>> issue? > >>>>>>>>> Let me know if any other clarification is required. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Hello Zahid, > >>>>>>>>>> > >>>>>>>>>> We will need the header of your projections file, too (It is best > >> if > >>>>>> you > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > file, > >> so > >>>>>> it > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>>>> > >>>>>>>>>> Regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Cyril Mory, > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> I have only used RTK version 1.3.0. but in > the > >>>> error > >>>>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>>>> Please find the attachment of the geometry > >> file > >>>> of > >>>>>> our > >>>>>>>>>> projections. > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >>>> Simon > >>>>>>>> Rit > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > >>>> source > >>>>>> of > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>>>> therefore > >>>>>>>>>>>> yourself): > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > changes > >> in > >>>>>> the > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>>>> problem > >>>>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>>>> - create a small example that reproduces your problem. You can, > >> for > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > >> logan > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > an > >>>>>>>>>>>> example). And send us the script > >>>>>>>>>>>> - OR send us your geometry file and the header of your > >> projections > >>>>>> file > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>>>> zero-filled > >>>>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>>>> > >>>>>>>>>>>> Best regards, > >>>>>>>>>>>> Cyril > >>>>>>>>>>>> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>>>> > >>>>>>>>>>>>> Please find the screen shot in the > >> attachment. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>> > >>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > >> CUDA > >>>>>>>>>> memory > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > >> first > >>>>>> make > >>>>>>>>>>>> sure > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > >> images. > >>>>>> If > >>>>>>>> it > >>>>>>>>>>>> is > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > --divisions. > >>>> The > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > use > >>>> of > >>>>>>>> RTK > >>>>>>>>>> on > >>>>>>>>>>>>>> our case studies webpage > >>>>>>>>>>>> . > >>>>>>>>>>>>>> Simon > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>>>> reconstruction > >>>>>>>>>> using > >>>>>>>>>>>> RTK > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > screen > >>>>>> shoot > >>>>>>>> of > >>>>>>>>>>>>>>> the > >>>>>>>>>>>>>>>> same. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am using the following items given > >> below. > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > console > >>>>>>>> application > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Please provide the solution of this > and > >> let > >>>> me > >>>>>>>> know > >>>>>>>>>> if > >>>>>>>>>>>>>> any > >>>>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > >> Url > >>>> : > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>>>> ________________ > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> This email and any files transmitted with it are > confidential > >>>> and > >>>>>>>>>>>> intended > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they > >> are > >>>>>>>>>>>> addressed. > >>>>>>>>>>>>>>> If you have received this email in error please notify the > >>>> system > >>>>>>>>>>>> manager. > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > email > >>>> are > >>>>>>>>>>>> solely > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > of > >>>> the > >>>>>>>>>>>> company. > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > >>>> attachments > >>>>>>>> for > >>>>>>>>>>>> the > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > >>>>>> damage > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>>>> > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Thu Nov 3 02:23:25 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 3 Nov 2016 07:23:25 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <24189134.77160.1478140718379@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> Message-ID: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): {\begin{aligned}&\mathbf {r} _{0}:=\mathbf {b} -\mathbf {Ax} _{0}\\&\mathbf {p} _{0}:=\mathbf {r} _{0}\\&k:=0\\&{\hbox{repeat}}\\&\qquad \alpha _{k}:={\frac {\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}{\mathbf {p} _{k}^{\mathsf {T}}\mathbf {Ap} _{k}}}\\&\qquad \mathbf {x} _{k+1}:=\mathbf {x} _{k}+\alpha _{k}\mathbf {p} _{k}\\&\qquad \mathbf {r} _{k+1}:=\mathbf {r} _{k}-\alpha _{k}\mathbf {Ap} _{k}\\&\qquad {\hbox{if }}r_{k+1}{\hbox{ is sufficiently small then exit loop}}\\&\qquad \beta _{k}:={\frac {\mathbf {r} _{k+1}^{\mathsf {T}}\mathbf {r} _{k+1}}{\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}}\\&\qquad \mathbf {p} _{k+1}:=\mathbf {r} _{k+1}+\beta _{k}\mathbf {p} _{k}\\&\qquad k:=k+1\\&{\hbox{end repeat}}\\&{\hbox{The result is }}\mathbf {x} _{k+1}\end{aligned}} In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: > Hello Simon and Cyril, > Thanks for the reply. > You are right Simon. I did not notice it too in the literature. The > main problem as you said is the storage. Actually I developed the > conjugate gradient (CG), quasi-Newton and Newton optimization methods > for optical tomography and I intended to apply them to the CT > reconstruction as well. I implemented the Newton's methods > (Gauss-Newton and Levenberg-Marquardt) in a > Jacobian-Free-Newton-Krylov approaches to avoid the matrix > multiplication of Jacobians (sensitivity). It means we only need to > store the Jacobian matrix for the these methods (the matrix R that > Cyril was mentioned), that is still a big matrix for practical > problems in CT reconstruction. For the quasi-Newton I adapted an > L-BFGS algorithm that only need the 3 or 8 last iterations of the > gradient vector to calculate the Hessian matrix. In my case, the > L-BFGS and Newton's methods was much faster than the CG as you know > because of using the second order derivative (hessian matrix). I saw > in your last paper you implement the conjugate gradient method, so I > thought it might be easy to extract the gradient vector from CG > modules and solve the cost function within the quasi-Newton/Newton > methods. I will look at the codes to see what I can do. > Thanks again for the reply. > > @Cyril: > Please correct me if I am wrong. you mean the output of > backProjectionFilter is the gradient of defined cost function? > > Regards, > Vahid > > > On Wednesday, November 2, 2016 2:53 AM, Cyril Mory > wrote: > > > Hi Vahid, > Welcome to RTK :) > Indeed, there are several iterative methods already implemented in > RTK, but none of the filters allows you to easily extract the gradient > of the least squares function there are minimizing. > If you need to minimize the classical non-regularized tomographic cost > function, ie || R f - p ||?, with R the forward projection operator, f > the volume you are looking for, and p the measured projections, my > best advice would be to copy some part of the pipeline of > rtkSARTConeBeamReconstructionFilter to get the job done, ie the > following part (copy-paste this into webgraphviz.com) > > digraph SARTConeBeamReconstructionFilter { > > Input0 [ label="Input 0 (Volume)"]; > Input0 [shape=Mdiamond]; > Input1 [label="Input 1 (Projections)"]; > Input1 [shape=Mdiamond]; > > node [shape=box]; > ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref > rtk::ForwardProjectionImageFilter"]; > Extract [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref > itk::MultiplyImageFilter"]; > AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; > Subtract [ label="itk::SubtractImageFilter" URL="\ref > itk::SubtractImageFilter"]; > MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" > URL="\ref itk::MultiplyImageFilter"]; > Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref > itk::DivideOrZeroOutImageFilter"]; > GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" > URL="\ref itk::MultiplyImageFilter", style=dashed]; > Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref > rtk::DisplacedDetectorImageFilter"]; > ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref > rtk::RayBoxIntersectionImageFilter"]; > ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref > rtk::BackProjectionImageFilter"]; > OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; > OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; > Input0 -> OutofInput0 [arrowhead=none]; > OutofInput0 -> ForwardProject; > ConstantVolume -> BeforeBP [arrowhead=none]; > BeforeBP -> BackProjection; > Extract -> AfterExtract[arrowhead=none]; > AfterExtract -> MultiplyByZero; > AfterExtract -> Subtract; > MultiplyByZero -> ForwardProject; > Input1 -> Extract; > ForwardProject -> Subtract; > Subtract -> MultiplyByLambda; > MultiplyByLambda -> Divide; > Divide -> GatingWeight; > GatingWeight -> Displaced; > ConstantProjectionStack -> ExtractConstantProjection; > ExtractConstantProjection -> RayBox; > RayBox -> Divide; > Displaced -> BackProjection; > BackProjection -> OutofBP [arrowhead=none]; > } > > As you can see, it is a very large part of the SART reconstruction > filter, so yoiu might be better off just copying the whole > SARTConeBeamReconstructionFilter and modifying it. > > Of course, you could also look into ITK's cost function class, and see > if one of the classes inherited from it suits your needs, implement > your cost function this way, and use ITK's off-the-shelf solvers to > minimize it. See the inheritance diagram in > https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if > you want to try this approach. > > Best regards, > Cyril > > On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >> Hello RTK users and developers, >> >> I already implemented the RTK and reconstructed some images with the >> FDK algorithm implemented in RTK. It works well. Thanks to RTK >> developers. >> Now, I am trying to develop a model-based image reconstruction for >> our cone-beam micro-CT. I see already that some iterative algorithms >> like ART and its modifications and conjugate-gradient (CG) method are >> implemented in the RTK. I want to develop a model-based >> reconstruction through the Newton/quasi-Newton optimizations methods. >> I was wondering is it possible to extract the gradient of least >> square function from implemented algorithms like CG module? Any >> recommendation will be appreciated. >> >> Best Regards, >> Vahid >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 10:21:11 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 14:21:11 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. The RTKScatterGlareCorrectionImageFilter code is given below. //rtkLagCorrectionImageFilter typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); LagCorrection->SetInput(Projections); //rtkScatterGlareCorrectionImageFilter typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Cyril Mory, > > > Thank you for your help. We are able to reconstruct 1024 > volume now. > > But the reconstruction time is around 4 minutes. Can you > please help us to reduce the reconstruction time? > > We are using NVIDIA TITAN X GPU which has 12 GB memory. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > Dear Zahid, > > > > The output looks correct. > > > > If the command line solution I suggested in a previous email works, the > > best way to move forward would be to compare your code and that of > > rtkfdk.cxx, and where it differs, make sure you have not introduced an > > error. > > > > Cyril > > > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > > Dear Cyril Mory, > > > > > > I have done the same but the Output.mhd file is still 0 > > KB for 1024 volume. Please find the attachment of the status of the output > > displayed. > > > > > > Please suggest us for further process. > > > > > > > > > Thanks & Regards > > > > > > Zahid Hasan Ansari > > > > > > > > > > > > > > > ----- Original Message ----- > > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > > [mailto:simon.rit at creatis.insa-lyon.fr] > > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > > > > >> I see two errors: > > >> > > >> Remove this line > > >> > > >> writer->SetNumberOfStreamDivisions(4); > > >> > > >> since only the streaming filter, not the write filter, needs to know > > >> about the number of divisions. > > >> And change the filename to > > >> > > >> "D:\\Output.mhd" > > >> > > >> It will write both the .mhd and the .raw files. > > >> > > >> I hope it helps, > > >> Cyril > > >> > > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > >>> Dear Cyril Mory, > > >>> > > >>> I have modified my file writer code and used > > >> StreamingImageFilter. Now its not giving any error message but the > final > > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > > >>> Please check my modified file writer code given > below. > > >>> > > >>> // Streaming depending on streaming capability of writer > > >>> typedef itk::StreamingImageFilter > > >> StreamerType; > > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>> streamerBP->SetInput(feldkamp->GetOutput()); > > >>> streamerBP->SetNumberOfStreamDivisions(4); > > >>> > > >>> //create a writer and write reconstructed file > > >>> itk::ImageFileWriter::Pointer writer; > > >>> writer = itk::ImageFileWriter::New(); > > >>> writer->SetFileName("D:\\Output.raw"); > > >>> writer->SetImageIO(io); > > >>> writer->SetInput(streamerBP->GetOutput()); > > >>> writer->SetNumberOfStreamDivisions(4); > > >>> > > >>> > > >>> Please let me know if any clarification is required. > > >>> > > >>> > > >>> Thanks & Regards > > >>> > > >>> Zahid Hasan Ansari > > >>> Senior Design Engineer > > >>> Mobile No. +91-9738379729 > > >>> > > >>> Panacea Medical Technologies Pvt. Ltd. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >> http://www.panaceamedical.com > > >>> Bangalore - India. > > >>> > > >>> > > >>> > > >>> > > >>> ----- Original Message ----- > > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > > Rit > > >> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>> > > >>> > > >>>> Dear Zahid, > > >>>> > > >>>> The --divisions is an option of the command-line application rtkfdk. > It > > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > > >>>> rather, it is passed to a streaming filter at the end of the > pipeline. > > >>>> Look for the following bit of code in rtkfdk.cxx : > > >>>> > > >>>> // Streaming depending on streaming capability of writer > > >>>> typedef itk::StreamingImageFilter > >>>> CPUOutputImageType> StreamerType; > > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>>> streamerBP->SetInput( pfeldkamp ); > > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg > ); > > >>>> > > >>>> You can find information on how a streaming filter works on this > page: > > >>>> > > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > >>>> > > >>>> I hope it helps, > > >>>> > > >>>> Cyril > > >>>> > > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > >>>>> Dear Cyril Mory, > > >>>>> > > >>>>> I have tried but I am not getting where to give > > >>>> --division 4 in my code. > > >>>>> Please find my code given below and please let me > > know > > >>>> where I need to change in my code to make it work. > > >>>>> int _tmain(int argc, _TCHAR* argv[]) > > >>>>> { > > >>>>> #pragma region "Variable declaration" > > >>>>> const double PI = 3.14159265358979323846; > > >>>>> float *angles; > > >>>>> int nProj = 349; > > >>>>> typedef unsigned short pixelType; > > >>>>> typedef float OutpixelType; > > >>>>> const int dimension = 3; > > >>>>> typedef itk::Image imageType; > > >>>>> typedef itk::ImageRegionConstIterator > ImageIteratorType; > > >>>>> imageType::Pointer Projections = imageType::New(); > > >>>>> > > >>>>> #pragma endregion "Variable declaration" > > >>>>> > > >>>>> Projections = > > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > > >> nProj); > > >>>>> imageType::SpacingType pSpacing; > > >>>>> pSpacing[0] = 0.2960; > > >>>>> pSpacing[1] = 0.2960; > > >>>>> pSpacing[2] = 0.2960; > > >>>>> Projections->SetSpacing(pSpacing); > > >>>>> > > >>>>> imageType::PointType pOrigin; > > >>>>> pOrigin[0] = -212.972; > > >>>>> pOrigin[1] = -212.972; > > >>>>> pOrigin[2] = -212.972; //-158.50; > > >>>>> Projections->SetOrigin(pOrigin); > > >>>>> > > >>>>> Projections->Update(); > > >>>>> > > >>>>> //Read angles. > > >>>>> char *angles_file = > "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > >>>>> angles = new float[nProj]; > > >>>>> angles = readAngles(angles_file, angles); > > >>>>> > > >>>>> #pragma region"Geometry" > > >>>>> // Geometry object > > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > > >>>>> { > > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, > 0, > > >> 0); > > >>>> // 136 half fan //2.07 Kidwai // > > >>>>> } > > >>>>> > > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > > >>>> GeometryWriterType; > > >>>>> GeometryWriterType::Pointer geometryWriter = > > GeometryWriterType::New(); > > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > > >>>>> geometryWriter->SetObject(geometry); > > >>>>> geometryWriter->WriteFile(); > > >>>>> geometry->Update(); > > >>>>> #pragma endregion "Geometry" > > >>>>> > > >>>>> //Define output image type > > >>>>> > > >>>>> #ifdef USE_CUDA > > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > > PSSFType; > > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > >>>>> #else > > >>>>> typedef itk::Image OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter > PSSFType; > > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > > FDKType; > > >>>>> #endif > > >>>>> > > >>>>> //ScatterCorrection > > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter > imageType > > >>>> BoellaardScatterCorrectionImageFilterType; > > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer > ScatterCorrection > > = > > >>>> BoellaardScatterCorrectionImageFilterType::New(); > > >>>>> ScatterCorrection->SetInput(Projections); > > >>>>> > > >>>>> //VarianObiRawImageFilter > > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > > >>>> RawImageFilterType; > > >>>>> RawImageFilterType::Pointer AttenuationFilter = > > >>>> RawImageFilterType::New(); > > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > >>>>> > > >>>>> //Create the output image > > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > > >>>> ConstantImageSourceType; > > >>>>> ConstantImageSourceType::PointType origin_p; > > >>>>> ConstantImageSourceType::SizeType size_p; > > >>>>> ConstantImageSourceType::SpacingType spacing_p; > > >>>>> ConstantImageSourceType::Pointer projectionsSource = > > >>>> ConstantImageSourceType::New(); > > >>>>> origin_p[0] = -127.5; > > >>>>> origin_p[1] = -127.5; > > >>>>> origin_p[2] = -127.5; > > >>>>> size_p[0] = 512; > > >>>>> size_p[1] = 512; > > >>>>> size_p[2] = 512; > > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > >>>>> > > >>>>> projectionsSource->SetOrigin(origin_p); > > >>>>> projectionsSource->SetSpacing(spacing_p); > > >>>>> projectionsSource->SetSize(size_p); > > >>>>> projectionsSource->SetConstant(0); > > >>>>> > > >>>>> // Short scan image filter > > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > > >>>>> pssf->SetGeometry(geometry); > > >>>>> pssf->InPlaceOff(); > > >>>>> std::cout << "short scan image filter success" << std::endl; > > >>>>> > > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > > >>>>> feldkamp->SetGeometry(geometry); > > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > >>>>> feldkamp->SetGPUEnabled(1); > > >>>>> feldkamp->SetNumberOfThreads(10000); > > >>>>> > > >>>>> #pragma region "Write volume" > > >>>>> > > >>>>> //Create a raw io for writing > > >>>>> > > >>>>> itk::RawImageIO::Pointer io; > > >>>>> io = itk::RawImageIO::New(); > > >>>>> > > >>>>> for (unsigned int i = 0; i < dimension; i++) > > >>>>> { > > >>>>> io->SetDimensions(i, size_p[i]); > > >>>>> io->SetSpacing(i, spacing_p[i]); > > >>>>> io->SetOrigin(i, origin_p[i]); > > >>>>> } > > >>>>> io->SetHeaderSize(0); > > >>>>> io->SetByteOrderToLittleEndian(); > > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > > >>>>> io->SetNumberOfComponents(1); > > >>>>> io->SetNumberOfDimensions(3); > > >>>>> > > >>>>> //create a writer and write reconstructed file > > >>>>> itk::ImageFileWriter::Pointer writer; > > >>>>> writer = itk::ImageFileWriter::New(); > > >>>>> writer->SetFileName("D:\\Output.raw"); > > >>>>> writer->SetImageIO(io); > > >>>>> writer->SetInput(feldkamp->GetOutput()); > > >>>>> > > >>>>> try > > >>>>> { > > >>>>> writer->Update(); > > >>>>> } > > >>>>> catch (itk::ExceptionObject & excp) > > >>>>> { > > >>>>> std::cerr << "Error while writing the image " << std::endl; > > >>>>> std::cerr << excp << std::endl; > > >>>>> getchar(); > > >>>>> } > > >>>>> #pragma endregion "WriteVolume" > > >>>>> delete[] angles; > > >>>>> return 0; > > >>>>> } > > >>>>> > > >>>>> > > >>>>> > > >>>>> Thanks & Regards > > >>>>> > > >>>>> Zahid Hasan Ansari > > >>>>> Senior Design Engineer > > >>>>> Mobile No. +91-9738379729 > > >>>>> > > >>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >>>> http://www.panaceamedical.com > > >>>>> Bangalore - India. > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> ----- Original Message ----- > > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > > >> Rit > > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>> > > >>>>> > > >>>>>> Dear Zahid, > > >>>>>> > > >>>>>> I was able to perform a reconstruction from your header and > geometry > > >>>>>> file, using the following command lines: > > >>>>>> > > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > > >>>>>> --phantomscale "128,128,128" --like Output.mhd > > >>>>>> > > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > > >> --hardware > > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > >>>>>> > > >>>>>> The first computes projections through a Shepp & Logan phantom, > with > > >> the > > >>>>>> same size, spacing, origin, etc... as your projections, using your > > >>>>>> geometry file geo.xml. > > >>>>>> > > >>>>>> The second line performs the FDK reconstruction. I had to use both > > the > > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > > (3GB, > > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > > by > > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > > >>>>>> parts, reconstructs them one by one, then assembles the results. > Can > > >> you > > >>>>>> run the same commands and let us know whether you still encounter > the > > >>>>>> crash you mentioned ? If it works, you can use your own projection > > data > > >>>>>> in the second command line instead of "simulatedprojections.mha". > > >>>>>> > > >>>>>> Best, > > >>>>>> > > >>>>>> Cyril > > >>>>>> > > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > >>>>>> > > >>>>>>> Dear Sir, > > >>>>>>> > > >>>>>>> Please find the Header file in the attachment. > > >>>>>>> > > >>>>>>> > > >>>>>>> Thanks & Regards > > >>>>>>> > > >>>>>>> Zahid Hasan Ansari > > >>>>>>> > > >>>>>>> > > >>>>>>> ----- Original Message ----- > > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > Simon > > >>>> Rit > > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>> > > >>>>>>> > > >>>>>>>> Dear Zahid, > > >>>>>>>> > > >>>>>>>> We do not need the projections file, at least not for a first > stage > > >> of > > >>>>>>>> error tracking. We only need the header. > > >>>>>>>> Try the following command line: > > >>>>>>>> > > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > > >>>>>>>> > > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" > file > > is > > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > > >> contains > > >>>>>>>> the pixel values, but at the moment we do not need them. We will > > >> create > > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough > to > > >>>>>>>> track down the error you encounter. > > >>>>>>>> > > >>>>>>>> Looking forward to receiving your file, > > >>>>>>>> Cyril > > >>>>>>>> > > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > > >>>>>>>>> Dear Sir, > > >>>>>>>>> > > >>>>>>>>> The single raw file of the projections is 1.4 GB > > and > > >> we > > >>>> are > > >>>>>> not > > >>>>>>>> able to send this big file to you. Can you please suggest other > > >>>>>> alternatives > > >>>>>>>> for this? > > >>>>>>>>> Or can you provide us the PC configuration to > solve > > >> the > > >>>>>> issue? > > >>>>>>>>> Let me know if any other clarification is > required. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> Thanks & Regards > > >>>>>>>>> > > >>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> ----- Original Message ----- > > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > >> Simon > > >>>>>> Rit > > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>>> Hello Zahid, > > >>>>>>>>>> > > >>>>>>>>>> We will need the header of your projections file, too (It is > best > > >> if > > >>>>>> you > > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > > file, > > >> so > > >>>>>> it > > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > > >>>>>>>>>> > > >>>>>>>>>> Regards, > > >>>>>>>>>> Cyril > > >>>>>>>>>> > > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>> Dear Cyril Mory, > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> I have only used RTK version 1.3.0. but > in > > the > > >>>> error > > >>>>>>>>>> message it is showing RTK version 1.2.0. > > >>>>>>>>>>> Please find the attachment of the > geometry > > >> file > > >>>> of > > >>>>>> our > > >>>>>>>>>> projections. > > >>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>> > > >>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com], > > >>>> Simon > > >>>>>>>> Rit > > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, > saimahesh.m at panaceamedical.com > > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>> > > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > > >>>> source > > >>>>>> of > > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > > >>>>>> therefore > > >>>>>>>>>>>> yourself): > > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > > changes > > >> in > > >>>>>> the > > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so > your > > >>>>>> problem > > >>>>>>>>>>>> might disappear just by upgrading to the new version > > >>>>>>>>>>>> - create a small example that reproduces your problem. You > can, > > >> for > > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > > >> logan > > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look > at > > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > > an > > >>>>>>>>>>>> example). And send us the script > > >>>>>>>>>>>> - OR send us your geometry file and the header of your > > >> projections > > >>>>>> file > > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > > >>>>>> zero-filled > > >>>>>>>>>>>> stack of projections), and the command line that crashes > > >>>>>>>>>>>> > > >>>>>>>>>>>> Best regards, > > >>>>>>>>>>>> Cyril > > >>>>>>>>>>>> > > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>>>> Dear Simon Rit, > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Please find the screen shot in the > > >> attachment. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > > : > > >>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>>>> To: Zahid Hasan Ansari > > [mailto:zahidhasan.a at panaceamedical.com] > > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > > >>>>>>>> [mailto:rtk-users at public.kitware.com], > > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is > a > > >> CUDA > > >>>>>>>>>> memory > > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > > >> first > > >>>>>> make > > >>>>>>>>>>>> sure > > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > > >> images. > > >>>>>> If > > >>>>>>>> it > > >>>>>>>>>>>> is > > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > > --divisions. > > >>>> The > > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > > use > > >>>> of > > >>>>>>>> RTK > > >>>>>>>>>> on > > >>>>>>>>>>>>>> our case studies webpage > > >>>>>>>>>>>> . > > >>>>>>>>>>>>>> Simon > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Dear Sir\Madam, > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > > >>>>>> reconstruction > > >>>>>>>>>> using > > >>>>>>>>>>>> RTK > > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > > screen > > >>>>>> shoot > > >>>>>>>> of > > >>>>>>>>>>>>>>> the > > >>>>>>>>>>>>>>>> same. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am using the following items > given > > >> below. > > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > > console > > >>>>>>>> application > > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > > >>>>>>>>>>>>>>>> 5. CUDA 7. > > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Please provide the solution of this > > and > > >> let > > >>>> me > > >>>>>>>> know > > >>>>>>>>>> if > > >>>>>>>>>>>>>> any > > >>>>>>>>>>>>>>>> other clarification is required. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, > > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 > | > > >> Url > > >>>> : > > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>>>> > ____________________________________________________________ > > >>>>>>>>>>>>>>> ________________ > > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> This email and any files transmitted with it are > > confidential > > >>>> and > > >>>>>>>>>>>> intended > > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom > they > > >> are > > >>>>>>>>>>>> addressed. > > >>>>>>>>>>>>>>> If you have received this email in error please notify the > > >>>> system > > >>>>>>>>>>>> manager. > > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > > email > > >>>> are > > >>>>>>>>>>>> solely > > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > > of > > >>>> the > > >>>>>>>>>>>> company. > > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > > >>>> attachments > > >>>>>>>> for > > >>>>>>>>>>>> the > > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > > any > > >>>>>> damage > > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> This email and any files transmitted with it are > confidential > > >> and > > >>>>>>>>>> intended > > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > > are > > >>>>>>>>>> addressed. > > >>>>>>>>>>>>> If you have received this email in error please notify the > > >> system > > >>>>>>>>>> manager. > > >>>>>>>>>>>>> Please note that any views or opinions presented in this > email > > >> are > > >>>>>>>>>> solely > > >>>>>>>>>>>>> those of the author and do not necessarily represent those > of > > >> the > > >>>>>>>>>> company. > > >>>>>>>>>>>>> Finally, the recipient should check this email and any > > >> attachments > > >>>>>> for > > >>>>>>>>>> the > > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > > >>>> damage > > >>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>> ________________________________________ > > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > Area > > >>>>>> Phase > > >>>>>>>> 1, > > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > Industrial > > >>>>>> Area, > > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>> > > >>>>>>>>>>> This email and any files transmitted with it are confidential > > and > > >>>>>>>> intended > > >>>>>>>>>>> solely for the use of the individual or entity to whom they > are > > >>>>>>>> addressed. > > >>>>>>>>>>> If you have received this email in error please notify the > > system > > >>>>>>>> manager. > > >>>>>>>>>>> Please note that any views or opinions presented in this email > > are > > >>>>>>>> solely > > >>>>>>>>>>> those of the author and do not necessarily represent those of > > the > > >>>>>>>> company. > > >>>>>>>>>>> Finally, the recipient should check this email and any > > attachments > > >>>> for > > >>>>>>>> the > > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > > >> damage > > >>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>> > > >>>>>>>>> ________________________________________ > > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > > >>>> Phase > > >>>>>> 1, > > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > > >>>> Area, > > >>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>> > > >>>>>>>>> This email and any files transmitted with it are confidential > and > > >>>>>> intended > > >>>>>>>>> solely for the use of the individual or entity to whom they are > > >>>>>> addressed. > > >>>>>>>>> If you have received this email in error please notify the > system > > >>>>>> manager. > > >>>>>>>>> Please note that any views or opinions presented in this email > are > > >>>>>> solely > > >>>>>>>>> those of the author and do not necessarily represent those of > the > > >>>>>> company. > > >>>>>>>>> Finally, the recipient should check this email and any > attachments > > >> for > > >>>>>> the > > >>>>>>>>> presence of viruses. The company accepts no liability for any > > damage > > >>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>> ________________________________________ > > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > >> Phase > > >>>> 1, > > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > >> Area, > > >>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>> Fax : + 91 80 42428710 > > >>>>>>> Url : http://www.panaceamedical.com > > >>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>> > > >>>>>>> This email and any files transmitted with it are confidential and > > >>>> intended > > >>>>>>> solely for the use of the individual or entity to whom they are > > >>>> addressed. > > >>>>>>> If you have received this email in error please notify the system > > >>>> manager. > > >>>>>>> Please note that any views or opinions presented in this email are > > >>>> solely > > >>>>>>> those of the author and do not necessarily represent those of the > > >>>> company. > > >>>>>>> Finally, the recipient should check this email and any attachments > > for > > >>>> the > > >>>>>>> presence of viruses. The company accepts no liability for any > damage > > >>>>>>> caused by any virus transmitted by this email. > > >>>>>>> > > >>>>> ________________________________________ > > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>> Fax : + 91 80 42428710 > > >>>>> Url : http://www.panaceamedical.com > > >>>>> > > >> > > > ____________________________________________________________________________ > > >>>>> PMT EMAIL DISCLAIMER: > > >>>>> > > >>>>> This email and any files transmitted with it are confidential and > > >> intended > > >>>>> solely for the use of the individual or entity to whom they are > > >> addressed. > > >>>>> If you have received this email in error please notify the system > > >> manager. > > >>>>> Please note that any views or opinions presented in this email are > > >> solely > > >>>>> those of the author and do not necessarily represent those of the > > >> company. > > >>>>> Finally, the recipient should check this email and any attachments > for > > >> the > > >>>>> presence of viruses. The company accepts no liability for any damage > > >>>>> caused by any virus transmitted by this email. > > >>>>> > > >>>>> > > >>>>> > > >>>> > > >>> ________________________________________ > > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 > > >>> Fax : + 91 80 42428710 > > >>> Url : http://www.panaceamedical.com > > >>> > > >> > > > ____________________________________________________________________________ > > >>> PMT EMAIL DISCLAIMER: > > >>> > > >>> This email and any files transmitted with it are confidential and > > intended > > >>> solely for the use of the individual or entity to whom they are > > addressed. > > >>> If you have received this email in error please notify the system > > manager. > > >>> Please note that any views or opinions presented in this email are > > solely > > >>> those of the author and do not necessarily represent those of the > > company. > > >>> Finally, the recipient should check this email and any attachments for > > the > > >>> presence of viruses. The company accepts no liability for any damage > > >>> caused by any virus transmitted by this email. > > >>> > > >>> > > >>> > > >>> > > >>> > > >> > > >> > > > > > > ________________________________________ > > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > > Malur - 563130. Kolar District. INDIA. > > > > > > Tel : +91 80 4242 8700 / 2845 4785 > > > Fax : + 91 80 42428710 > > > Url : http://www.panaceamedical.com > > > > > > ____________________________________________________________________________ > > > PMT EMAIL DISCLAIMER: > > > > > > This email and any files transmitted with it are confidential and > intended > > > solely for the use of the individual or entity to whom they are > addressed. > > > If you have received this email in error please notify the system > manager. > > > Please note that any views or opinions presented in this email are > solely > > > those of the author and do not necessarily represent those of the > company. > > > Finally, the recipient should check this email and any attachments for > the > > > presence of viruses. The company accepts no liability for any damage > > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: ScatterGlareError.png Type: image/png Size: 121487 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 3 10:28:49 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 3 Nov 2016 15:28:49 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> References: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Message-ID: Hi, I think you should look at the applications before posting a question on the mailing list. There is a rtkscatterglarecorrection tool, look at rtkscatterglarecorrection.cxx. You must init the coefficients. I'll add a check to make the error message more readable but please, take the time to look at all the examples available in applications before posting a question. Thanks, Simon On Thu, Nov 3, 2016 at 3:21 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > > We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. > > The RTKScatterGlareCorrectionImageFilter code is given below. > > //rtkLagCorrectionImageFilter > typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; > LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); > LagCorrection->SetInput(Projections); > > //rtkScatterGlareCorrectionImageFilter > typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; > ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); > ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); > > > > > > Thanks & Regards > > Zahid Hasan Ansari > > > > ----- Original Message ----- > From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Cyril Mory, >> >> >> Thank you for your help. We are able to reconstruct 1024 >> volume now. >> >> But the reconstruction time is around 4 minutes. Can you >> please help us to reduce the reconstruction time? >> >> We are using NVIDIA TITAN X GPU which has 12 GB memory. >> >> >> Thanks & Regards >> >> Zahid Hasan Ansari >> >> >> >> >> ----- Original Message ----- >> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> >> >> > Dear Zahid, >> > >> > The output looks correct. >> > >> > If the command line solution I suggested in a previous email works, the >> > best way to move forward would be to compare your code and that of >> > rtkfdk.cxx, and where it differs, make sure you have not introduced an >> > error. >> > >> > Cyril >> > >> > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: >> > > Dear Cyril Mory, >> > > >> > > I have done the same but the Output.mhd file is still 0 >> > KB for 1024 volume. Please find the attachment of the status of the output >> > displayed. >> > > >> > > Please suggest us for further process. >> > > >> > > >> > > Thanks & Regards >> > > >> > > Zahid Hasan Ansari >> > > >> > > >> > > >> > > >> > > ----- Original Message ----- >> > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >> > [mailto:simon.rit at creatis.insa-lyon.fr] >> > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > > >> > > >> > >> I see two errors: >> > >> >> > >> Remove this line >> > >> >> > >> writer->SetNumberOfStreamDivisions(4); >> > >> >> > >> since only the streaming filter, not the write filter, needs to know >> > >> about the number of divisions. >> > >> And change the filename to >> > >> >> > >> "D:\\Output.mhd" >> > >> >> > >> It will write both the .mhd and the .raw files. >> > >> >> > >> I hope it helps, >> > >> Cyril >> > >> >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >> > >>> Dear Cyril Mory, >> > >>> >> > >>> I have modified my file writer code and used >> > >> StreamingImageFilter. Now its not giving any error message but the >> final >> > >> output is 0 byte for 1024 volume. It working fine for 512 volume. >> > >>> Please check my modified file writer code given >> below. >> > >>> >> > >>> // Streaming depending on streaming capability of writer >> > >>> typedef itk::StreamingImageFilter >> > >> StreamerType; >> > >>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>> streamerBP->SetInput(feldkamp->GetOutput()); >> > >>> streamerBP->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> //create a writer and write reconstructed file >> > >>> itk::ImageFileWriter::Pointer writer; >> > >>> writer = itk::ImageFileWriter::New(); >> > >>> writer->SetFileName("D:\\Output.raw"); >> > >>> writer->SetImageIO(io); >> > >>> writer->SetInput(streamerBP->GetOutput()); >> > >>> writer->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> >> > >>> Please let me know if any clarification is required. >> > >>> >> > >>> >> > >>> Thanks & Regards >> > >>> >> > >>> Zahid Hasan Ansari >> > >>> Senior Design Engineer >> > >>> Mobile No. +91-9738379729 >> > >>> >> > >>> Panacea Medical Technologies Pvt. Ltd. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >> http://www.panaceamedical.com >> > >>> Bangalore - India. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> ----- Original Message ----- >> > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> > Rit >> > >> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>> >> > >>> >> > >>>> Dear Zahid, >> > >>>> >> > >>>> The --divisions is an option of the command-line application rtkfdk. >> It >> > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >> > >>>> rather, it is passed to a streaming filter at the end of the >> pipeline. >> > >>>> Look for the following bit of code in rtkfdk.cxx : >> > >>>> >> > >>>> // Streaming depending on streaming capability of writer >> > >>>> typedef itk::StreamingImageFilter> > >>>> CPUOutputImageType> StreamerType; >> > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>>> streamerBP->SetInput( pfeldkamp ); >> > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg >> ); >> > >>>> >> > >>>> You can find information on how a streaming filter works on this >> page: >> > >>>> >> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> > >>>> >> > >>>> I hope it helps, >> > >>>> >> > >>>> Cyril >> > >>>> >> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >> > >>>>> Dear Cyril Mory, >> > >>>>> >> > >>>>> I have tried but I am not getting where to give >> > >>>> --division 4 in my code. >> > >>>>> Please find my code given below and please let me >> > know >> > >>>> where I need to change in my code to make it work. >> > >>>>> int _tmain(int argc, _TCHAR* argv[]) >> > >>>>> { >> > >>>>> #pragma region "Variable declaration" >> > >>>>> const double PI = 3.14159265358979323846; >> > >>>>> float *angles; >> > >>>>> int nProj = 349; >> > >>>>> typedef unsigned short pixelType; >> > >>>>> typedef float OutpixelType; >> > >>>>> const int dimension = 3; >> > >>>>> typedef itk::Image imageType; >> > >>>>> typedef itk::ImageRegionConstIterator >> ImageIteratorType; >> > >>>>> imageType::Pointer Projections = imageType::New(); >> > >>>>> >> > >>>>> #pragma endregion "Variable declaration" >> > >>>>> >> > >>>>> Projections = >> > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> > >> nProj); >> > >>>>> imageType::SpacingType pSpacing; >> > >>>>> pSpacing[0] = 0.2960; >> > >>>>> pSpacing[1] = 0.2960; >> > >>>>> pSpacing[2] = 0.2960; >> > >>>>> Projections->SetSpacing(pSpacing); >> > >>>>> >> > >>>>> imageType::PointType pOrigin; >> > >>>>> pOrigin[0] = -212.972; >> > >>>>> pOrigin[1] = -212.972; >> > >>>>> pOrigin[2] = -212.972; //-158.50; >> > >>>>> Projections->SetOrigin(pOrigin); >> > >>>>> >> > >>>>> Projections->Update(); >> > >>>>> >> > >>>>> //Read angles. >> > >>>>> char *angles_file = >> "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >> > >>>>> angles = new float[nProj]; >> > >>>>> angles = readAngles(angles_file, angles); >> > >>>>> >> > >>>>> #pragma region"Geometry" >> > >>>>> // Geometry object >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> > >>>>> GeometryType::Pointer geometry = GeometryType::New(); >> > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >> > >>>>> { >> > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, >> 0, >> > >> 0); >> > >>>> // 136 half fan //2.07 Kidwai // >> > >>>>> } >> > >>>>> >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> > >>>> GeometryWriterType; >> > >>>>> GeometryWriterType::Pointer geometryWriter = >> > GeometryWriterType::New(); >> > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >> > >>>>> geometryWriter->SetObject(geometry); >> > >>>>> geometryWriter->WriteFile(); >> > >>>>> geometry->Update(); >> > >>>>> #pragma endregion "Geometry" >> > >>>>> >> > >>>>> //Define output image type >> > >>>>> >> > >>>>> #ifdef USE_CUDA >> > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > >> PSSFType; >> > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> > >>>>> #else >> > >>>>> typedef itk::Image OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter >> PSSFType; >> > >>>>> typedef rtk::FDKConeBeamReconstructionFilter >> > FDKType; >> > >>>>> #endif >> > >>>>> >> > >>>>> //ScatterCorrection >> > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter> > imageType >> > >>>> BoellaardScatterCorrectionImageFilterType; >> > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer >> ScatterCorrection >> > = >> > >>>> BoellaardScatterCorrectionImageFilterType::New(); >> > >>>>> ScatterCorrection->SetInput(Projections); >> > >>>>> >> > >>>>> //VarianObiRawImageFilter >> > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> > >>>> RawImageFilterType; >> > >>>>> RawImageFilterType::Pointer AttenuationFilter = >> > >>>> RawImageFilterType::New(); >> > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >> > >>>>> >> > >>>>> //Create the output image >> > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >> > >>>> ConstantImageSourceType; >> > >>>>> ConstantImageSourceType::PointType origin_p; >> > >>>>> ConstantImageSourceType::SizeType size_p; >> > >>>>> ConstantImageSourceType::SpacingType spacing_p; >> > >>>>> ConstantImageSourceType::Pointer projectionsSource = >> > >>>> ConstantImageSourceType::New(); >> > >>>>> origin_p[0] = -127.5; >> > >>>>> origin_p[1] = -127.5; >> > >>>>> origin_p[2] = -127.5; >> > >>>>> size_p[0] = 512; >> > >>>>> size_p[1] = 512; >> > >>>>> size_p[2] = 512; >> > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >> > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >> > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >> > >>>>> >> > >>>>> projectionsSource->SetOrigin(origin_p); >> > >>>>> projectionsSource->SetSpacing(spacing_p); >> > >>>>> projectionsSource->SetSize(size_p); >> > >>>>> projectionsSource->SetConstant(0); >> > >>>>> >> > >>>>> // Short scan image filter >> > >>>>> PSSFType::Pointer pssf = PSSFType::New(); >> > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >> > >>>>> pssf->SetGeometry(geometry); >> > >>>>> pssf->InPlaceOff(); >> > >>>>> std::cout << "short scan image filter success" << std::endl; >> > >>>>> >> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); >> > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >> > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >> > >>>>> feldkamp->SetGeometry(geometry); >> > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >> > >>>>> feldkamp->SetGPUEnabled(1); >> > >>>>> feldkamp->SetNumberOfThreads(10000); >> > >>>>> >> > >>>>> #pragma region "Write volume" >> > >>>>> >> > >>>>> //Create a raw io for writing >> > >>>>> >> > >>>>> itk::RawImageIO::Pointer io; >> > >>>>> io = itk::RawImageIO::New(); >> > >>>>> >> > >>>>> for (unsigned int i = 0; i < dimension; i++) >> > >>>>> { >> > >>>>> io->SetDimensions(i, size_p[i]); >> > >>>>> io->SetSpacing(i, spacing_p[i]); >> > >>>>> io->SetOrigin(i, origin_p[i]); >> > >>>>> } >> > >>>>> io->SetHeaderSize(0); >> > >>>>> io->SetByteOrderToLittleEndian(); >> > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >> > >>>>> io->SetNumberOfComponents(1); >> > >>>>> io->SetNumberOfDimensions(3); >> > >>>>> >> > >>>>> //create a writer and write reconstructed file >> > >>>>> itk::ImageFileWriter::Pointer writer; >> > >>>>> writer = itk::ImageFileWriter::New(); >> > >>>>> writer->SetFileName("D:\\Output.raw"); >> > >>>>> writer->SetImageIO(io); >> > >>>>> writer->SetInput(feldkamp->GetOutput()); >> > >>>>> >> > >>>>> try >> > >>>>> { >> > >>>>> writer->Update(); >> > >>>>> } >> > >>>>> catch (itk::ExceptionObject & excp) >> > >>>>> { >> > >>>>> std::cerr << "Error while writing the image " << std::endl; >> > >>>>> std::cerr << excp << std::endl; >> > >>>>> getchar(); >> > >>>>> } >> > >>>>> #pragma endregion "WriteVolume" >> > >>>>> delete[] angles; >> > >>>>> return 0; >> > >>>>> } >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> Thanks & Regards >> > >>>>> >> > >>>>> Zahid Hasan Ansari >> > >>>>> Senior Design Engineer >> > >>>>> Mobile No. +91-9738379729 >> > >>>>> >> > >>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >>>> http://www.panaceamedical.com >> > >>>>> Bangalore - India. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> ----- Original Message ----- >> > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >> > >> Rit >> > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>> >> > >>>>> >> > >>>>>> Dear Zahid, >> > >>>>>> >> > >>>>>> I was able to perform a reconstruction from your header and >> geometry >> > >>>>>> file, using the following command lines: >> > >>>>>> >> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> > >>>>>> --phantomscale "128,128,128" --like Output.mhd >> > >>>>>> >> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> > >> --hardware >> > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> > >>>>>> >> > >>>>>> The first computes projections through a Shepp & Logan phantom, >> with >> > >> the >> > >>>>>> same size, spacing, origin, etc... as your projections, using your >> > >>>>>> geometry file geo.xml. >> > >>>>>> >> > >>>>>> The second line performs the FDK reconstruction. I had to use both >> > the >> > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory >> > (3GB, >> > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory >> > by >> > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> > >>>>>> parts, reconstructs them one by one, then assembles the results. >> Can >> > >> you >> > >>>>>> run the same commands and let us know whether you still encounter >> the >> > >>>>>> crash you mentioned ? If it works, you can use your own projection >> > data >> > >>>>>> in the second command line instead of "simulatedprojections.mha". >> > >>>>>> >> > >>>>>> Best, >> > >>>>>> >> > >>>>>> Cyril >> > >>>>>> >> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> > >>>>>> >> > >>>>>>> Dear Sir, >> > >>>>>>> >> > >>>>>>> Please find the Header file in the attachment. >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> Thanks & Regards >> > >>>>>>> >> > >>>>>>> Zahid Hasan Ansari >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> ----- Original Message ----- >> > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > Simon >> > >>>> Rit >> > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>> >> > >>>>>>> >> > >>>>>>>> Dear Zahid, >> > >>>>>>>> >> > >>>>>>>> We do not need the projections file, at least not for a first >> stage >> > >> of >> > >>>>>>>> error tracking. We only need the header. >> > >>>>>>>> Try the following command line: >> > >>>>>>>> >> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >> > >>>>>>>> >> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" >> file >> > is >> > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> > >> contains >> > >>>>>>>> the pixel values, but at the moment we do not need them. We will >> > >> create >> > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough >> to >> > >>>>>>>> track down the error you encounter. >> > >>>>>>>> >> > >>>>>>>> Looking forward to receiving your file, >> > >>>>>>>> Cyril >> > >>>>>>>> >> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >> > >>>>>>>>> Dear Sir, >> > >>>>>>>>> >> > >>>>>>>>> The single raw file of the projections is 1.4 GB >> > and >> > >> we >> > >>>> are >> > >>>>>> not >> > >>>>>>>> able to send this big file to you. Can you please suggest other >> > >>>>>> alternatives >> > >>>>>>>> for this? >> > >>>>>>>>> Or can you provide us the PC configuration to >> solve >> > >> the >> > >>>>>> issue? >> > >>>>>>>>> Let me know if any other clarification is >> required. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> Thanks & Regards >> > >>>>>>>>> >> > >>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> ----- Original Message ----- >> > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > >> Simon >> > >>>>>> Rit >> > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>>> Hello Zahid, >> > >>>>>>>>>> >> > >>>>>>>>>> We will need the header of your projections file, too (It is >> best >> > >> if >> > >>>>>> you >> > >>>>>>>>>> have all your projections as a single .mhd and a single .raw >> > file, >> > >> so >> > >>>>>> it >> > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >> > >>>>>>>>>> >> > >>>>>>>>>> Regards, >> > >>>>>>>>>> Cyril >> > >>>>>>>>>> >> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>> Dear Cyril Mory, >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> I have only used RTK version 1.3.0. but >> in >> > the >> > >>>> error >> > >>>>>>>>>> message it is showing RTK version 1.2.0. >> > >>>>>>>>>>> Please find the attachment of the >> geometry >> > >> file >> > >>>> of >> > >>>>>> our >> > >>>>>>>>>> projections. >> > >>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>> >> > >>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>>>> To: Zahid Hasan Ansari >> [mailto:zahidhasan.a at panaceamedical.com], >> > >>>> Simon >> > >>>>>>>> Rit >> > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, >> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the >> > >>>> source >> > >>>>>> of >> > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >> > >>>>>> therefore >> > >>>>>>>>>>>> yourself): >> > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable >> > changes >> > >> in >> > >>>>>> the >> > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so >> your >> > >>>>>> problem >> > >>>>>>>>>>>> might disappear just by upgrading to the new version >> > >>>>>>>>>>>> - create a small example that reproduces your problem. You >> can, >> > >> for >> > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> > >> logan >> > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look >> at >> > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need >> > an >> > >>>>>>>>>>>> example). And send us the script >> > >>>>>>>>>>>> - OR send us your geometry file and the header of your >> > >> projections >> > >>>>>> file >> > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >> > >>>>>> zero-filled >> > >>>>>>>>>>>> stack of projections), and the command line that crashes >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Best regards, >> > >>>>>>>>>>>> Cyril >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>>>> Dear Simon Rit, >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Please find the screen shot in the >> > >> attachment. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >> > : >> > >>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>>>> To: Zahid Hasan Ansari >> > [mailto:zahidhasan.a at panaceamedical.com] >> > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >> > >>>>>>>> [mailto:rtk-users at public.kitware.com], >> > >>>>>>>>>>>> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is >> a >> > >> CUDA >> > >>>>>>>>>> memory >> > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> > >> first >> > >>>>>> make >> > >>>>>>>>>>>> sure >> > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> > >> images. >> > >>>>>> If >> > >>>>>>>> it >> > >>>>>>>>>>>> is >> > >>>>>>>>>>>>>> no sufficient, you can split your volume using the >> > --divisions. >> > >>>> The >> > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >> > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the >> > use >> > >>>> of >> > >>>>>>>> RTK >> > >>>>>>>>>> on >> > >>>>>>>>>>>>>> our case studies webpage >> > >>>>>>>>>>>> . >> > >>>>>>>>>>>>>> Simon >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >> > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Dear Sir\Madam, >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >> > >>>>>> reconstruction >> > >>>>>>>>>> using >> > >>>>>>>>>>>> RTK >> > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the >> > screen >> > >>>>>> shoot >> > >>>>>>>> of >> > >>>>>>>>>>>>>>> the >> > >>>>>>>>>>>>>>>> same. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am using the following items >> given >> > >> below. >> > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >> > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >> > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit >> > console >> > >>>>>>>> application >> > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >> > >>>>>>>>>>>>>>>> 5. CUDA 7. >> > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >> > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Please provide the solution of this >> > and >> > >> let >> > >>>> me >> > >>>>>>>> know >> > >>>>>>>>>> if >> > >>>>>>>>>>>>>> any >> > >>>>>>>>>>>>>>>> other clarification is required. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> > EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, >> > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 >> | >> > >> Url >> > >>>> : >> > >>>>>>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>>>> >> ____________________________________________________________ >> > >>>>>>>>>>>>>>> ________________ >> > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> This email and any files transmitted with it are >> > confidential >> > >>>> and >> > >>>>>>>>>>>> intended >> > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom >> they >> > >> are >> > >>>>>>>>>>>> addressed. >> > >>>>>>>>>>>>>>> If you have received this email in error please notify the >> > >>>> system >> > >>>>>>>>>>>> manager. >> > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this >> > email >> > >>>> are >> > >>>>>>>>>>>> solely >> > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those >> > of >> > >>>> the >> > >>>>>>>>>>>> company. >> > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >>>> attachments >> > >>>>>>>> for >> > >>>>>>>>>>>> the >> > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> > any >> > >>>>>> damage >> > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> This email and any files transmitted with it are >> confidential >> > >> and >> > >>>>>>>>>> intended >> > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> > are >> > >>>>>>>>>> addressed. >> > >>>>>>>>>>>>> If you have received this email in error please notify the >> > >> system >> > >>>>>>>>>> manager. >> > >>>>>>>>>>>>> Please note that any views or opinions presented in this >> email >> > >> are >> > >>>>>>>>>> solely >> > >>>>>>>>>>>>> those of the author and do not necessarily represent those >> of >> > >> the >> > >>>>>>>>>> company. >> > >>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >> attachments >> > >>>>>> for >> > >>>>>>>>>> the >> > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> any >> > >>>> damage >> > >>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > Area >> > >>>>>> Phase >> > >>>>>>>> 1, >> > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > Industrial >> > >>>>>> Area, >> > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>> >> > >>>>>>>>>>> This email and any files transmitted with it are confidential >> > and >> > >>>>>>>> intended >> > >>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >> > >>>>>>>> addressed. >> > >>>>>>>>>>> If you have received this email in error please notify the >> > system >> > >>>>>>>> manager. >> > >>>>>>>>>>> Please note that any views or opinions presented in this email >> > are >> > >>>>>>>> solely >> > >>>>>>>>>>> those of the author and do not necessarily represent those of >> > the >> > >>>>>>>> company. >> > >>>>>>>>>>> Finally, the recipient should check this email and any >> > attachments >> > >>>> for >> > >>>>>>>> the >> > >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> > >> damage >> > >>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>> >> > >>>>>>>>> ________________________________________ >> > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >> > >>>> Phase >> > >>>>>> 1, >> > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >> > >>>> Area, >> > >>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>> >> > >>>>>>>>> This email and any files transmitted with it are confidential >> and >> > >>>>>> intended >> > >>>>>>>>> solely for the use of the individual or entity to whom they are >> > >>>>>> addressed. >> > >>>>>>>>> If you have received this email in error please notify the >> system >> > >>>>>> manager. >> > >>>>>>>>> Please note that any views or opinions presented in this email >> are >> > >>>>>> solely >> > >>>>>>>>> those of the author and do not necessarily represent those of >> the >> > >>>>>> company. >> > >>>>>>>>> Finally, the recipient should check this email and any >> attachments >> > >> for >> > >>>>>> the >> > >>>>>>>>> presence of viruses. The company accepts no liability for any >> > damage >> > >>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>> ________________________________________ >> > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > >> Phase >> > >>>> 1, >> > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > >> Area, >> > >>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>> Fax : + 91 80 42428710 >> > >>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>> >> > >>>>>>> This email and any files transmitted with it are confidential and >> > >>>> intended >> > >>>>>>> solely for the use of the individual or entity to whom they are >> > >>>> addressed. >> > >>>>>>> If you have received this email in error please notify the system >> > >>>> manager. >> > >>>>>>> Please note that any views or opinions presented in this email are >> > >>>> solely >> > >>>>>>> those of the author and do not necessarily represent those of the >> > >>>> company. >> > >>>>>>> Finally, the recipient should check this email and any attachments >> > for >> > >>>> the >> > >>>>>>> presence of viruses. The company accepts no liability for any >> damage >> > >>>>>>> caused by any virus transmitted by this email. >> > >>>>>>> >> > >>>>> ________________________________________ >> > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>> Fax : + 91 80 42428710 >> > >>>>> Url : http://www.panaceamedical.com >> > >>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>> PMT EMAIL DISCLAIMER: >> > >>>>> >> > >>>>> This email and any files transmitted with it are confidential and >> > >> intended >> > >>>>> solely for the use of the individual or entity to whom they are >> > >> addressed. >> > >>>>> If you have received this email in error please notify the system >> > >> manager. >> > >>>>> Please note that any views or opinions presented in this email are >> > >> solely >> > >>>>> those of the author and do not necessarily represent those of the >> > >> company. >> > >>>>> Finally, the recipient should check this email and any attachments >> for >> > >> the >> > >>>>> presence of viruses. The company accepts no liability for any damage >> > >>>>> caused by any virus transmitted by this email. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>> >> > >>> ________________________________________ >> > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>> Fax : + 91 80 42428710 >> > >>> Url : http://www.panaceamedical.com >> > >>> >> > >> >> > >> ____________________________________________________________________________ >> > >>> PMT EMAIL DISCLAIMER: >> > >>> >> > >>> This email and any files transmitted with it are confidential and >> > intended >> > >>> solely for the use of the individual or entity to whom they are >> > addressed. >> > >>> If you have received this email in error please notify the system >> > manager. >> > >>> Please note that any views or opinions presented in this email are >> > solely >> > >>> those of the author and do not necessarily represent those of the >> > company. >> > >>> Finally, the recipient should check this email and any attachments for >> > the >> > >>> presence of viruses. The company accepts no liability for any damage >> > >>> caused by any virus transmitted by this email. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > >> >> > >> >> > > >> > > ________________________________________ >> > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >> > Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> > Malur - 563130. Kolar District. INDIA. >> > > >> > > Tel : +91 80 4242 8700 / 2845 4785 >> > > Fax : + 91 80 42428710 >> > > Url : http://www.panaceamedical.com >> > > >> > >> ____________________________________________________________________________ >> > > PMT EMAIL DISCLAIMER: >> > > >> > > This email and any files transmitted with it are confidential and >> intended >> > > solely for the use of the individual or entity to whom they are >> addressed. >> > > If you have received this email in error please notify the system >> manager. >> > > Please note that any views or opinions presented in this email are >> solely >> > > those of the author and do not necessarily represent those of the >> company. >> > > Finally, the recipient should check this email and any attachments for >> the >> > > presence of viruses. The company accepts no liability for any damage >> > > caused by any virus transmitted by this email. >> > > >> > >> > >> > > > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Thu Nov 3 16:10:31 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 20:10:31 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Message-ID: <1775591917.651990.1478203831679@mail.yahoo.com> OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right?About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question:I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards,Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Fri Nov 4 02:31:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 4 Nov 2016 07:31:18 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1775591917.651990.1478203831679@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> Message-ID: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: > OK. good. Thank Cyril to clarify it to me. To implement the Newton's > methods instead of multiplication of R with R^T, we need the > multiplication of Jacobian/Sensitivity (R here) matrix with vector > variable (here x) and the gradient vector (here multiplication of R > with -r). I think it is possible to implement the Newton optimization > methods with the current modules as I think we could extract the R and > f dot product and R and r dot product. Am I right? > About the displayed algorithms, I think the gradient vector is dot > product of matrix A (Jacobian) with the minus residual vector (-r). > > One more question: > I already developed my codes in python. Do you think it is easy to > wrap your modules in python? I don't have experience in these subject. > > Regards, > Vahid > > > On Thursday, November 3, 2016 2:23 AM, Cyril Mory > wrote: > > > Hello Vahid, > Thank you for this insight on Newton's methods. Yes, the output of the > backprojection filter, in SART, is the gradient of the cost function. > You may have noticed that the pipeline performs a division of the > forward projection by something coming from > "RayBoxIntersectionFilter". This is to normalize the forward > projection, so that R^T R f ~= blurry f. If you don't do it, you'll > have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, > and your algorithm will quickly diverge. > You could try to extract the gradient from the conjugate gradient > filter as well, but it is significantly more tricky: first, the CG > filter was implemented from the following algorithm, taken from > wikipedia (which embeds the normalization I was mentioning earlier): > In this algorithm, it is not clear to me what exactly is the gradient > of the cost function. I would say it is something like "- r_k", but > I'm not sure. Second, as you see, the CG filter needs an operator A, > which may differ from one problem to another, so this operator is > implemented in a separate filter, which in your case would be > rtkReconstructionConjugateGradientOperator, with the laplacian > regularization parameter gamma set to 0. > Note that we never actually store the system matrix R. Instead, the > interpolation coefficient it contains are re-computed on the fly > everytime we forward project. And the same holds for backprojection, > i.e the matrix R^T. > Best, > Cyril > > On 11/03/2016 03:38 AM, vahid ettehadi wrote: >> Hello Simon and Cyril, >> Thanks for the reply. >> You are right Simon. I did not notice it too in the literature. The >> main problem as you said is the storage. Actually I developed the >> conjugate gradient (CG), quasi-Newton and Newton optimization methods >> for optical tomography and I intended to apply them to the CT >> reconstruction as well. I implemented the Newton's methods >> (Gauss-Newton and Levenberg-Marquardt) in a >> Jacobian-Free-Newton-Krylov approaches to avoid the matrix >> multiplication of Jacobians (sensitivity). It means we only need to >> store the Jacobian matrix for the these methods (the matrix R that >> Cyril was mentioned), that is still a big matrix for practical >> problems in CT reconstruction. For the quasi-Newton I adapted an >> L-BFGS algorithm that only need the 3 or 8 last iterations of the >> gradient vector to calculate the Hessian matrix. In my case, the >> L-BFGS and Newton's methods was much faster than the CG as you know >> because of using the second order derivative (hessian matrix). I saw >> in your last paper you implement the conjugate gradient method, so I >> thought it might be easy to extract the gradient vector from CG >> modules and solve the cost function within the quasi-Newton/Newton >> methods. I will look at the codes to see what I can do. >> Thanks again for the reply. >> >> @Cyril: >> Please correct me if I am wrong. you mean the output of >> backProjectionFilter is the gradient of defined cost function? >> >> Regards, >> Vahid >> >> >> On Wednesday, November 2, 2016 2:53 AM, Cyril Mory >> >> wrote: >> >> >> Hi Vahid, >> Welcome to RTK :) >> Indeed, there are several iterative methods already implemented in >> RTK, but none of the filters allows you to easily extract the >> gradient of the least squares function there are minimizing. >> If you need to minimize the classical non-regularized tomographic >> cost function, ie || R f - p ||?, with R the forward projection >> operator, f the volume you are looking for, and p the measured >> projections, my best advice would be to copy some part of the >> pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, >> ie the following part (copy-paste this into webgraphviz.com) >> >> digraph SARTConeBeamReconstructionFilter { >> >> Input0 [ label="Input 0 (Volume)"]; >> Input0 [shape=Mdiamond]; >> Input1 [label="Input 1 (Projections)"]; >> Input1 [shape=Mdiamond]; >> >> node [shape=box]; >> ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref >> rtk::ForwardProjectionImageFilter"]; >> Extract [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref >> itk::MultiplyImageFilter"]; >> AfterExtract [label="", fixedsize="false", width=0, height=0, >> shape=none]; >> Subtract [ label="itk::SubtractImageFilter" URL="\ref >> itk::SubtractImageFilter"]; >> MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" >> URL="\ref itk::MultiplyImageFilter"]; >> Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref >> itk::DivideOrZeroOutImageFilter"]; >> GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" >> URL="\ref itk::MultiplyImageFilter", style=dashed]; >> Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref >> rtk::DisplacedDetectorImageFilter"]; >> ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref >> rtk::RayBoxIntersectionImageFilter"]; >> ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref >> rtk::BackProjectionImageFilter"]; >> OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; >> OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; >> Input0 -> OutofInput0 [arrowhead=none]; >> OutofInput0 -> ForwardProject; >> ConstantVolume -> BeforeBP [arrowhead=none]; >> BeforeBP -> BackProjection; >> Extract -> AfterExtract[arrowhead=none]; >> AfterExtract -> MultiplyByZero; >> AfterExtract -> Subtract; >> MultiplyByZero -> ForwardProject; >> Input1 -> Extract; >> ForwardProject -> Subtract; >> Subtract -> MultiplyByLambda; >> MultiplyByLambda -> Divide; >> Divide -> GatingWeight; >> GatingWeight -> Displaced; >> ConstantProjectionStack -> ExtractConstantProjection; >> ExtractConstantProjection -> RayBox; >> RayBox -> Divide; >> Displaced -> BackProjection; >> BackProjection -> OutofBP [arrowhead=none]; >> } >> >> As you can see, it is a very large part of the SART reconstruction >> filter, so yoiu might be better off just copying the whole >> SARTConeBeamReconstructionFilter and modifying it. >> >> Of course, you could also look into ITK's cost function class, and >> see if one of the classes inherited from it suits your needs, >> implement your cost function this way, and use ITK's off-the-shelf >> solvers to minimize it. See the inheritance diagram in >> https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if >> you want to try this approach. >> >> Best regards, >> Cyril >> >> On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >>> Hello RTK users and developers, >>> >>> I already implemented the RTK and reconstructed some images with the >>> FDK algorithm implemented in RTK. It works well. Thanks to RTK >>> developers. >>> Now, I am trying to develop a model-based image reconstruction for >>> our cone-beam micro-CT. I see already that some iterative algorithms >>> like ART and its modifications and conjugate-gradient (CG) method >>> are implemented in the RTK. I want to develop a model-based >>> reconstruction through the Newton/quasi-Newton optimizations >>> methods. I was wondering is it possible to extract the gradient of >>> least square function from implemented algorithms like CG module? >>> Any recommendation will be appreciated. >>> >>> Best Regards, >>> Vahid >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Fri Nov 4 16:42:08 2016 From: julien.jomier at kitware.com (Julien Jomier) Date: Fri, 4 Nov 2016 21:42:08 +0100 Subject: [Rtk-users] SimpleRTK + Matlab In-Reply-To: References: <06d4327e-9fd4-bf08-565d-5304f577b521@creatis.insa-lyon.fr> Message-ID: <89255846-9a06-a625-45f1-88d140c0013d@kitware.com> Hi Arvid, Sorry for the late reply. We successfully build the latest RTK with ITK 4.11.0 on Visual Studio 2013 with static libraries (BUILD_SHARED_LIBS set to OFF). I have just pushed a fix to SimpleRTK to build as shared libraries. Note that you would need to have ITK built as shared libraries as well. Let us know if you still have any issues, Julien On 23/09/2016 10:29, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi again. > > I've been spending some more time with this, and feel I learned a little > bit more. I have now tested this on several machines with several > compiler versions (more or less all of them) and serveral cmake versions > - all with Windows 7. > > I can actually reproduce the successful build you linked to, but this > can only be done if you do not include any of the language wrappings, > like in the build you linked to. Enable any of them, and the build will > break. (see attachment) > > I suspect it must have been working in the past, but since none of them > are included in your test there have been a breaking change, and none of > them work anymore. > > I am still trying to tweak then projects manually to build SimpleRTK > with some sort of language support, but still without any luck. > > best > > Arvid > > On Tue, Sep 20, 2016 at 4:19 PM, Simon Rit > > > wrote: > > Hi, > Sorry, I won't be able to help but I'd advise to tick on WRAP_PYTHON > only at first in cmake, not the other languages (i.e., tick off > WRAP_LUA). > I can't solve your problem but Kitware is going to look into an > upgrade of SimpleRTK in the coming days, I'll ask them if they know > what is the issue. If you look here: > http://my.cdash.org/viewNotes.php?buildid=1052065 > > this is a nightly build of SimpleRTK on Windows and it seems to > work. I don't see why it wouldn't work for you. > Simon > > On Tue, Sep 20, 2016 at 2:17 PM, Arvid Piehl Lauritsen B?ttiger > > wrote: > > Hi again. > > I understand, but could you please help me get in contact with > the person who knows something about the windows build (if any), > I think there is something wrong. > > I have been investigating the build problems I had and found > that in the sub folder "SimpleRTK-build" there is a solutions > file with SimpleRTK. I opened it up and found the projects which > I had problems building: "SimpleRTKCommon", > "SimpleRTKBasicFilters0", "SimpleRTKBasicFilters1" etc. > > When I then tried to build SimpleRTKCommon manually it just > compiled without any problems. However, when I followed up by > building "SimpleRTKBasicFilters0" it gave me an error which > stated that it couldn't find "SimpleRTKCommon-0.9.lib" - which I > just build. > > After some more investigation I realized that the > SimpleRTKCommon is set to build a dynamic linked library (DLL), > and SimpleRTKBasicFilters0 expects it to be a static linked > library (LIB). After changing SimpleRTKCommon to be build as a > static library - and changing the output location - I could > build SimpleRTKBasicFilters0. > > However, SimpleRTKBasicFilters0 is also build as an DLL, but > changing that to a LIB as well I could build > SimpleRTKBasicFilters1, then SimpleRTKBasicFilters2 and then > SimpleRTKBasicFilters3. You get the point. > > I'm unsure if the intention is to build them as static or > dynamic libraries, but in any case the current build > configuration doesn't work - on my setup at least. > > However, I should note than for some reason the "lua5" project > did build successfully out of the box. Whatever it does > differently works. > > best > > Arvid > > > > On Tue, Sep 20, 2016 at 7:33 AM, Simon Rit > > wrote: > > I'm not an msvc specialist but your first line suggests that > you have pasted only part of the log: > > 20> Done Building Project > "C:\Users\aplb\Work\RTK\RTK1.2-bin-vs13\SimpleRTK-build\ALL_BUILD.vcxproj" > (default targets) -- FAILED. > > What you need to find out is why this build failed. If the > build fails, the linking cannot work. > Cheers, > Simon > > > On 19/09/2016 19:44, Arvid Piehl Lauritsen B?ttiger wrote: >> I did a complete rebuild, and here is the end of the >> output: http://pastebin.com/hvQ33WWg >> >> I have to admit I'm not sure what to make of it. I should >> note that I'm trying to compile the version I just pulled >> from git earlier today, since the other version I normally >> work with is really old. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 6:50 PM, Simon Rit >> > > wrote: >> >> SimpleRTKCommon is a library generated when compiling. >> Don't you have another error before that which >> explains why it did not compile? >> Simon >> >> On Mon, Sep 19, 2016 at 2:30 PM, Arvid Piehl Lauritsen >> B?ttiger > > wrote: >> >> Hi again. >> >> I've been trying to get it working. However, I did >> run into some problems compiling SimpleRTK. The >> main issue seems to be that it depends on >> SimpleRTKCommon - which I do not have. >> >> Here is the last few lines from VS2013 >> >> > 5>LINK : fatal error LNK1181: cannot open input >> file '..\..\..\lib\Debug\SimpleRTKCommon-0.9.lib' >> [C:\Users\aplb\Work\RTK\RTK1.2- >> > >> bin-vs13\SimpleRTK-build\Code\IO\src\SimpleRTKIO.vcxproj] >> > 5> >> > 5> 0 Warning(s) >> > 5> 2 Error(s) >> > 5> >> > 5> Time Elapsed 00:00:25.26 >> > ========== Build: 4 succeeded, 1 failed, 0 >> up-to-date, 0 skipped ========== >> >> I'm not quite sure what is going on, because the >> only reference I can find to SimpleRTKCommon is >> the CMakeLists.txt on github: >> https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/CMakeLists.txt >> >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:19 AM, Simon Rit >> > > wrote: >> >> The latest MacOS. It's nice if you can test it >> on other platforms, I'll try to run it on >> Linux but I have to upgrade matlab first (I >> think python calls are available starting with >> Matlab 2014). >> Simon >> >> On Mon, Sep 19, 2016 at 11:14 AM, Arvid Piehl >> Lauritsen B?ttiger > > wrote: >> >> Dear Simon >> >> This look very interesting! Which platform >> did you successfully execute this on? >> I will give it a try at once (on windows) >> and let you know if I run into any problems. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:05 AM, Simon >> Rit > > >> wrote: >> >> Dear RTK users, >> I have quickly tested calling the >> SimpleRTK python lib from Matlab and >> it seems to work well: >> http://wiki.openrtk.org/index.php/SimpleRTK#Matlab >> >> Therefore, I don't think we have to >> work on Matlab wrappings but let us >> know if you think otherwise. >> Future works include a simple >> installation mechanism for >> pre-compiled SimpleRTK libraries. >> We'll keep you posted! >> Simon >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> >> >> >> >> > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From w_ettehadi at yahoo.com Mon Nov 7 16:53:54 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Mon, 7 Nov 2016 21:53:54 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Message-ID: <1477848112.17731.1478555634307@mail.yahoo.com> Thanks Cyril for your time and advises. Vahid On Friday, November 4, 2016 2:31 AM, Cyril Mory wrote: Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right? About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question: I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards, Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Philipp.Freislederer at med.uni-muenchen.de Thu Nov 17 05:08:09 2016 From: Philipp.Freislederer at med.uni-muenchen.de (Freislederer, Philipp) Date: Thu, 17 Nov 2016 10:08:09 +0000 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac Message-ID: Dear all, I currently have some issues in generating off-plane projections where I think rtk might be helpful. I am trying to generate projections from an Brainlab ExacTrac geometry. What I am getting is a projection matrix generated by the system itself. Using only this information I am able to project any voxel value in a CT onto a panel. Now, in order to speed everything up a little and not re-implement everything that has been done sufficiently already I am hoping to use 'rtkforwardprojections'. The problem is I am not able to reproduce the Brainlab geometry using 'rtksimulatedgeometry' from the projection matrix directly. I could calculate the room angle of the source to the panel from the projection matrix but I am getting weird results when applying these on something like plastimatch, so I think I have an error in there. Is there a way of creating a geometry simply from the projection matrix or do I have to work around and calculate every parameter needed specifically? Maybe someone has some experience with this type of issue. Thanks in advance! Philipp -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 17 05:27:14 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 17 Nov 2016 11:27:14 +0100 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac In-Reply-To: References: Message-ID: Hi, Yes ! I have actually added that functionality recently from Thibault Notargiacomo's code see bool rtk::ThreeDCircularProjectionGeometry::AddProjection ( const HomogeneousProjectionMatrixType & pMat) Note that the projection matrix must be for a 3D position in mm to a 2D position in mm. You can add pre-/post-matrices to go from mm to voxel. There is no command line tool to do it but you can easily create your command line tool to do it. This is tested in testing/rtkgeometryfrommatrixtest.cxx. Let me know if you need more info, Simon On Thu, Nov 17, 2016 at 11:08 AM, Freislederer, Philipp < Philipp.Freislederer at med.uni-muenchen.de> wrote: > Dear all, > > > > I currently have some issues in generating off-plane projections where I > think rtk might be helpful. > > I am trying to generate projections from an Brainlab ExacTrac geometry. > > What I am getting is a projection matrix generated by the system itself. > Using only this information I am able to project any voxel value in a CT > onto a panel. > > Now, in order to speed everything up a little and not re-implement > everything that has been done sufficiently already I am hoping to use > ?rtkforwardprojections?. > > The problem is I am not able to reproduce the Brainlab geometry using > ?rtksimulatedgeometry? from the projection matrix directly. > > I could calculate the room angle of the source to the panel from the > projection matrix but I am getting weird results when applying these on > something like plastimatch, so I think I have an error in there. > > > > Is there a way of creating a geometry simply from the projection matrix or > do I have to work around and calculate every parameter needed specifically? > > Maybe someone has some experience with this type of issue. > > > > Thanks in advance! > > > > Philipp > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Sat Nov 19 14:51:24 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Sat, 19 Nov 2016 19:51:24 +0000 Subject: [Rtk-users] Geometric calibration Message-ID: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ From simon.rit at creatis.insa-lyon.fr Tue Nov 22 02:01:19 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 22 Nov 2016 08:01:19 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: Message-ID: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper ). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > Hi RTK users, > > I'm interested in reconstructing images acquired by a fluoroscopy system > rotating around a knee phantom. Unfortunately, I've been unsuccessful so > far. I recognize some of the phantom in the reconstructed image, but it > contains double contours and the shape is deformed. > > I think the issue might be incorrect geometry specification. I have images > also including a phantom containing markers for which we know the > coordinates, which should allow us to calibrate the system. On the wiki on > image quality, I saw that some users had developed scripts to do the > calibration? Would someone be willing to share it? > > Kind regards, > Sepp > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: after.pdf Type: application/pdf Size: 5974 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: before.pdf Type: application/pdf Size: 5678 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: calib.py Type: text/x-python Size: 2488 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 23 12:44:11 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 23 Nov 2016 18:44:11 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Andreas, Today we had the RTK training and some users were looking for a XIM file reader. I pointed to your contributions but any chance to have it put in RTK soon? Thanks in advance, Simon On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit wrote: > Hi, > Thanks for sharing. There still seems to be some streak artefacts, do you > see the same in the Varian reconstruction? > I'm looking forward to the pull-request, I think we should try to make the > bzip2 optional. > Simon > > On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < > andreasg at phys.au.dk> wrote: > >> Thanks for the fast response Simon! >> >> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >> right all along! >> I just didn't get why it makes a difference. I think I do now, as the >> resulting image was flipped upside down and not left/right as I expected. >> [attached] >> >> The reconstruction is significantly better, I'll look into what should be >> included in the reader and what I should keep in my program to keep >> conformity with the other readers. Then I'll create a pull request. >> >> Just for the purpose of others hitting the same or a similar bug, I also >> attempted: >> I did the SART reconstruction with 10 iterations, lambda=0.3, and Joseph >> back/forward projection, *but with no* significant improvement [attached] >> >> And: >> If you want you can download the data set from: [Dropbox link to 460MB >> zip (I'll >> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >> is used along with the Scan.xml (Calibrations folder may be used in the >> future in my program, but I'm not sure if you can rely on the existence of >> the content). >> >> A MatLab XimReader is available: link >> (also >> available from Varian bitbucket along a with a python version and a >> C#->matlab plugin >> ). >> Otherwise my fork with the RTK-style reader is available from the same >> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >> so bzip2 is a new dependancy). >> >> Best regards >> Andreas >> >> >> __________________________________ >> >> Andreas Gravgaard Andersen >> >> Department of Oncology, >> >> Aarhus University Hospital >> >> N?rrebrogade 44, >> >> 8000, Aarhus C >> >> Mail: andreasg at phys.au.dk >> >> Cell: +45 3165 8140 >> >> >> >> 2016-09-16 16:13 GMT+02:00 Simon Rit : >> >>> Hi, >>> You can try any iterative reconstruction, they can also handle short >>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>> However, the nature of the artifacts indicate more a problem in the >>> geometry in my opinion. I have seen such errors when, for example, rotating >>> in the wrong direction. I can have a look if you share the dataset. >>> Cheers, >>> Simon >>> >>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>> andreasg at phys.au.dk> wrote: >>> >>>> Thanks for the suggestions, Simon and Cyril! >>>> >>>> I have been carefully looking though the geometry and from what I >>>> understand of the transformations matrices, the geometry looks correct/(as >>>> expected). >>>> >>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>> were because had used half-fan scans (full-arc). >>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>> artifacts occurs! >>>> >>>> Are there other (built-in) means of improving half-arc scans, than the >>>> parker short scan filter? >>>> >>>> Parker short scan does a decent job, but the result is still far from >>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>> >>>> Best regards >>>> Andreas >>>> >>>> >>>> __________________________________ >>>> >>>> Andreas Gravgaard Andersen >>>> >>>> Department of Oncology, >>>> >>>> Aarhus University Hospital >>>> >>>> N?rrebrogade 44, >>>> >>>> 8000, Aarhus C >>>> >>>> Mail: andreasg at phys.au.dk >>>> >>>> Cell: +45 3165 8140 >>>> >>>> >>>> >>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory : >>>> >>>>> One suggestion since it works with the Hnd projections: >>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>> Xim projections) and output two projection stack files and two geometry >>>>> files, then compare the projection stack files by subtracting one to the >>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>> are identical, then I do not see any reason why the reconstructions should >>>>> be different, so my guess is that you will find differences. >>>>> >>>>> >>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>> >>>>>> Hi, >>>>>> I have almost never worked with Varian data but it looks like a >>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>> projections which results in assigning a bad geometry to each >>>>>> projection. How did you name your projections? Maybe check that the >>>>>> order matches that of the RTK geometry file. Otherwise, there might be >>>>>> an issue in the creation of the geometry file itself. >>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>> code when you feel it's ready. >>>>>> Simon >>>>>> >>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>> wrote: >>>>>> >>>>>>> Dear RTK experts, >>>>>>> >>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>> format. I >>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>> available with RTK. >>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>> >>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>> in UI), >>>>>>> however when reconstructing with a regular FDK I get a reconstructed >>>>>>> image >>>>>>> that is smeared out around the high and low density areas [see >>>>>>> attached >>>>>>> image] >>>>>>> >>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>> Scripps >>>>>>> (~520 projections). Fixed detector and source (offset=0) with SID=2m, >>>>>>> SDD=3m. >>>>>>> >>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>> algorithm). >>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>> software works >>>>>>> perfectly. >>>>>>> >>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>> creates >>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>> If the first few projections are excluded, the following projection >>>>>>> will act >>>>>>> the same way. >>>>>>> >>>>>>> The projections are corrected for beam hardening and all the >>>>>>> projections >>>>>>> have the expected attenuation. >>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>> reconstruction >>>>>>> makes the same artifacts. >>>>>>> >>>>>>> Setting the value of the first and last projection to zero has the >>>>>>> same >>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>> not the >>>>>>> artifacts. >>>>>>> >>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>> >>>>>>> Best regards >>>>>>> Andreas >>>>>>> >>>>>>> __________________________________ >>>>>>> >>>>>>> Andreas Gravgaard Andersen >>>>>>> >>>>>>> Department of Oncology, >>>>>>> >>>>>>> Aarhus University Hospital >>>>>>> >>>>>>> N?rrebrogade 44, >>>>>>> >>>>>>> 8000, Aarhus C >>>>>>> >>>>>>> Mail: andreasg at phys.au.dk >>>>>>> >>>>>>> Cell: +45 3165 8140 >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Thu Nov 24 01:34:58 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Thu, 24 Nov 2016 06:34:58 +0000 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: , Message-ID: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Hi Simon, Thanks for the script. I was wondering if you could also share the csv or a dummy file? I'm unsure of what the second column contains. An offset distance to the rotation axis? Or the height? Which distance was known in your example? From the code it looks like the distance to the rotation axis? Sepp On 22 Nov 2016, at 08.01, Simon Rit > wrote: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt > wrote: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 24 01:44:42 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 24 Nov 2016 07:44:42 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> References: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Message-ID: Hi, Enclosed. Column 1 is platform angle, 2 is bb height, 3 is the u coordinate (in pixel) and 4 is the v coordinate (in pixel too). I had approximately measured the source-to-detector (270) and source-to-isocenter (210) distances but they were still optimized to have a better assessment. Simon On Thu, Nov 24, 2016 at 7:34 AM, Sepp de Raedt wrote: > Hi Simon, > > Thanks for the script. I was wondering if you could also share the csv or > a dummy file? I'm unsure of what the second column contains. An offset > distance to the rotation axis? Or the height? > > Which distance was known in your example? From the code it looks like the > distance to the rotation axis? > > Sepp > > On 22 Nov 2016, at 08.01, Simon Rit > wrote: > > Hi Sepp, > I did do a calibration script on a micro CT platform. The idea was that I > had a bb taken from 4 different view points at 4 different heights with a > known distance. Their projected position was segmented beforehand on the > projections and I tried to match the projections by optimizing the > calibration (which we see in before.pdf and after.pdf). I don't think it's > a good script, e.g., because I tried to find 8 parameters when 7 are > sufficient for my system (see, e.g., this paper > ). > But this gives you a starting point to develop your own script which will > hopefully be better. Please share if you do something from it! > Thanks, > Simon > > On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > >> Hi RTK users, >> >> I'm interested in reconstructing images acquired by a fluoroscopy system >> rotating around a knee phantom. Unfortunately, I've been unsuccessful so >> far. I recognize some of the phantom in the reconstructed image, but it >> contains double contours and the shape is deformed. >> >> I think the issue might be incorrect geometry specification. I have >> images also including a phantom containing markers for which we know the >> coordinates, which should allow us to calibrate the system. On the wiki on >> image quality, I saw that some users had developed scripts to do the >> calibration? Would someone be willing to share it? >> >> Kind regards, >> Sepp >> >> ______________________________________________________________________ >> This email has been scanned by the Symantec Email Security.cloud service. >> For more information please visit http://www.symanteccloud.com >> ______________________________________________________________________ >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > > > > > > > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CentroidPositions_H5_to_H25_90degstep.csv Type: text/csv Size: 321 bytes Desc: not available URL: From andreasg at phys.au.dk Fri Nov 25 10:25:55 2016 From: andreasg at phys.au.dk (Andreas Gravgaard Andersen) Date: Fri, 25 Nov 2016 16:25:55 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Simon, I have created a pull-request with the XIM file reader. I'm sorry for being late with the promised pull-request (there were a lot of merge conflicts, so it got postponed). I have cleaned it up, but it is still not flawless as mentioned in the pull-request-message. I have tried to keep the RTK coding-style by creating it as a modified HND file reader, but I have only a year of experience with C++, so I apologize if I've left some ugly code in there.. Best regards Andreas __________________________________ Andreas Gravgaard Andersen Department of Oncology, Aarhus University Hospital N?rrebrogade 44, 8000, Aarhus C Mail: andreasg at phys.au.dk Cell: +45 3165 8140 2016-11-23 18:44 GMT+01:00 Simon Rit : > Dear Andreas, > Today we had the RTK training and some users were looking for a XIM file > reader. I pointed to your contributions but any chance to have it put in > RTK soon? > Thanks in advance, > Simon > > On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit > wrote: > >> Hi, >> Thanks for sharing. There still seems to be some streak artefacts, do you >> see the same in the Varian reconstruction? >> I'm looking forward to the pull-request, I think we should try to make >> the bzip2 optional. >> Simon >> >> On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < >> andreasg at phys.au.dk> wrote: >> >>> Thanks for the fast response Simon! >>> >>> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >>> right all along! >>> I just didn't get why it makes a difference. I think I do now, as the >>> resulting image was flipped upside down and not left/right as I expected. >>> [attached] >>> >>> The reconstruction is significantly better, I'll look into what should >>> be included in the reader and what I should keep in my program to keep >>> conformity with the other readers. Then I'll create a pull request. >>> >>> Just for the purpose of others hitting the same or a similar bug, I also >>> attempted: >>> I did the SART reconstruction with 10 iterations, lambda=0.3, and >>> Joseph back/forward projection, *but with no* significant improvement >>> [attached] >>> >>> And: >>> If you want you can download the data set from: [Dropbox link to 460MB >>> zip (I'll >>> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >>> is used along with the Scan.xml (Calibrations folder may be used in the >>> future in my program, but I'm not sure if you can rely on the existence of >>> the content). >>> >>> A MatLab XimReader is available: link >>> (also >>> available from Varian bitbucket along a with a python version and a >>> C#->matlab plugin >>> ). >>> Otherwise my fork with the RTK-style reader is available from the same >>> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >>> so bzip2 is a new dependancy). >>> >>> Best regards >>> Andreas >>> >>> >>> __________________________________ >>> >>> Andreas Gravgaard Andersen >>> >>> Department of Oncology, >>> >>> Aarhus University Hospital >>> >>> N?rrebrogade 44, >>> >>> 8000, Aarhus C >>> >>> Mail: andreasg at phys.au.dk >>> >>> Cell: +45 3165 8140 >>> >>> >>> >>> 2016-09-16 16:13 GMT+02:00 Simon Rit : >>> >>>> Hi, >>>> You can try any iterative reconstruction, they can also handle short >>>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>>> However, the nature of the artifacts indicate more a problem in the >>>> geometry in my opinion. I have seen such errors when, for example, rotating >>>> in the wrong direction. I can have a look if you share the dataset. >>>> Cheers, >>>> Simon >>>> >>>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>>> andreasg at phys.au.dk> wrote: >>>> >>>>> Thanks for the suggestions, Simon and Cyril! >>>>> >>>>> I have been carefully looking though the geometry and from what I >>>>> understand of the transformations matrices, the geometry looks correct/(as >>>>> expected). >>>>> >>>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>>> were because had used half-fan scans (full-arc). >>>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>>> artifacts occurs! >>>>> >>>>> Are there other (built-in) means of improving half-arc scans, than the >>>>> parker short scan filter? >>>>> >>>>> Parker short scan does a decent job, but the result is still far from >>>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>>> >>>>> Best regards >>>>> Andreas >>>>> >>>>> >>>>> __________________________________ >>>>> >>>>> Andreas Gravgaard Andersen >>>>> >>>>> Department of Oncology, >>>>> >>>>> Aarhus University Hospital >>>>> >>>>> N?rrebrogade 44, >>>>> >>>>> 8000, Aarhus C >>>>> >>>>> Mail: andreasg at phys.au.dk >>>>> >>>>> Cell: +45 3165 8140 >>>>> >>>>> >>>>> >>>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory >>>>> : >>>>> >>>>>> One suggestion since it works with the Hnd projections: >>>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>>> Xim projections) and output two projection stack files and two geometry >>>>>> files, then compare the projection stack files by subtracting one to the >>>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>>> are identical, then I do not see any reason why the reconstructions should >>>>>> be different, so my guess is that you will find differences. >>>>>> >>>>>> >>>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>>> >>>>>>> Hi, >>>>>>> I have almost never worked with Varian data but it looks like a >>>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>>> projections which results in assigning a bad geometry to each >>>>>>> projection. How did you name your projections? Maybe check that the >>>>>>> order matches that of the RTK geometry file. Otherwise, there might >>>>>>> be >>>>>>> an issue in the creation of the geometry file itself. >>>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>>> code when you feel it's ready. >>>>>>> Simon >>>>>>> >>>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>>> wrote: >>>>>>> >>>>>>>> Dear RTK experts, >>>>>>>> >>>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>>> format. I >>>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>>> available with RTK. >>>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>>> >>>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>>> in UI), >>>>>>>> however when reconstructing with a regular FDK I get a >>>>>>>> reconstructed image >>>>>>>> that is smeared out around the high and low density areas [see >>>>>>>> attached >>>>>>>> image] >>>>>>>> >>>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>>> Scripps >>>>>>>> (~520 projections). Fixed detector and source (offset=0) with >>>>>>>> SID=2m, >>>>>>>> SDD=3m. >>>>>>>> >>>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>>> algorithm). >>>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>>> software works >>>>>>>> perfectly. >>>>>>>> >>>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>>> creates >>>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>>> If the first few projections are excluded, the following projection >>>>>>>> will act >>>>>>>> the same way. >>>>>>>> >>>>>>>> The projections are corrected for beam hardening and all the >>>>>>>> projections >>>>>>>> have the expected attenuation. >>>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>>> reconstruction >>>>>>>> makes the same artifacts. >>>>>>>> >>>>>>>> Setting the value of the first and last projection to zero has the >>>>>>>> same >>>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>>> not the >>>>>>>> artifacts. >>>>>>>> >>>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>>> >>>>>>>> Best regards >>>>>>>> Andreas >>>>>>>> >>>>>>>> __________________________________ >>>>>>>> >>>>>>>> Andreas Gravgaard Andersen >>>>>>>> >>>>>>>> Department of Oncology, >>>>>>>> >>>>>>>> Aarhus University Hospital >>>>>>>> >>>>>>>> N?rrebrogade 44, >>>>>>>> >>>>>>>> 8000, Aarhus C >>>>>>>> >>>>>>>> Mail: andreasg at phys.au.dk >>>>>>>> >>>>>>>> Cell: +45 3165 8140 >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rtk-users mailing list >>>>>>>> Rtk-users at public.kitware.com >>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From w_ettehadi at yahoo.com Tue Nov 1 12:50:12 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Tue, 1 Nov 2016 16:50:12 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> Message-ID: <1400014065.1872614.1478019012480@mail.yahoo.com> Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards,Vahid -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 02:53:39 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 07:53:39 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1400014065.1872614.1478019012480@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> Message-ID: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: > Hello RTK users and developers, > > I already implemented the RTK and reconstructed some images with the > FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. > Now, I am trying to develop a model-based image reconstruction for our > cone-beam micro-CT. I see already that some iterative algorithms like > ART and its modifications and conjugate-gradient (CG) method are > implemented in the RTK. I want to develop a model-based reconstruction > through the Newton/quasi-Newton optimizations methods. I was wondering > is it possible to extract the gradient of least square function from > implemented algorithms like CG module? Any recommendation will be > appreciated. > > Best Regards, > Vahid > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Wed Nov 2 04:01:30 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 08:01:30 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have tried but I am not getting where to give --division 4 in my code. Please find my code given below and please let me know where I need to change in my code to make it work. int _tmain(int argc, _TCHAR* argv[]) { #pragma region "Variable declaration" const double PI = 3.14159265358979323846; float *angles; int nProj = 349; typedef unsigned short pixelType; typedef float OutpixelType; const int dimension = 3; typedef itk::Image imageType; typedef itk::ImageRegionConstIterator ImageIteratorType; imageType::Pointer Projections = imageType::New(); #pragma endregion "Variable declaration" Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); imageType::SpacingType pSpacing; pSpacing[0] = 0.2960; pSpacing[1] = 0.2960; pSpacing[2] = 0.2960; Projections->SetSpacing(pSpacing); imageType::PointType pOrigin; pOrigin[0] = -212.972; pOrigin[1] = -212.972; pOrigin[2] = -212.972; //-158.50; Projections->SetOrigin(pOrigin); Projections->Update(); //Read angles. char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; angles = new float[nProj]; angles = readAngles(angles_file, angles); #pragma region"Geometry" // Geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); for (unsigned int noProj = 0; noProj < nProj; noProj++) { geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // } typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); geometryWriter->SetFilename("D:\\geo.xml"); geometryWriter->SetObject(geometry); geometryWriter->WriteFile(); geometry->Update(); #pragma endregion "Geometry" //Define output image type #ifdef USE_CUDA typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #else typedef itk::Image OutPutImageType; typedef rtk::ParkerShortScanImageFilter PSSFType; typedef rtk::FDKConeBeamReconstructionFilter FDKType; #endif //ScatterCorrection typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); ScatterCorrection->SetInput(Projections); //VarianObiRawImageFilter typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); //Create the output image typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; ConstantImageSourceType::PointType origin_p; ConstantImageSourceType::SizeType size_p; ConstantImageSourceType::SpacingType spacing_p; ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); origin_p[0] = -127.5; origin_p[1] = -127.5; origin_p[2] = -127.5; size_p[0] = 512; size_p[1] = 512; size_p[2] = 512; spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); projectionsSource->SetOrigin(origin_p); projectionsSource->SetSpacing(spacing_p); projectionsSource->SetSize(size_p); projectionsSource->SetConstant(0); // Short scan image filter PSSFType::Pointer pssf = PSSFType::New(); pssf->SetInput(AttenuationFilter->GetOutput()); pssf->SetGeometry(geometry); pssf->InPlaceOff(); std::cout << "short scan image filter success" << std::endl; FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput(0, projectionsSource->GetOutput()); feldkamp->SetInput(1, pssf->GetOutput()); feldkamp->SetGeometry(geometry); feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); feldkamp->GetRampFilter()->SetHammingFrequency(5.0); feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); feldkamp->SetGPUEnabled(1); feldkamp->SetNumberOfThreads(10000); #pragma region "Write volume" //Create a raw io for writing itk::RawImageIO::Pointer io; io = itk::RawImageIO::New(); for (unsigned int i = 0; i < dimension; i++) { io->SetDimensions(i, size_p[i]); io->SetSpacing(i, spacing_p[i]); io->SetOrigin(i, origin_p[i]); } io->SetHeaderSize(0); io->SetByteOrderToLittleEndian(); io->SetPixelType(itk::ImageIOBase::SCALAR); io->SetNumberOfComponents(1); io->SetNumberOfDimensions(3); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(feldkamp->GetOutput()); try { writer->Update(); } catch (itk::ExceptionObject & excp) { std::cerr << "Error while writing the image " << std::endl; std::cerr << excp << std::endl; getchar(); } #pragma endregion "WriteVolume" delete[] angles; return 0; } Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > I was able to perform a reconstruction from your header and geometry > file, using the following command lines: > > rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > --phantomscale "128,128,128" --like Output.mhd > > rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > The first computes projections through a Shepp & Logan phantom, with the > same size, spacing, origin, etc... as your projections, using your > geometry file geo.xml. > > The second line performs the FDK reconstruction. I had to use both the > "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > on a Geforce GTX 780). "--lowmem" loads the projections into memory by > subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > parts, reconstructs them one by one, then assembles the results. Can you > run the same commands and let us know whether you still encounter the > crash you mentioned ? If it works, you can use your own projection data > in the second command line instead of "simulatedprojections.mha". > > Best, > > Cyril > > On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > > Dear Sir, > > > > Please find the Header file in the attachment. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> We do not need the projections file, at least not for a first stage of > >> error tracking. We only need the header. > >> Try the following command line: > >> > >> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >> > >> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >> what we need, and it is a very light text file. The "proj.raw" contains > >> the pixel values, but at the moment we do not need them. We will create > >> our own proj.raw file, filled with zeros, which should be enough to > >> track down the error you encounter. > >> > >> Looking forward to receiving your file, > >> Cyril > >> > >> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>> Dear Sir, > >>> > >>> The single raw file of the projections is 1.4 GB and we are > not > >> able to send this big file to you. Can you please suggest other > alternatives > >> for this? > >>> Or can you provide us the PC configuration to solve the > issue? > >>> > >>> Let me know if any other clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Hello Zahid, > >>>> > >>>> We will need the header of your projections file, too (It is best if > you > >>>> have all your projections as a single .mhd and a single .raw file, so > it > >>>> should be 3-D image, and you send only the .mhd file). > >>>> > >>>> Regards, > >>>> Cyril > >>>> > >>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> > >>>>> I have only used RTK version 1.3.0. but in the error > >>>> message it is showing RTK version 1.2.0. > >>>>> Please find the attachment of the geometry file of > our > >>>> projections. > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> Without some more information, it's unlikely that we find the source > of > >>>>>> the problem. Here are a few things you can do to help us (and > therefore > >>>>>> yourself): > >>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > the > >>>>>> Cuda forward and back projection filters since v1.2.0, so your > problem > >>>>>> might disappear just by upgrading to the new version > >>>>>> - create a small example that reproduces your problem. You can, for > >>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>> example). And send us the script > >>>>>> - OR send us your geometry file and the header of your projections > file > >>>>>> (no need to send the projection data itself, we'll create a > zero-filled > >>>>>> stack of projections), and the command line that crashes > >>>>>> > >>>>>> Best regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Simon Rit, > >>>>>>> > >>>>>>> Please find the screen shot in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> Senior Design Engineer > >>>>>>> Mobile No. +91-9738379729 > >>>>>>> > >>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>> http://www.panaceamedical.com > >>>>>>> Bangalore - India. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>> Cc: rtk-users at public.kitware.com > >> [mailto:rtk-users at public.kitware.com], > >>>>>> saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>> memory > >>>>>>>> error. If you use the command line tool rtkfdk, you should first > make > >>>>>> sure > >>>>>>>> that you use the --lowmem option to stream the projection images. > If > >> it > >>>>>> is > >>>>>>>> no sufficient, you can split your volume using the --divisions. The > >>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of > >> RTK > >>>> on > >>>>>>>> our case studies webpage > >>>>>> . > >>>>>>>> Simon > >>>>>>>> > >>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>> > >>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>> > >>>>>>>>>> I am unable to do 1024x1024x1024 > reconstruction > >>>> using > >>>>>> RTK > >>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > shoot > >> of > >>>>>>>>> the > >>>>>>>>>> same. > >>>>>>>>>> > >>>>>>>>>> I am using the following items given below. > >>>>>>>>>> > >>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >> application > >>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>> 5. CUDA 7. > >>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>> > >>>>>>>>>> Please provide the solution of this and let me > >> know > >>>> if > >>>>>>>> any > >>>>>>>>>> other clarification is required. > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> Thanks & Regards > >>>>>>>>>> > >>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>> Senior Design Engineer > >>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>> > >>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>> Bangalore - India. > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> ____________________________________________________________ > >>>>>>>>> ________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> Rtk-users mailing list > >>>>>>> Rtk-users at public.kitware.com > >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 04:33:32 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 09:33:32 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> References: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Message-ID: <398170fb-a69e-9781-73d5-2a419542d06d@creatis.insa-lyon.fr> Dear Zahid, The --divisions is an option of the command-line application rtkfdk. It is not directly an option of the FDKConeBeamReconstructionFilter : rather, it is passed to a streaming filter at the end of the pipeline. Look for the following bit of code in rtkfdk.cxx : // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput( pfeldkamp ); streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); You can find information on how a streaming filter works on this page: https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html I hope it helps, Cyril On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have tried but I am not getting where to give --division 4 in my code. > > > Please find my code given below and please let me know where I need to change in my code to make it work. > > > int _tmain(int argc, _TCHAR* argv[]) > { > #pragma region "Variable declaration" > const double PI = 3.14159265358979323846; > float *angles; > int nProj = 349; > typedef unsigned short pixelType; > typedef float OutpixelType; > const int dimension = 3; > typedef itk::Image imageType; > typedef itk::ImageRegionConstIterator ImageIteratorType; > imageType::Pointer Projections = imageType::New(); > > #pragma endregion "Variable declaration" > > Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > imageType::SpacingType pSpacing; > pSpacing[0] = 0.2960; > pSpacing[1] = 0.2960; > pSpacing[2] = 0.2960; > Projections->SetSpacing(pSpacing); > > imageType::PointType pOrigin; > pOrigin[0] = -212.972; > pOrigin[1] = -212.972; > pOrigin[2] = -212.972; //-158.50; > Projections->SetOrigin(pOrigin); > > Projections->Update(); > > //Read angles. > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > angles = new float[nProj]; > angles = readAngles(angles_file, angles); > > #pragma region"Geometry" > // Geometry object > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > GeometryType::Pointer geometry = GeometryType::New(); > for (unsigned int noProj = 0; noProj < nProj; noProj++) > { > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // > } > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > geometryWriter->SetFilename("D:\\geo.xml"); > geometryWriter->SetObject(geometry); > geometryWriter->WriteFile(); > geometry->Update(); > #pragma endregion "Geometry" > > //Define output image type > > #ifdef USE_CUDA > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > #else > typedef itk::Image OutPutImageType; > typedef rtk::ParkerShortScanImageFilter PSSFType; > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > #endif > > //ScatterCorrection > typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); > ScatterCorrection->SetInput(Projections); > > //VarianObiRawImageFilter > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; > RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > //Create the output image > typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; > ConstantImageSourceType::PointType origin_p; > ConstantImageSourceType::SizeType size_p; > ConstantImageSourceType::SpacingType spacing_p; > ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); > origin_p[0] = -127.5; > origin_p[1] = -127.5; > origin_p[2] = -127.5; > size_p[0] = 512; > size_p[1] = 512; > size_p[2] = 512; > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > projectionsSource->SetOrigin(origin_p); > projectionsSource->SetSpacing(spacing_p); > projectionsSource->SetSize(size_p); > projectionsSource->SetConstant(0); > > // Short scan image filter > PSSFType::Pointer pssf = PSSFType::New(); > pssf->SetInput(AttenuationFilter->GetOutput()); > pssf->SetGeometry(geometry); > pssf->InPlaceOff(); > std::cout << "short scan image filter success" << std::endl; > > FDKType::Pointer feldkamp = FDKType::New(); > feldkamp->SetInput(0, projectionsSource->GetOutput()); > feldkamp->SetInput(1, pssf->GetOutput()); > feldkamp->SetGeometry(geometry); > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > feldkamp->SetGPUEnabled(1); > feldkamp->SetNumberOfThreads(10000); > > #pragma region "Write volume" > > //Create a raw io for writing > > itk::RawImageIO::Pointer io; > io = itk::RawImageIO::New(); > > for (unsigned int i = 0; i < dimension; i++) > { > io->SetDimensions(i, size_p[i]); > io->SetSpacing(i, spacing_p[i]); > io->SetOrigin(i, origin_p[i]); > } > io->SetHeaderSize(0); > io->SetByteOrderToLittleEndian(); > io->SetPixelType(itk::ImageIOBase::SCALAR); > io->SetNumberOfComponents(1); > io->SetNumberOfDimensions(3); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(feldkamp->GetOutput()); > > try > { > writer->Update(); > } > catch (itk::ExceptionObject & excp) > { > std::cerr << "Error while writing the image " << std::endl; > std::cerr << excp << std::endl; > getchar(); > } > #pragma endregion "WriteVolume" > delete[] angles; > return 0; > } > > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> I was able to perform a reconstruction from your header and geometry >> file, using the following command lines: >> >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> --phantomscale "128,128,128" --like Output.mhd >> >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> >> The first computes projections through a Shepp & Logan phantom, with the >> same size, spacing, origin, etc... as your projections, using your >> geometry file geo.xml. >> >> The second line performs the FDK reconstruction. I had to use both the >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> parts, reconstructs them one by one, then assembles the results. Can you >> run the same commands and let us know whether you still encounter the >> crash you mentioned ? If it works, you can use your own projection data >> in the second command line instead of "simulatedprojections.mha". >> >> Best, >> >> Cyril >> >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> >>> Dear Sir, >>> >>> Please find the Header file in the attachment. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> We do not need the projections file, at least not for a first stage of >>>> error tracking. We only need the header. >>>> Try the following command line: >>>> >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>> >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>> what we need, and it is a very light text file. The "proj.raw" contains >>>> the pixel values, but at the moment we do not need them. We will create >>>> our own proj.raw file, filled with zeros, which should be enough to >>>> track down the error you encounter. >>>> >>>> Looking forward to receiving your file, >>>> Cyril >>>> >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>> Dear Sir, >>>>> >>>>> The single raw file of the projections is 1.4 GB and we are >> not >>>> able to send this big file to you. Can you please suggest other >> alternatives >>>> for this? >>>>> Or can you provide us the PC configuration to solve the >> issue? >>>>> Let me know if any other clarification is required. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Hello Zahid, >>>>>> >>>>>> We will need the header of your projections file, too (It is best if >> you >>>>>> have all your projections as a single .mhd and a single .raw file, so >> it >>>>>> should be 3-D image, and you send only the .mhd file). >>>>>> >>>>>> Regards, >>>>>> Cyril >>>>>> >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>> Dear Cyril Mory, >>>>>>> >>>>>>> >>>>>>> I have only used RTK version 1.3.0. but in the error >>>>>> message it is showing RTK version 1.2.0. >>>>>>> Please find the attachment of the geometry file of >> our >>>>>> projections. >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> Without some more information, it's unlikely that we find the source >> of >>>>>>>> the problem. Here are a few things you can do to help us (and >> therefore >>>>>>>> yourself): >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >> the >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >> problem >>>>>>>> might disappear just by upgrading to the new version >>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>> example). And send us the script >>>>>>>> - OR send us your geometry file and the header of your projections >> file >>>>>>>> (no need to send the projection data itself, we'll create a >> zero-filled >>>>>>>> stack of projections), and the command line that crashes >>>>>>>> >>>>>>>> Best regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Simon Rit, >>>>>>>>> >>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> Senior Design Engineer >>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>> >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>> http://www.panaceamedical.com >>>>>>>>> Bangalore - India. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>> Cc: rtk-users at public.kitware.com >>>> [mailto:rtk-users at public.kitware.com], >>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>> memory >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >> make >>>>>>>> sure >>>>>>>>>> that you use the --lowmem option to stream the projection images. >> If >>>> it >>>>>>>> is >>>>>>>>>> no sufficient, you can split your volume using the --divisions. The >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of >>>> RTK >>>>>> on >>>>>>>>>> our case studies webpage >>>>>>>> . >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>> >>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>> >>>>>>>>>>>> I am unable to do 1024x1024x1024 >> reconstruction >>>>>> using >>>>>>>> RTK >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >> shoot >>>> of >>>>>>>>>>> the >>>>>>>>>>>> same. >>>>>>>>>>>> >>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>> >>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>> application >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>> >>>>>>>>>>>> Please provide the solution of this and let me >>>> know >>>>>> if >>>>>>>>>> any >>>>>>>>>>>> other clarification is required. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>> >>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>> >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>> Bangalore - India. >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>> ________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rtk-users mailing list >>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 06:57:15 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 10:57:15 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. Please check my modified file writer code given below. // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput(feldkamp->GetOutput()); streamerBP->SetNumberOfStreamDivisions(4); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(streamerBP->GetOutput()); writer->SetNumberOfStreamDivisions(4); Please let me know if any clarification is required. Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The --divisions is an option of the command-line application rtkfdk. It > is not directly an option of the FDKConeBeamReconstructionFilter : > rather, it is passed to a streaming filter at the end of the pipeline. > Look for the following bit of code in rtkfdk.cxx : > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter CPUOutputImageType> StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput( pfeldkamp ); > streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > > You can find information on how a streaming filter works on this page: > > https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > I hope it helps, > > Cyril > > On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have tried but I am not getting where to give > --division 4 in my code. > > > > > > Please find my code given below and please let me know > where I need to change in my code to make it work. > > > > > > int _tmain(int argc, _TCHAR* argv[]) > > { > > #pragma region "Variable declaration" > > const double PI = 3.14159265358979323846; > > float *angles; > > int nProj = 349; > > typedef unsigned short pixelType; > > typedef float OutpixelType; > > const int dimension = 3; > > typedef itk::Image imageType; > > typedef itk::ImageRegionConstIterator ImageIteratorType; > > imageType::Pointer Projections = imageType::New(); > > > > #pragma endregion "Variable declaration" > > > > Projections = > ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > > imageType::SpacingType pSpacing; > > pSpacing[0] = 0.2960; > > pSpacing[1] = 0.2960; > > pSpacing[2] = 0.2960; > > Projections->SetSpacing(pSpacing); > > > > imageType::PointType pOrigin; > > pOrigin[0] = -212.972; > > pOrigin[1] = -212.972; > > pOrigin[2] = -212.972; //-158.50; > > Projections->SetOrigin(pOrigin); > > > > Projections->Update(); > > > > //Read angles. > > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > angles = new float[nProj]; > > angles = readAngles(angles_file, angles); > > > > #pragma region"Geometry" > > // Geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > for (unsigned int noProj = 0; noProj < nProj; noProj++) > > { > > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); > // 136 half fan //2.07 Kidwai // > > } > > > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > GeometryWriterType; > > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > > geometryWriter->SetFilename("D:\\geo.xml"); > > geometryWriter->SetObject(geometry); > > geometryWriter->WriteFile(); > > geometry->Update(); > > #pragma endregion "Geometry" > > > > //Define output image type > > > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef itk::Image OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter PSSFType; > > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > > #endif > > > > //ScatterCorrection > > typedef rtk::BoellaardScatterCorrectionImageFilter > BoellaardScatterCorrectionImageFilterType; > > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > BoellaardScatterCorrectionImageFilterType::New(); > > ScatterCorrection->SetInput(Projections); > > > > //VarianObiRawImageFilter > > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > RawImageFilterType; > > RawImageFilterType::Pointer AttenuationFilter = > RawImageFilterType::New(); > > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > > > //Create the output image > > typedef rtk::ConstantImageSource< OutPutImageType > > ConstantImageSourceType; > > ConstantImageSourceType::PointType origin_p; > > ConstantImageSourceType::SizeType size_p; > > ConstantImageSourceType::SpacingType spacing_p; > > ConstantImageSourceType::Pointer projectionsSource = > ConstantImageSourceType::New(); > > origin_p[0] = -127.5; > > origin_p[1] = -127.5; > > origin_p[2] = -127.5; > > size_p[0] = 512; > > size_p[1] = 512; > > size_p[2] = 512; > > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > > > projectionsSource->SetOrigin(origin_p); > > projectionsSource->SetSpacing(spacing_p); > > projectionsSource->SetSize(size_p); > > projectionsSource->SetConstant(0); > > > > // Short scan image filter > > PSSFType::Pointer pssf = PSSFType::New(); > > pssf->SetInput(AttenuationFilter->GetOutput()); > > pssf->SetGeometry(geometry); > > pssf->InPlaceOff(); > > std::cout << "short scan image filter success" << std::endl; > > > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput(0, projectionsSource->GetOutput()); > > feldkamp->SetInput(1, pssf->GetOutput()); > > feldkamp->SetGeometry(geometry); > > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > feldkamp->SetGPUEnabled(1); > > feldkamp->SetNumberOfThreads(10000); > > > > #pragma region "Write volume" > > > > //Create a raw io for writing > > > > itk::RawImageIO::Pointer io; > > io = itk::RawImageIO::New(); > > > > for (unsigned int i = 0; i < dimension; i++) > > { > > io->SetDimensions(i, size_p[i]); > > io->SetSpacing(i, spacing_p[i]); > > io->SetOrigin(i, origin_p[i]); > > } > > io->SetHeaderSize(0); > > io->SetByteOrderToLittleEndian(); > > io->SetPixelType(itk::ImageIOBase::SCALAR); > > io->SetNumberOfComponents(1); > > io->SetNumberOfDimensions(3); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(feldkamp->GetOutput()); > > > > try > > { > > writer->Update(); > > } > > catch (itk::ExceptionObject & excp) > > { > > std::cerr << "Error while writing the image " << std::endl; > > std::cerr << excp << std::endl; > > getchar(); > > } > > #pragma endregion "WriteVolume" > > delete[] angles; > > return 0; > > } > > > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> I was able to perform a reconstruction from your header and geometry > >> file, using the following command lines: > >> > >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >> --phantomscale "128,128,128" --like Output.mhd > >> > >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >> > >> The first computes projections through a Shepp & Logan phantom, with the > >> same size, spacing, origin, etc... as your projections, using your > >> geometry file geo.xml. > >> > >> The second line performs the FDK reconstruction. I had to use both the > >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >> parts, reconstructs them one by one, then assembles the results. Can you > >> run the same commands and let us know whether you still encounter the > >> crash you mentioned ? If it works, you can use your own projection data > >> in the second command line instead of "simulatedprojections.mha". > >> > >> Best, > >> > >> Cyril > >> > >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >> > >>> Dear Sir, > >>> > >>> Please find the Header file in the attachment. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> We do not need the projections file, at least not for a first stage of > >>>> error tracking. We only need the header. > >>>> Try the following command line: > >>>> > >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>> > >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>> what we need, and it is a very light text file. The "proj.raw" contains > >>>> the pixel values, but at the moment we do not need them. We will create > >>>> our own proj.raw file, filled with zeros, which should be enough to > >>>> track down the error you encounter. > >>>> > >>>> Looking forward to receiving your file, > >>>> Cyril > >>>> > >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Sir, > >>>>> > >>>>> The single raw file of the projections is 1.4 GB and we > are > >> not > >>>> able to send this big file to you. Can you please suggest other > >> alternatives > >>>> for this? > >>>>> Or can you provide us the PC configuration to solve the > >> issue? > >>>>> Let me know if any other clarification is required. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Hello Zahid, > >>>>>> > >>>>>> We will need the header of your projections file, too (It is best if > >> you > >>>>>> have all your projections as a single .mhd and a single .raw file, so > >> it > >>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>> > >>>>>> Regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Cyril Mory, > >>>>>>> > >>>>>>> > >>>>>>> I have only used RTK version 1.3.0. but in the > error > >>>>>> message it is showing RTK version 1.2.0. > >>>>>>> Please find the attachment of the geometry file > of > >> our > >>>>>> projections. > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> Without some more information, it's unlikely that we find the > source > >> of > >>>>>>>> the problem. Here are a few things you can do to help us (and > >> therefore > >>>>>>>> yourself): > >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > >> the > >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >> problem > >>>>>>>> might disappear just by upgrading to the new version > >>>>>>>> - create a small example that reproduces your problem. You can, for > >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>> example). And send us the script > >>>>>>>> - OR send us your geometry file and the header of your projections > >> file > >>>>>>>> (no need to send the projection data itself, we'll create a > >> zero-filled > >>>>>>>> stack of projections), and the command line that crashes > >>>>>>>> > >>>>>>>> Best regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Simon Rit, > >>>>>>>>> > >>>>>>>>> Please find the screen shot in the attachment. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> Senior Design Engineer > >>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>> > >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>> http://www.panaceamedical.com > >>>>>>>>> Bangalore - India. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>> Cc: rtk-users at public.kitware.com > >>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>>>> memory > >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first > >> make > >>>>>>>> sure > >>>>>>>>>> that you use the --lowmem option to stream the projection images. > >> If > >>>> it > >>>>>>>> is > >>>>>>>>>> no sufficient, you can split your volume using the --divisions. > The > >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > of > >>>> RTK > >>>>>> on > >>>>>>>>>> our case studies webpage > >>>>>>>> . > >>>>>>>>>> Simon > >>>>>>>>>> > >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>> > >>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>> > >>>>>>>>>>>> I am unable to do 1024x1024x1024 > >> reconstruction > >>>>>> using > >>>>>>>> RTK > >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >> shoot > >>>> of > >>>>>>>>>>> the > >>>>>>>>>>>> same. > >>>>>>>>>>>> > >>>>>>>>>>>> I am using the following items given below. > >>>>>>>>>>>> > >>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>> application > >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>> > >>>>>>>>>>>> Please provide the solution of this and let > me > >>>> know > >>>>>> if > >>>>>>>>>> any > >>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>> > >>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>> > >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>> ________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 08:27:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 13:27:18 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> References: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Message-ID: <84154ed0-3cb8-abf7-c253-3162d78bf7b7@creatis.insa-lyon.fr> I see two errors: Remove this line writer->SetNumberOfStreamDivisions(4); since only the streaming filter, not the write filter, needs to know about the number of divisions. And change the filename to "D:\\Output.mhd" It will write both the .mhd and the .raw files. I hope it helps, Cyril On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. > > Please check my modified file writer code given below. > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput(feldkamp->GetOutput()); > streamerBP->SetNumberOfStreamDivisions(4); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(streamerBP->GetOutput()); > writer->SetNumberOfStreamDivisions(4); > > > Please let me know if any clarification is required. > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> The --divisions is an option of the command-line application rtkfdk. It >> is not directly an option of the FDKConeBeamReconstructionFilter : >> rather, it is passed to a streaming filter at the end of the pipeline. >> Look for the following bit of code in rtkfdk.cxx : >> >> // Streaming depending on streaming capability of writer >> typedef itk::StreamingImageFilter> CPUOutputImageType> StreamerType; >> StreamerType::Pointer streamerBP = StreamerType::New(); >> streamerBP->SetInput( pfeldkamp ); >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >> >> You can find information on how a streaming filter works on this page: >> >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> >> I hope it helps, >> >> Cyril >> >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have tried but I am not getting where to give >> --division 4 in my code. >>> >>> Please find my code given below and please let me know >> where I need to change in my code to make it work. >>> >>> int _tmain(int argc, _TCHAR* argv[]) >>> { >>> #pragma region "Variable declaration" >>> const double PI = 3.14159265358979323846; >>> float *angles; >>> int nProj = 349; >>> typedef unsigned short pixelType; >>> typedef float OutpixelType; >>> const int dimension = 3; >>> typedef itk::Image imageType; >>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>> imageType::Pointer Projections = imageType::New(); >>> >>> #pragma endregion "Variable declaration" >>> >>> Projections = >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); >>> imageType::SpacingType pSpacing; >>> pSpacing[0] = 0.2960; >>> pSpacing[1] = 0.2960; >>> pSpacing[2] = 0.2960; >>> Projections->SetSpacing(pSpacing); >>> >>> imageType::PointType pOrigin; >>> pOrigin[0] = -212.972; >>> pOrigin[1] = -212.972; >>> pOrigin[2] = -212.972; //-158.50; >>> Projections->SetOrigin(pOrigin); >>> >>> Projections->Update(); >>> >>> //Read angles. >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>> angles = new float[nProj]; >>> angles = readAngles(angles_file, angles); >>> >>> #pragma region"Geometry" >>> // Geometry object >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> GeometryType::Pointer geometry = GeometryType::New(); >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>> { >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); >> // 136 half fan //2.07 Kidwai // >>> } >>> >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> GeometryWriterType; >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>> geometryWriter->SetFilename("D:\\geo.xml"); >>> geometryWriter->SetObject(geometry); >>> geometryWriter->WriteFile(); >>> geometry->Update(); >>> #pragma endregion "Geometry" >>> >>> //Define output image type >>> >>> #ifdef USE_CUDA >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> #else >>> typedef itk::Image OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>> #endif >>> >>> //ScatterCorrection >>> typedef rtk::BoellaardScatterCorrectionImageFilter >> BoellaardScatterCorrectionImageFilterType; >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >> BoellaardScatterCorrectionImageFilterType::New(); >>> ScatterCorrection->SetInput(Projections); >>> >>> //VarianObiRawImageFilter >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> RawImageFilterType; >>> RawImageFilterType::Pointer AttenuationFilter = >> RawImageFilterType::New(); >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>> >>> //Create the output image >>> typedef rtk::ConstantImageSource< OutPutImageType > >> ConstantImageSourceType; >>> ConstantImageSourceType::PointType origin_p; >>> ConstantImageSourceType::SizeType size_p; >>> ConstantImageSourceType::SpacingType spacing_p; >>> ConstantImageSourceType::Pointer projectionsSource = >> ConstantImageSourceType::New(); >>> origin_p[0] = -127.5; >>> origin_p[1] = -127.5; >>> origin_p[2] = -127.5; >>> size_p[0] = 512; >>> size_p[1] = 512; >>> size_p[2] = 512; >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>> >>> projectionsSource->SetOrigin(origin_p); >>> projectionsSource->SetSpacing(spacing_p); >>> projectionsSource->SetSize(size_p); >>> projectionsSource->SetConstant(0); >>> >>> // Short scan image filter >>> PSSFType::Pointer pssf = PSSFType::New(); >>> pssf->SetInput(AttenuationFilter->GetOutput()); >>> pssf->SetGeometry(geometry); >>> pssf->InPlaceOff(); >>> std::cout << "short scan image filter success" << std::endl; >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>> feldkamp->SetInput(1, pssf->GetOutput()); >>> feldkamp->SetGeometry(geometry); >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>> feldkamp->SetGPUEnabled(1); >>> feldkamp->SetNumberOfThreads(10000); >>> >>> #pragma region "Write volume" >>> >>> //Create a raw io for writing >>> >>> itk::RawImageIO::Pointer io; >>> io = itk::RawImageIO::New(); >>> >>> for (unsigned int i = 0; i < dimension; i++) >>> { >>> io->SetDimensions(i, size_p[i]); >>> io->SetSpacing(i, spacing_p[i]); >>> io->SetOrigin(i, origin_p[i]); >>> } >>> io->SetHeaderSize(0); >>> io->SetByteOrderToLittleEndian(); >>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>> io->SetNumberOfComponents(1); >>> io->SetNumberOfDimensions(3); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(feldkamp->GetOutput()); >>> >>> try >>> { >>> writer->Update(); >>> } >>> catch (itk::ExceptionObject & excp) >>> { >>> std::cerr << "Error while writing the image " << std::endl; >>> std::cerr << excp << std::endl; >>> getchar(); >>> } >>> #pragma endregion "WriteVolume" >>> delete[] angles; >>> return 0; >>> } >>> >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> I was able to perform a reconstruction from your header and geometry >>>> file, using the following command lines: >>>> >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>> --phantomscale "128,128,128" --like Output.mhd >>>> >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>> >>>> The first computes projections through a Shepp & Logan phantom, with the >>>> same size, spacing, origin, etc... as your projections, using your >>>> geometry file geo.xml. >>>> >>>> The second line performs the FDK reconstruction. I had to use both the >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>> parts, reconstructs them one by one, then assembles the results. Can you >>>> run the same commands and let us know whether you still encounter the >>>> crash you mentioned ? If it works, you can use your own projection data >>>> in the second command line instead of "simulatedprojections.mha". >>>> >>>> Best, >>>> >>>> Cyril >>>> >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>> >>>>> Dear Sir, >>>>> >>>>> Please find the Header file in the attachment. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> We do not need the projections file, at least not for a first stage of >>>>>> error tracking. We only need the header. >>>>>> Try the following command line: >>>>>> >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>> >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>> what we need, and it is a very light text file. The "proj.raw" contains >>>>>> the pixel values, but at the moment we do not need them. We will create >>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>> track down the error you encounter. >>>>>> >>>>>> Looking forward to receiving your file, >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>> Dear Sir, >>>>>>> >>>>>>> The single raw file of the projections is 1.4 GB and we >> are >>>> not >>>>>> able to send this big file to you. Can you please suggest other >>>> alternatives >>>>>> for this? >>>>>>> Or can you provide us the PC configuration to solve the >>>> issue? >>>>>>> Let me know if any other clarification is required. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Hello Zahid, >>>>>>>> >>>>>>>> We will need the header of your projections file, too (It is best if >>>> you >>>>>>>> have all your projections as a single .mhd and a single .raw file, so >>>> it >>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>> >>>>>>>> Regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Cyril Mory, >>>>>>>>> >>>>>>>>> >>>>>>>>> I have only used RTK version 1.3.0. but in the >> error >>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>> Please find the attachment of the geometry file >> of >>>> our >>>>>>>> projections. >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> >>>>>>>>>> Without some more information, it's unlikely that we find the >> source >>>> of >>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>> therefore >>>>>>>>>> yourself): >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >>>> the >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>> problem >>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>> example). And send us the script >>>>>>>>>> - OR send us your geometry file and the header of your projections >>>> file >>>>>>>>>> (no need to send the projection data itself, we'll create a >>>> zero-filled >>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>> >>>>>>>>>> Best regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>> >>>>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> Senior Design Engineer >>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>> >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>> Bangalore - India. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>>>> memory >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >>>> make >>>>>>>>>> sure >>>>>>>>>>>> that you use the --lowmem option to stream the projection images. >>>> If >>>>>> it >>>>>>>>>> is >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >> The >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >> of >>>>>> RTK >>>>>>>> on >>>>>>>>>>>> our case studies webpage >>>>>>>>>> . >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>> reconstruction >>>>>>>> using >>>>>>>>>> RTK >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>> shoot >>>>>> of >>>>>>>>>>>>> the >>>>>>>>>>>>>> same. >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>>>> >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>> application >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Please provide the solution of this and let >> me >>>>>> know >>>>>>>> if >>>>>>>>>>>> any >>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>> >>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>> >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url >> : >>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>> ________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>> >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>>>> >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 09:37:23 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 13:37:23 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. Please suggest us for further process. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > I see two errors: > > Remove this line > > writer->SetNumberOfStreamDivisions(4); > > since only the streaming filter, not the write filter, needs to know > about the number of divisions. > And change the filename to > > "D:\\Output.mhd" > > It will write both the .mhd and the .raw files. > > I hope it helps, > Cyril > > On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have modified my file writer code and used > StreamingImageFilter. Now its not giving any error message but the final > output is 0 byte for 1024 volume. It working fine for 512 volume. > > > > Please check my modified file writer code given below. > > > > // Streaming depending on streaming capability of writer > > typedef itk::StreamingImageFilter > StreamerType; > > StreamerType::Pointer streamerBP = StreamerType::New(); > > streamerBP->SetInput(feldkamp->GetOutput()); > > streamerBP->SetNumberOfStreamDivisions(4); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(streamerBP->GetOutput()); > > writer->SetNumberOfStreamDivisions(4); > > > > > > Please let me know if any clarification is required. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> The --divisions is an option of the command-line application rtkfdk. It > >> is not directly an option of the FDKConeBeamReconstructionFilter : > >> rather, it is passed to a streaming filter at the end of the pipeline. > >> Look for the following bit of code in rtkfdk.cxx : > >> > >> // Streaming depending on streaming capability of writer > >> typedef itk::StreamingImageFilter >> CPUOutputImageType> StreamerType; > >> StreamerType::Pointer streamerBP = StreamerType::New(); > >> streamerBP->SetInput( pfeldkamp ); > >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >> > >> You can find information on how a streaming filter works on this page: > >> > >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >> > >> I hope it helps, > >> > >> Cyril > >> > >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have tried but I am not getting where to give > >> --division 4 in my code. > >>> > >>> Please find my code given below and please let me know > >> where I need to change in my code to make it work. > >>> > >>> int _tmain(int argc, _TCHAR* argv[]) > >>> { > >>> #pragma region "Variable declaration" > >>> const double PI = 3.14159265358979323846; > >>> float *angles; > >>> int nProj = 349; > >>> typedef unsigned short pixelType; > >>> typedef float OutpixelType; > >>> const int dimension = 3; > >>> typedef itk::Image imageType; > >>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>> imageType::Pointer Projections = imageType::New(); > >>> > >>> #pragma endregion "Variable declaration" > >>> > >>> Projections = > >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > nProj); > >>> imageType::SpacingType pSpacing; > >>> pSpacing[0] = 0.2960; > >>> pSpacing[1] = 0.2960; > >>> pSpacing[2] = 0.2960; > >>> Projections->SetSpacing(pSpacing); > >>> > >>> imageType::PointType pOrigin; > >>> pOrigin[0] = -212.972; > >>> pOrigin[1] = -212.972; > >>> pOrigin[2] = -212.972; //-158.50; > >>> Projections->SetOrigin(pOrigin); > >>> > >>> Projections->Update(); > >>> > >>> //Read angles. > >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>> angles = new float[nProj]; > >>> angles = readAngles(angles_file, angles); > >>> > >>> #pragma region"Geometry" > >>> // Geometry object > >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>> GeometryType::Pointer geometry = GeometryType::New(); > >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>> { > >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > 0); > >> // 136 half fan //2.07 Kidwai // > >>> } > >>> > >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >> GeometryWriterType; > >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > >>> geometryWriter->SetFilename("D:\\geo.xml"); > >>> geometryWriter->SetObject(geometry); > >>> geometryWriter->WriteFile(); > >>> geometry->Update(); > >>> #pragma endregion "Geometry" > >>> > >>> //Define output image type > >>> > >>> #ifdef USE_CUDA > >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>> #else > >>> typedef itk::Image OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; > >>> #endif > >>> > >>> //ScatterCorrection > >>> typedef rtk::BoellaardScatterCorrectionImageFilter > > >> BoellaardScatterCorrectionImageFilterType; > >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > >> BoellaardScatterCorrectionImageFilterType::New(); > >>> ScatterCorrection->SetInput(Projections); > >>> > >>> //VarianObiRawImageFilter > >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >> RawImageFilterType; > >>> RawImageFilterType::Pointer AttenuationFilter = > >> RawImageFilterType::New(); > >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>> > >>> //Create the output image > >>> typedef rtk::ConstantImageSource< OutPutImageType > > >> ConstantImageSourceType; > >>> ConstantImageSourceType::PointType origin_p; > >>> ConstantImageSourceType::SizeType size_p; > >>> ConstantImageSourceType::SpacingType spacing_p; > >>> ConstantImageSourceType::Pointer projectionsSource = > >> ConstantImageSourceType::New(); > >>> origin_p[0] = -127.5; > >>> origin_p[1] = -127.5; > >>> origin_p[2] = -127.5; > >>> size_p[0] = 512; > >>> size_p[1] = 512; > >>> size_p[2] = 512; > >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>> > >>> projectionsSource->SetOrigin(origin_p); > >>> projectionsSource->SetSpacing(spacing_p); > >>> projectionsSource->SetSize(size_p); > >>> projectionsSource->SetConstant(0); > >>> > >>> // Short scan image filter > >>> PSSFType::Pointer pssf = PSSFType::New(); > >>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>> pssf->SetGeometry(geometry); > >>> pssf->InPlaceOff(); > >>> std::cout << "short scan image filter success" << std::endl; > >>> > >>> FDKType::Pointer feldkamp = FDKType::New(); > >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>> feldkamp->SetInput(1, pssf->GetOutput()); > >>> feldkamp->SetGeometry(geometry); > >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>> feldkamp->SetGPUEnabled(1); > >>> feldkamp->SetNumberOfThreads(10000); > >>> > >>> #pragma region "Write volume" > >>> > >>> //Create a raw io for writing > >>> > >>> itk::RawImageIO::Pointer io; > >>> io = itk::RawImageIO::New(); > >>> > >>> for (unsigned int i = 0; i < dimension; i++) > >>> { > >>> io->SetDimensions(i, size_p[i]); > >>> io->SetSpacing(i, spacing_p[i]); > >>> io->SetOrigin(i, origin_p[i]); > >>> } > >>> io->SetHeaderSize(0); > >>> io->SetByteOrderToLittleEndian(); > >>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>> io->SetNumberOfComponents(1); > >>> io->SetNumberOfDimensions(3); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(feldkamp->GetOutput()); > >>> > >>> try > >>> { > >>> writer->Update(); > >>> } > >>> catch (itk::ExceptionObject & excp) > >>> { > >>> std::cerr << "Error while writing the image " << std::endl; > >>> std::cerr << excp << std::endl; > >>> getchar(); > >>> } > >>> #pragma endregion "WriteVolume" > >>> delete[] angles; > >>> return 0; > >>> } > >>> > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> I was able to perform a reconstruction from your header and geometry > >>>> file, using the following command lines: > >>>> > >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>> --phantomscale "128,128,128" --like Output.mhd > >>>> > >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > --hardware > >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>> > >>>> The first computes projections through a Shepp & Logan phantom, with > the > >>>> same size, spacing, origin, etc... as your projections, using your > >>>> geometry file geo.xml. > >>>> > >>>> The second line performs the FDK reconstruction. I had to use both the > >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>> parts, reconstructs them one by one, then assembles the results. Can > you > >>>> run the same commands and let us know whether you still encounter the > >>>> crash you mentioned ? If it works, you can use your own projection data > >>>> in the second command line instead of "simulatedprojections.mha". > >>>> > >>>> Best, > >>>> > >>>> Cyril > >>>> > >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>> > >>>>> Dear Sir, > >>>>> > >>>>> Please find the Header file in the attachment. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> We do not need the projections file, at least not for a first stage > of > >>>>>> error tracking. We only need the header. > >>>>>> Try the following command line: > >>>>>> > >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>> > >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>>>> what we need, and it is a very light text file. The "proj.raw" > contains > >>>>>> the pixel values, but at the moment we do not need them. We will > create > >>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>> track down the error you encounter. > >>>>>> > >>>>>> Looking forward to receiving your file, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> The single raw file of the projections is 1.4 GB and > we > >> are > >>>> not > >>>>>> able to send this big file to you. Can you please suggest other > >>>> alternatives > >>>>>> for this? > >>>>>>> Or can you provide us the PC configuration to solve > the > >>>> issue? > >>>>>>> Let me know if any other clarification is required. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Hello Zahid, > >>>>>>>> > >>>>>>>> We will need the header of your projections file, too (It is best > if > >>>> you > >>>>>>>> have all your projections as a single .mhd and a single .raw file, > so > >>>> it > >>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>> > >>>>>>>> Regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Cyril Mory, > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> I have only used RTK version 1.3.0. but in the > >> error > >>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>> Please find the attachment of the geometry > file > >> of > >>>> our > >>>>>>>> projections. > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> > >>>>>>>>>> Without some more information, it's unlikely that we find the > >> source > >>>> of > >>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>> therefore > >>>>>>>>>> yourself): > >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes > in > >>>> the > >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>> problem > >>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>> - create a small example that reproduces your problem. You can, > for > >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > logan > >>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>>>> example). And send us the script > >>>>>>>>>> - OR send us your geometry file and the header of your > projections > >>>> file > >>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>> zero-filled > >>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>> > >>>>>>>>>> Best regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>> > >>>>>>>>>>> Please find the screen shot in the > attachment. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>> > >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > CUDA > >>>>>>>> memory > >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > first > >>>> make > >>>>>>>>>> sure > >>>>>>>>>>>> that you use the --lowmem option to stream the projection > images. > >>>> If > >>>>>> it > >>>>>>>>>> is > >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. > >> The > >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > >> of > >>>>>> RTK > >>>>>>>> on > >>>>>>>>>>>> our case studies webpage > >>>>>>>>>> . > >>>>>>>>>>>> Simon > >>>>>>>>>>>> > >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>> reconstruction > >>>>>>>> using > >>>>>>>>>> RTK > >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >>>> shoot > >>>>>> of > >>>>>>>>>>>>> the > >>>>>>>>>>>>>> same. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am using the following items given > below. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>>>> application > >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Please provide the solution of this and > let > >> me > >>>>>> know > >>>>>>>> if > >>>>>>>>>>>> any > >>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, > >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > >> : > >>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>> ________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>> > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: RTK_Error.png Type: image/png Size: 57211 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 10:00:50 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 15:00:50 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> References: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Message-ID: <94e0045d-ef88-726d-9b7b-8b5ebf5ac067@creatis.insa-lyon.fr> Dear Zahid, The output looks correct. If the command line solution I suggested in a previous email works, the best way to move forward would be to compare your code and that of rtkfdk.cxx, and where it differs, make sure you have not introduced an error. Cyril On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. > > Please suggest us for further process. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> I see two errors: >> >> Remove this line >> >> writer->SetNumberOfStreamDivisions(4); >> >> since only the streaming filter, not the write filter, needs to know >> about the number of divisions. >> And change the filename to >> >> "D:\\Output.mhd" >> >> It will write both the .mhd and the .raw files. >> >> I hope it helps, >> Cyril >> >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have modified my file writer code and used >> StreamingImageFilter. Now its not giving any error message but the final >> output is 0 byte for 1024 volume. It working fine for 512 volume. >>> Please check my modified file writer code given below. >>> >>> // Streaming depending on streaming capability of writer >>> typedef itk::StreamingImageFilter >> StreamerType; >>> StreamerType::Pointer streamerBP = StreamerType::New(); >>> streamerBP->SetInput(feldkamp->GetOutput()); >>> streamerBP->SetNumberOfStreamDivisions(4); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(streamerBP->GetOutput()); >>> writer->SetNumberOfStreamDivisions(4); >>> >>> >>> Please let me know if any clarification is required. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> The --divisions is an option of the command-line application rtkfdk. It >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >>>> rather, it is passed to a streaming filter at the end of the pipeline. >>>> Look for the following bit of code in rtkfdk.cxx : >>>> >>>> // Streaming depending on streaming capability of writer >>>> typedef itk::StreamingImageFilter>>> CPUOutputImageType> StreamerType; >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >>>> streamerBP->SetInput( pfeldkamp ); >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >>>> >>>> You can find information on how a streaming filter works on this page: >>>> >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >>>> >>>> I hope it helps, >>>> >>>> Cyril >>>> >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>>>> Dear Cyril Mory, >>>>> >>>>> I have tried but I am not getting where to give >>>> --division 4 in my code. >>>>> Please find my code given below and please let me know >>>> where I need to change in my code to make it work. >>>>> int _tmain(int argc, _TCHAR* argv[]) >>>>> { >>>>> #pragma region "Variable declaration" >>>>> const double PI = 3.14159265358979323846; >>>>> float *angles; >>>>> int nProj = 349; >>>>> typedef unsigned short pixelType; >>>>> typedef float OutpixelType; >>>>> const int dimension = 3; >>>>> typedef itk::Image imageType; >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>>>> imageType::Pointer Projections = imageType::New(); >>>>> >>>>> #pragma endregion "Variable declaration" >>>>> >>>>> Projections = >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> nProj); >>>>> imageType::SpacingType pSpacing; >>>>> pSpacing[0] = 0.2960; >>>>> pSpacing[1] = 0.2960; >>>>> pSpacing[2] = 0.2960; >>>>> Projections->SetSpacing(pSpacing); >>>>> >>>>> imageType::PointType pOrigin; >>>>> pOrigin[0] = -212.972; >>>>> pOrigin[1] = -212.972; >>>>> pOrigin[2] = -212.972; //-158.50; >>>>> Projections->SetOrigin(pOrigin); >>>>> >>>>> Projections->Update(); >>>>> >>>>> //Read angles. >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>>>> angles = new float[nProj]; >>>>> angles = readAngles(angles_file, angles); >>>>> >>>>> #pragma region"Geometry" >>>>> // Geometry object >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>>>> { >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, >> 0); >>>> // 136 half fan //2.07 Kidwai // >>>>> } >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >>>> GeometryWriterType; >>>>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >>>>> geometryWriter->SetObject(geometry); >>>>> geometryWriter->WriteFile(); >>>>> geometry->Update(); >>>>> #pragma endregion "Geometry" >>>>> >>>>> //Define output image type >>>>> >>>>> #ifdef USE_CUDA >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> #else >>>>> typedef itk::Image OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>>>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>>>> #endif >>>>> >>>>> //ScatterCorrection >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter>>> BoellaardScatterCorrectionImageFilterType; >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >>>> BoellaardScatterCorrectionImageFilterType::New(); >>>>> ScatterCorrection->SetInput(Projections); >>>>> >>>>> //VarianObiRawImageFilter >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >>>> RawImageFilterType; >>>>> RawImageFilterType::Pointer AttenuationFilter = >>>> RawImageFilterType::New(); >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>>>> >>>>> //Create the output image >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >>>> ConstantImageSourceType; >>>>> ConstantImageSourceType::PointType origin_p; >>>>> ConstantImageSourceType::SizeType size_p; >>>>> ConstantImageSourceType::SpacingType spacing_p; >>>>> ConstantImageSourceType::Pointer projectionsSource = >>>> ConstantImageSourceType::New(); >>>>> origin_p[0] = -127.5; >>>>> origin_p[1] = -127.5; >>>>> origin_p[2] = -127.5; >>>>> size_p[0] = 512; >>>>> size_p[1] = 512; >>>>> size_p[2] = 512; >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>>>> >>>>> projectionsSource->SetOrigin(origin_p); >>>>> projectionsSource->SetSpacing(spacing_p); >>>>> projectionsSource->SetSize(size_p); >>>>> projectionsSource->SetConstant(0); >>>>> >>>>> // Short scan image filter >>>>> PSSFType::Pointer pssf = PSSFType::New(); >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >>>>> pssf->SetGeometry(geometry); >>>>> pssf->InPlaceOff(); >>>>> std::cout << "short scan image filter success" << std::endl; >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >>>>> feldkamp->SetGeometry(geometry); >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>>>> feldkamp->SetGPUEnabled(1); >>>>> feldkamp->SetNumberOfThreads(10000); >>>>> >>>>> #pragma region "Write volume" >>>>> >>>>> //Create a raw io for writing >>>>> >>>>> itk::RawImageIO::Pointer io; >>>>> io = itk::RawImageIO::New(); >>>>> >>>>> for (unsigned int i = 0; i < dimension; i++) >>>>> { >>>>> io->SetDimensions(i, size_p[i]); >>>>> io->SetSpacing(i, spacing_p[i]); >>>>> io->SetOrigin(i, origin_p[i]); >>>>> } >>>>> io->SetHeaderSize(0); >>>>> io->SetByteOrderToLittleEndian(); >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>>>> io->SetNumberOfComponents(1); >>>>> io->SetNumberOfDimensions(3); >>>>> >>>>> //create a writer and write reconstructed file >>>>> itk::ImageFileWriter::Pointer writer; >>>>> writer = itk::ImageFileWriter::New(); >>>>> writer->SetFileName("D:\\Output.raw"); >>>>> writer->SetImageIO(io); >>>>> writer->SetInput(feldkamp->GetOutput()); >>>>> >>>>> try >>>>> { >>>>> writer->Update(); >>>>> } >>>>> catch (itk::ExceptionObject & excp) >>>>> { >>>>> std::cerr << "Error while writing the image " << std::endl; >>>>> std::cerr << excp << std::endl; >>>>> getchar(); >>>>> } >>>>> #pragma endregion "WriteVolume" >>>>> delete[] angles; >>>>> return 0; >>>>> } >>>>> >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> Senior Design Engineer >>>>> Mobile No. +91-9738379729 >>>>> >>>>> Panacea Medical Technologies Pvt. Ltd. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>> http://www.panaceamedical.com >>>>> Bangalore - India. >>>>> >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> I was able to perform a reconstruction from your header and geometry >>>>>> file, using the following command lines: >>>>>> >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>>>> --phantomscale "128,128,128" --like Output.mhd >>>>>> >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> --hardware >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>>>> >>>>>> The first computes projections through a Shepp & Logan phantom, with >> the >>>>>> same size, spacing, origin, etc... as your projections, using your >>>>>> geometry file geo.xml. >>>>>> >>>>>> The second line performs the FDK reconstruction. I had to use both the >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>>>> parts, reconstructs them one by one, then assembles the results. Can >> you >>>>>> run the same commands and let us know whether you still encounter the >>>>>> crash you mentioned ? If it works, you can use your own projection data >>>>>> in the second command line instead of "simulatedprojections.mha". >>>>>> >>>>>> Best, >>>>>> >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>>>> >>>>>>> Dear Sir, >>>>>>> >>>>>>> Please find the Header file in the attachment. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> We do not need the projections file, at least not for a first stage >> of >>>>>>>> error tracking. We only need the header. >>>>>>>> Try the following command line: >>>>>>>> >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>>>> >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> contains >>>>>>>> the pixel values, but at the moment we do not need them. We will >> create >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>>>> track down the error you encounter. >>>>>>>> >>>>>>>> Looking forward to receiving your file, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Sir, >>>>>>>>> >>>>>>>>> The single raw file of the projections is 1.4 GB and >> we >>>> are >>>>>> not >>>>>>>> able to send this big file to you. Can you please suggest other >>>>>> alternatives >>>>>>>> for this? >>>>>>>>> Or can you provide us the PC configuration to solve >> the >>>>>> issue? >>>>>>>>> Let me know if any other clarification is required. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Hello Zahid, >>>>>>>>>> >>>>>>>>>> We will need the header of your projections file, too (It is best >> if >>>>>> you >>>>>>>>>> have all your projections as a single .mhd and a single .raw file, >> so >>>>>> it >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Cyril Mory, >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I have only used RTK version 1.3.0. but in the >>>> error >>>>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>>>> Please find the attachment of the geometry >> file >>>> of >>>>>> our >>>>>>>>>> projections. >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >>>> Simon >>>>>>>> Rit >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> >>>>>>>>>>>> Without some more information, it's unlikely that we find the >>>> source >>>>>> of >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>>>> therefore >>>>>>>>>>>> yourself): >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes >> in >>>>>> the >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>>>> problem >>>>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>>>> - create a small example that reproduces your problem. You can, >> for >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> logan >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>>>> example). And send us the script >>>>>>>>>>>> - OR send us your geometry file and the header of your >> projections >>>>>> file >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >>>>>> zero-filled >>>>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>>>> >>>>>>>>>>>> Best regards, >>>>>>>>>>>> Cyril >>>>>>>>>>>> >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>>>> >>>>>>>>>>>>> Please find the screen shot in the >> attachment. >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>> >>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>> >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a >> CUDA >>>>>>>>>> memory >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> first >>>>>> make >>>>>>>>>>>> sure >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> images. >>>>>> If >>>>>>>> it >>>>>>>>>>>> is >>>>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >>>> The >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >>>> of >>>>>>>> RTK >>>>>>>>>> on >>>>>>>>>>>>>> our case studies webpage >>>>>>>>>>>> . >>>>>>>>>>>>>> Simon >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>>>> reconstruction >>>>>>>>>> using >>>>>>>>>>>> RTK >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>>>> shoot >>>>>>>> of >>>>>>>>>>>>>>> the >>>>>>>>>>>>>>>> same. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am using the following items given >> below. >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>>>> application >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Please provide the solution of this and >> let >>>> me >>>>>>>> know >>>>>>>>>> if >>>>>>>>>>>>>> any >>>>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >>>> : >>>>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>>>> ________________ >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> This email and any files transmitted with it are confidential >>>> and >>>>>>>>>>>> intended >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >>>>>>>>>>>> addressed. >>>>>>>>>>>>>>> If you have received this email in error please notify the >>>> system >>>>>>>>>>>> manager. >>>>>>>>>>>>>>> Please note that any views or opinions presented in this email >>>> are >>>>>>>>>>>> solely >>>>>>>>>>>>>>> those of the author and do not necessarily represent those of >>>> the >>>>>>>>>>>> company. >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >>>> attachments >>>>>>>> for >>>>>>>>>>>> the >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>>>> damage >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>>>> >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >>> >>> >> >> > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Wed Nov 2 22:38:38 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 02:38:38 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Message-ID: <24189134.77160.1478140718379@mail.yahoo.com> Hello Simon and Cyril,Thanks for the reply.You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do.Thanks again for the reply. @Cyril:Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards,Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 02:05:51 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 06:05:51 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103060551.f7bfa0c3@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, Thank you for your help. We are able to reconstruct 1024 volume now. But the reconstruction time is around 4 minutes. Can you please help us to reduce the reconstruction time? We are using NVIDIA TITAN X GPU which has 12 GB memory. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The output looks correct. > > If the command line solution I suggested in a previous email works, the > best way to move forward would be to compare your code and that of > rtkfdk.cxx, and where it differs, make sure you have not introduced an > error. > > Cyril > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have done the same but the Output.mhd file is still 0 > KB for 1024 volume. Please find the attachment of the status of the output > displayed. > > > > Please suggest us for further process. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> I see two errors: > >> > >> Remove this line > >> > >> writer->SetNumberOfStreamDivisions(4); > >> > >> since only the streaming filter, not the write filter, needs to know > >> about the number of divisions. > >> And change the filename to > >> > >> "D:\\Output.mhd" > >> > >> It will write both the .mhd and the .raw files. > >> > >> I hope it helps, > >> Cyril > >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have modified my file writer code and used > >> StreamingImageFilter. Now its not giving any error message but the final > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > >>> Please check my modified file writer code given below. > >>> > >>> // Streaming depending on streaming capability of writer > >>> typedef itk::StreamingImageFilter > >> StreamerType; > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>> streamerBP->SetInput(feldkamp->GetOutput()); > >>> streamerBP->SetNumberOfStreamDivisions(4); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(streamerBP->GetOutput()); > >>> writer->SetNumberOfStreamDivisions(4); > >>> > >>> > >>> Please let me know if any clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> The --divisions is an option of the command-line application rtkfdk. It > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > >>>> rather, it is passed to a streaming filter at the end of the pipeline. > >>>> Look for the following bit of code in rtkfdk.cxx : > >>>> > >>>> // Streaming depending on streaming capability of writer > >>>> typedef itk::StreamingImageFilter >>>> CPUOutputImageType> StreamerType; > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>>> streamerBP->SetInput( pfeldkamp ); > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >>>> > >>>> You can find information on how a streaming filter works on this page: > >>>> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >>>> > >>>> I hope it helps, > >>>> > >>>> Cyril > >>>> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> I have tried but I am not getting where to give > >>>> --division 4 in my code. > >>>>> Please find my code given below and please let me > know > >>>> where I need to change in my code to make it work. > >>>>> int _tmain(int argc, _TCHAR* argv[]) > >>>>> { > >>>>> #pragma region "Variable declaration" > >>>>> const double PI = 3.14159265358979323846; > >>>>> float *angles; > >>>>> int nProj = 349; > >>>>> typedef unsigned short pixelType; > >>>>> typedef float OutpixelType; > >>>>> const int dimension = 3; > >>>>> typedef itk::Image imageType; > >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>>>> imageType::Pointer Projections = imageType::New(); > >>>>> > >>>>> #pragma endregion "Variable declaration" > >>>>> > >>>>> Projections = > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > >> nProj); > >>>>> imageType::SpacingType pSpacing; > >>>>> pSpacing[0] = 0.2960; > >>>>> pSpacing[1] = 0.2960; > >>>>> pSpacing[2] = 0.2960; > >>>>> Projections->SetSpacing(pSpacing); > >>>>> > >>>>> imageType::PointType pOrigin; > >>>>> pOrigin[0] = -212.972; > >>>>> pOrigin[1] = -212.972; > >>>>> pOrigin[2] = -212.972; //-158.50; > >>>>> Projections->SetOrigin(pOrigin); > >>>>> > >>>>> Projections->Update(); > >>>>> > >>>>> //Read angles. > >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>>>> angles = new float[nProj]; > >>>>> angles = readAngles(angles_file, angles); > >>>>> > >>>>> #pragma region"Geometry" > >>>>> // Geometry object > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>>>> { > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > >> 0); > >>>> // 136 half fan //2.07 Kidwai // > >>>>> } > >>>>> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >>>> GeometryWriterType; > >>>>> GeometryWriterType::Pointer geometryWriter = > GeometryWriterType::New(); > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > >>>>> geometryWriter->SetObject(geometry); > >>>>> geometryWriter->WriteFile(); > >>>>> geometry->Update(); > >>>>> #pragma endregion "Geometry" > >>>>> > >>>>> //Define output image type > >>>>> > >>>>> #ifdef USE_CUDA > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>>>> #else > >>>>> typedef itk::Image OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > FDKType; > >>>>> #endif > >>>>> > >>>>> //ScatterCorrection > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter imageType > >>>> BoellaardScatterCorrectionImageFilterType; > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection > = > >>>> BoellaardScatterCorrectionImageFilterType::New(); > >>>>> ScatterCorrection->SetInput(Projections); > >>>>> > >>>>> //VarianObiRawImageFilter > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >>>> RawImageFilterType; > >>>>> RawImageFilterType::Pointer AttenuationFilter = > >>>> RawImageFilterType::New(); > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>>>> > >>>>> //Create the output image > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > >>>> ConstantImageSourceType; > >>>>> ConstantImageSourceType::PointType origin_p; > >>>>> ConstantImageSourceType::SizeType size_p; > >>>>> ConstantImageSourceType::SpacingType spacing_p; > >>>>> ConstantImageSourceType::Pointer projectionsSource = > >>>> ConstantImageSourceType::New(); > >>>>> origin_p[0] = -127.5; > >>>>> origin_p[1] = -127.5; > >>>>> origin_p[2] = -127.5; > >>>>> size_p[0] = 512; > >>>>> size_p[1] = 512; > >>>>> size_p[2] = 512; > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>>>> > >>>>> projectionsSource->SetOrigin(origin_p); > >>>>> projectionsSource->SetSpacing(spacing_p); > >>>>> projectionsSource->SetSize(size_p); > >>>>> projectionsSource->SetConstant(0); > >>>>> > >>>>> // Short scan image filter > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>>>> pssf->SetGeometry(geometry); > >>>>> pssf->InPlaceOff(); > >>>>> std::cout << "short scan image filter success" << std::endl; > >>>>> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > >>>>> feldkamp->SetGeometry(geometry); > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>>>> feldkamp->SetGPUEnabled(1); > >>>>> feldkamp->SetNumberOfThreads(10000); > >>>>> > >>>>> #pragma region "Write volume" > >>>>> > >>>>> //Create a raw io for writing > >>>>> > >>>>> itk::RawImageIO::Pointer io; > >>>>> io = itk::RawImageIO::New(); > >>>>> > >>>>> for (unsigned int i = 0; i < dimension; i++) > >>>>> { > >>>>> io->SetDimensions(i, size_p[i]); > >>>>> io->SetSpacing(i, spacing_p[i]); > >>>>> io->SetOrigin(i, origin_p[i]); > >>>>> } > >>>>> io->SetHeaderSize(0); > >>>>> io->SetByteOrderToLittleEndian(); > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>>>> io->SetNumberOfComponents(1); > >>>>> io->SetNumberOfDimensions(3); > >>>>> > >>>>> //create a writer and write reconstructed file > >>>>> itk::ImageFileWriter::Pointer writer; > >>>>> writer = itk::ImageFileWriter::New(); > >>>>> writer->SetFileName("D:\\Output.raw"); > >>>>> writer->SetImageIO(io); > >>>>> writer->SetInput(feldkamp->GetOutput()); > >>>>> > >>>>> try > >>>>> { > >>>>> writer->Update(); > >>>>> } > >>>>> catch (itk::ExceptionObject & excp) > >>>>> { > >>>>> std::cerr << "Error while writing the image " << std::endl; > >>>>> std::cerr << excp << std::endl; > >>>>> getchar(); > >>>>> } > >>>>> #pragma endregion "WriteVolume" > >>>>> delete[] angles; > >>>>> return 0; > >>>>> } > >>>>> > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> Senior Design Engineer > >>>>> Mobile No. +91-9738379729 > >>>>> > >>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>> http://www.panaceamedical.com > >>>>> Bangalore - India. > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> I was able to perform a reconstruction from your header and geometry > >>>>>> file, using the following command lines: > >>>>>> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>>>> --phantomscale "128,128,128" --like Output.mhd > >>>>>> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > >> --hardware > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>>>> > >>>>>> The first computes projections through a Shepp & Logan phantom, with > >> the > >>>>>> same size, spacing, origin, etc... as your projections, using your > >>>>>> geometry file geo.xml. > >>>>>> > >>>>>> The second line performs the FDK reconstruction. I had to use both > the > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > (3GB, > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > by > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>>>> parts, reconstructs them one by one, then assembles the results. Can > >> you > >>>>>> run the same commands and let us know whether you still encounter the > >>>>>> crash you mentioned ? If it works, you can use your own projection > data > >>>>>> in the second command line instead of "simulatedprojections.mha". > >>>>>> > >>>>>> Best, > >>>>>> > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>>>> > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> Please find the Header file in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> We do not need the projections file, at least not for a first stage > >> of > >>>>>>>> error tracking. We only need the header. > >>>>>>>> Try the following command line: > >>>>>>>> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>>>> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file > is > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > >> contains > >>>>>>>> the pixel values, but at the moment we do not need them. We will > >> create > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>>>> track down the error you encounter. > >>>>>>>> > >>>>>>>> Looking forward to receiving your file, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Sir, > >>>>>>>>> > >>>>>>>>> The single raw file of the projections is 1.4 GB > and > >> we > >>>> are > >>>>>> not > >>>>>>>> able to send this big file to you. Can you please suggest other > >>>>>> alternatives > >>>>>>>> for this? > >>>>>>>>> Or can you provide us the PC configuration to solve > >> the > >>>>>> issue? > >>>>>>>>> Let me know if any other clarification is required. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Hello Zahid, > >>>>>>>>>> > >>>>>>>>>> We will need the header of your projections file, too (It is best > >> if > >>>>>> you > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > file, > >> so > >>>>>> it > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>>>> > >>>>>>>>>> Regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Cyril Mory, > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> I have only used RTK version 1.3.0. but in > the > >>>> error > >>>>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>>>> Please find the attachment of the geometry > >> file > >>>> of > >>>>>> our > >>>>>>>>>> projections. > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >>>> Simon > >>>>>>>> Rit > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > >>>> source > >>>>>> of > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>>>> therefore > >>>>>>>>>>>> yourself): > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > changes > >> in > >>>>>> the > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>>>> problem > >>>>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>>>> - create a small example that reproduces your problem. You can, > >> for > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > >> logan > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > an > >>>>>>>>>>>> example). And send us the script > >>>>>>>>>>>> - OR send us your geometry file and the header of your > >> projections > >>>>>> file > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>>>> zero-filled > >>>>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>>>> > >>>>>>>>>>>> Best regards, > >>>>>>>>>>>> Cyril > >>>>>>>>>>>> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>>>> > >>>>>>>>>>>>> Please find the screen shot in the > >> attachment. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>> > >>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > >> CUDA > >>>>>>>>>> memory > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > >> first > >>>>>> make > >>>>>>>>>>>> sure > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > >> images. > >>>>>> If > >>>>>>>> it > >>>>>>>>>>>> is > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > --divisions. > >>>> The > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > use > >>>> of > >>>>>>>> RTK > >>>>>>>>>> on > >>>>>>>>>>>>>> our case studies webpage > >>>>>>>>>>>> . > >>>>>>>>>>>>>> Simon > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>>>> reconstruction > >>>>>>>>>> using > >>>>>>>>>>>> RTK > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > screen > >>>>>> shoot > >>>>>>>> of > >>>>>>>>>>>>>>> the > >>>>>>>>>>>>>>>> same. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am using the following items given > >> below. > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > console > >>>>>>>> application > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Please provide the solution of this > and > >> let > >>>> me > >>>>>>>> know > >>>>>>>>>> if > >>>>>>>>>>>>>> any > >>>>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > >> Url > >>>> : > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>>>> ________________ > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> This email and any files transmitted with it are > confidential > >>>> and > >>>>>>>>>>>> intended > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they > >> are > >>>>>>>>>>>> addressed. > >>>>>>>>>>>>>>> If you have received this email in error please notify the > >>>> system > >>>>>>>>>>>> manager. > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > email > >>>> are > >>>>>>>>>>>> solely > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > of > >>>> the > >>>>>>>>>>>> company. > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > >>>> attachments > >>>>>>>> for > >>>>>>>>>>>> the > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > >>>>>> damage > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>>>> > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Thu Nov 3 02:23:25 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 3 Nov 2016 07:23:25 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <24189134.77160.1478140718379@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> Message-ID: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): {\begin{aligned}&\mathbf {r} _{0}:=\mathbf {b} -\mathbf {Ax} _{0}\\&\mathbf {p} _{0}:=\mathbf {r} _{0}\\&k:=0\\&{\hbox{repeat}}\\&\qquad \alpha _{k}:={\frac {\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}{\mathbf {p} _{k}^{\mathsf {T}}\mathbf {Ap} _{k}}}\\&\qquad \mathbf {x} _{k+1}:=\mathbf {x} _{k}+\alpha _{k}\mathbf {p} _{k}\\&\qquad \mathbf {r} _{k+1}:=\mathbf {r} _{k}-\alpha _{k}\mathbf {Ap} _{k}\\&\qquad {\hbox{if }}r_{k+1}{\hbox{ is sufficiently small then exit loop}}\\&\qquad \beta _{k}:={\frac {\mathbf {r} _{k+1}^{\mathsf {T}}\mathbf {r} _{k+1}}{\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}}\\&\qquad \mathbf {p} _{k+1}:=\mathbf {r} _{k+1}+\beta _{k}\mathbf {p} _{k}\\&\qquad k:=k+1\\&{\hbox{end repeat}}\\&{\hbox{The result is }}\mathbf {x} _{k+1}\end{aligned}} In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: > Hello Simon and Cyril, > Thanks for the reply. > You are right Simon. I did not notice it too in the literature. The > main problem as you said is the storage. Actually I developed the > conjugate gradient (CG), quasi-Newton and Newton optimization methods > for optical tomography and I intended to apply them to the CT > reconstruction as well. I implemented the Newton's methods > (Gauss-Newton and Levenberg-Marquardt) in a > Jacobian-Free-Newton-Krylov approaches to avoid the matrix > multiplication of Jacobians (sensitivity). It means we only need to > store the Jacobian matrix for the these methods (the matrix R that > Cyril was mentioned), that is still a big matrix for practical > problems in CT reconstruction. For the quasi-Newton I adapted an > L-BFGS algorithm that only need the 3 or 8 last iterations of the > gradient vector to calculate the Hessian matrix. In my case, the > L-BFGS and Newton's methods was much faster than the CG as you know > because of using the second order derivative (hessian matrix). I saw > in your last paper you implement the conjugate gradient method, so I > thought it might be easy to extract the gradient vector from CG > modules and solve the cost function within the quasi-Newton/Newton > methods. I will look at the codes to see what I can do. > Thanks again for the reply. > > @Cyril: > Please correct me if I am wrong. you mean the output of > backProjectionFilter is the gradient of defined cost function? > > Regards, > Vahid > > > On Wednesday, November 2, 2016 2:53 AM, Cyril Mory > wrote: > > > Hi Vahid, > Welcome to RTK :) > Indeed, there are several iterative methods already implemented in > RTK, but none of the filters allows you to easily extract the gradient > of the least squares function there are minimizing. > If you need to minimize the classical non-regularized tomographic cost > function, ie || R f - p ||?, with R the forward projection operator, f > the volume you are looking for, and p the measured projections, my > best advice would be to copy some part of the pipeline of > rtkSARTConeBeamReconstructionFilter to get the job done, ie the > following part (copy-paste this into webgraphviz.com) > > digraph SARTConeBeamReconstructionFilter { > > Input0 [ label="Input 0 (Volume)"]; > Input0 [shape=Mdiamond]; > Input1 [label="Input 1 (Projections)"]; > Input1 [shape=Mdiamond]; > > node [shape=box]; > ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref > rtk::ForwardProjectionImageFilter"]; > Extract [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref > itk::MultiplyImageFilter"]; > AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; > Subtract [ label="itk::SubtractImageFilter" URL="\ref > itk::SubtractImageFilter"]; > MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" > URL="\ref itk::MultiplyImageFilter"]; > Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref > itk::DivideOrZeroOutImageFilter"]; > GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" > URL="\ref itk::MultiplyImageFilter", style=dashed]; > Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref > rtk::DisplacedDetectorImageFilter"]; > ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref > rtk::RayBoxIntersectionImageFilter"]; > ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref > rtk::BackProjectionImageFilter"]; > OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; > OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; > Input0 -> OutofInput0 [arrowhead=none]; > OutofInput0 -> ForwardProject; > ConstantVolume -> BeforeBP [arrowhead=none]; > BeforeBP -> BackProjection; > Extract -> AfterExtract[arrowhead=none]; > AfterExtract -> MultiplyByZero; > AfterExtract -> Subtract; > MultiplyByZero -> ForwardProject; > Input1 -> Extract; > ForwardProject -> Subtract; > Subtract -> MultiplyByLambda; > MultiplyByLambda -> Divide; > Divide -> GatingWeight; > GatingWeight -> Displaced; > ConstantProjectionStack -> ExtractConstantProjection; > ExtractConstantProjection -> RayBox; > RayBox -> Divide; > Displaced -> BackProjection; > BackProjection -> OutofBP [arrowhead=none]; > } > > As you can see, it is a very large part of the SART reconstruction > filter, so yoiu might be better off just copying the whole > SARTConeBeamReconstructionFilter and modifying it. > > Of course, you could also look into ITK's cost function class, and see > if one of the classes inherited from it suits your needs, implement > your cost function this way, and use ITK's off-the-shelf solvers to > minimize it. See the inheritance diagram in > https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if > you want to try this approach. > > Best regards, > Cyril > > On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >> Hello RTK users and developers, >> >> I already implemented the RTK and reconstructed some images with the >> FDK algorithm implemented in RTK. It works well. Thanks to RTK >> developers. >> Now, I am trying to develop a model-based image reconstruction for >> our cone-beam micro-CT. I see already that some iterative algorithms >> like ART and its modifications and conjugate-gradient (CG) method are >> implemented in the RTK. I want to develop a model-based >> reconstruction through the Newton/quasi-Newton optimizations methods. >> I was wondering is it possible to extract the gradient of least >> square function from implemented algorithms like CG module? Any >> recommendation will be appreciated. >> >> Best Regards, >> Vahid >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 10:21:11 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 14:21:11 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. The RTKScatterGlareCorrectionImageFilter code is given below. //rtkLagCorrectionImageFilter typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); LagCorrection->SetInput(Projections); //rtkScatterGlareCorrectionImageFilter typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Cyril Mory, > > > Thank you for your help. We are able to reconstruct 1024 > volume now. > > But the reconstruction time is around 4 minutes. Can you > please help us to reduce the reconstruction time? > > We are using NVIDIA TITAN X GPU which has 12 GB memory. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > Dear Zahid, > > > > The output looks correct. > > > > If the command line solution I suggested in a previous email works, the > > best way to move forward would be to compare your code and that of > > rtkfdk.cxx, and where it differs, make sure you have not introduced an > > error. > > > > Cyril > > > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > > Dear Cyril Mory, > > > > > > I have done the same but the Output.mhd file is still 0 > > KB for 1024 volume. Please find the attachment of the status of the output > > displayed. > > > > > > Please suggest us for further process. > > > > > > > > > Thanks & Regards > > > > > > Zahid Hasan Ansari > > > > > > > > > > > > > > > ----- Original Message ----- > > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > > [mailto:simon.rit at creatis.insa-lyon.fr] > > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > > > > >> I see two errors: > > >> > > >> Remove this line > > >> > > >> writer->SetNumberOfStreamDivisions(4); > > >> > > >> since only the streaming filter, not the write filter, needs to know > > >> about the number of divisions. > > >> And change the filename to > > >> > > >> "D:\\Output.mhd" > > >> > > >> It will write both the .mhd and the .raw files. > > >> > > >> I hope it helps, > > >> Cyril > > >> > > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > >>> Dear Cyril Mory, > > >>> > > >>> I have modified my file writer code and used > > >> StreamingImageFilter. Now its not giving any error message but the > final > > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > > >>> Please check my modified file writer code given > below. > > >>> > > >>> // Streaming depending on streaming capability of writer > > >>> typedef itk::StreamingImageFilter > > >> StreamerType; > > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>> streamerBP->SetInput(feldkamp->GetOutput()); > > >>> streamerBP->SetNumberOfStreamDivisions(4); > > >>> > > >>> //create a writer and write reconstructed file > > >>> itk::ImageFileWriter::Pointer writer; > > >>> writer = itk::ImageFileWriter::New(); > > >>> writer->SetFileName("D:\\Output.raw"); > > >>> writer->SetImageIO(io); > > >>> writer->SetInput(streamerBP->GetOutput()); > > >>> writer->SetNumberOfStreamDivisions(4); > > >>> > > >>> > > >>> Please let me know if any clarification is required. > > >>> > > >>> > > >>> Thanks & Regards > > >>> > > >>> Zahid Hasan Ansari > > >>> Senior Design Engineer > > >>> Mobile No. +91-9738379729 > > >>> > > >>> Panacea Medical Technologies Pvt. Ltd. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >> http://www.panaceamedical.com > > >>> Bangalore - India. > > >>> > > >>> > > >>> > > >>> > > >>> ----- Original Message ----- > > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > > Rit > > >> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>> > > >>> > > >>>> Dear Zahid, > > >>>> > > >>>> The --divisions is an option of the command-line application rtkfdk. > It > > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > > >>>> rather, it is passed to a streaming filter at the end of the > pipeline. > > >>>> Look for the following bit of code in rtkfdk.cxx : > > >>>> > > >>>> // Streaming depending on streaming capability of writer > > >>>> typedef itk::StreamingImageFilter > >>>> CPUOutputImageType> StreamerType; > > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>>> streamerBP->SetInput( pfeldkamp ); > > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg > ); > > >>>> > > >>>> You can find information on how a streaming filter works on this > page: > > >>>> > > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > >>>> > > >>>> I hope it helps, > > >>>> > > >>>> Cyril > > >>>> > > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > >>>>> Dear Cyril Mory, > > >>>>> > > >>>>> I have tried but I am not getting where to give > > >>>> --division 4 in my code. > > >>>>> Please find my code given below and please let me > > know > > >>>> where I need to change in my code to make it work. > > >>>>> int _tmain(int argc, _TCHAR* argv[]) > > >>>>> { > > >>>>> #pragma region "Variable declaration" > > >>>>> const double PI = 3.14159265358979323846; > > >>>>> float *angles; > > >>>>> int nProj = 349; > > >>>>> typedef unsigned short pixelType; > > >>>>> typedef float OutpixelType; > > >>>>> const int dimension = 3; > > >>>>> typedef itk::Image imageType; > > >>>>> typedef itk::ImageRegionConstIterator > ImageIteratorType; > > >>>>> imageType::Pointer Projections = imageType::New(); > > >>>>> > > >>>>> #pragma endregion "Variable declaration" > > >>>>> > > >>>>> Projections = > > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > > >> nProj); > > >>>>> imageType::SpacingType pSpacing; > > >>>>> pSpacing[0] = 0.2960; > > >>>>> pSpacing[1] = 0.2960; > > >>>>> pSpacing[2] = 0.2960; > > >>>>> Projections->SetSpacing(pSpacing); > > >>>>> > > >>>>> imageType::PointType pOrigin; > > >>>>> pOrigin[0] = -212.972; > > >>>>> pOrigin[1] = -212.972; > > >>>>> pOrigin[2] = -212.972; //-158.50; > > >>>>> Projections->SetOrigin(pOrigin); > > >>>>> > > >>>>> Projections->Update(); > > >>>>> > > >>>>> //Read angles. > > >>>>> char *angles_file = > "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > >>>>> angles = new float[nProj]; > > >>>>> angles = readAngles(angles_file, angles); > > >>>>> > > >>>>> #pragma region"Geometry" > > >>>>> // Geometry object > > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > > >>>>> { > > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, > 0, > > >> 0); > > >>>> // 136 half fan //2.07 Kidwai // > > >>>>> } > > >>>>> > > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > > >>>> GeometryWriterType; > > >>>>> GeometryWriterType::Pointer geometryWriter = > > GeometryWriterType::New(); > > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > > >>>>> geometryWriter->SetObject(geometry); > > >>>>> geometryWriter->WriteFile(); > > >>>>> geometry->Update(); > > >>>>> #pragma endregion "Geometry" > > >>>>> > > >>>>> //Define output image type > > >>>>> > > >>>>> #ifdef USE_CUDA > > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > > PSSFType; > > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > >>>>> #else > > >>>>> typedef itk::Image OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter > PSSFType; > > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > > FDKType; > > >>>>> #endif > > >>>>> > > >>>>> //ScatterCorrection > > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter > imageType > > >>>> BoellaardScatterCorrectionImageFilterType; > > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer > ScatterCorrection > > = > > >>>> BoellaardScatterCorrectionImageFilterType::New(); > > >>>>> ScatterCorrection->SetInput(Projections); > > >>>>> > > >>>>> //VarianObiRawImageFilter > > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > > >>>> RawImageFilterType; > > >>>>> RawImageFilterType::Pointer AttenuationFilter = > > >>>> RawImageFilterType::New(); > > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > >>>>> > > >>>>> //Create the output image > > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > > >>>> ConstantImageSourceType; > > >>>>> ConstantImageSourceType::PointType origin_p; > > >>>>> ConstantImageSourceType::SizeType size_p; > > >>>>> ConstantImageSourceType::SpacingType spacing_p; > > >>>>> ConstantImageSourceType::Pointer projectionsSource = > > >>>> ConstantImageSourceType::New(); > > >>>>> origin_p[0] = -127.5; > > >>>>> origin_p[1] = -127.5; > > >>>>> origin_p[2] = -127.5; > > >>>>> size_p[0] = 512; > > >>>>> size_p[1] = 512; > > >>>>> size_p[2] = 512; > > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > >>>>> > > >>>>> projectionsSource->SetOrigin(origin_p); > > >>>>> projectionsSource->SetSpacing(spacing_p); > > >>>>> projectionsSource->SetSize(size_p); > > >>>>> projectionsSource->SetConstant(0); > > >>>>> > > >>>>> // Short scan image filter > > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > > >>>>> pssf->SetGeometry(geometry); > > >>>>> pssf->InPlaceOff(); > > >>>>> std::cout << "short scan image filter success" << std::endl; > > >>>>> > > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > > >>>>> feldkamp->SetGeometry(geometry); > > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > >>>>> feldkamp->SetGPUEnabled(1); > > >>>>> feldkamp->SetNumberOfThreads(10000); > > >>>>> > > >>>>> #pragma region "Write volume" > > >>>>> > > >>>>> //Create a raw io for writing > > >>>>> > > >>>>> itk::RawImageIO::Pointer io; > > >>>>> io = itk::RawImageIO::New(); > > >>>>> > > >>>>> for (unsigned int i = 0; i < dimension; i++) > > >>>>> { > > >>>>> io->SetDimensions(i, size_p[i]); > > >>>>> io->SetSpacing(i, spacing_p[i]); > > >>>>> io->SetOrigin(i, origin_p[i]); > > >>>>> } > > >>>>> io->SetHeaderSize(0); > > >>>>> io->SetByteOrderToLittleEndian(); > > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > > >>>>> io->SetNumberOfComponents(1); > > >>>>> io->SetNumberOfDimensions(3); > > >>>>> > > >>>>> //create a writer and write reconstructed file > > >>>>> itk::ImageFileWriter::Pointer writer; > > >>>>> writer = itk::ImageFileWriter::New(); > > >>>>> writer->SetFileName("D:\\Output.raw"); > > >>>>> writer->SetImageIO(io); > > >>>>> writer->SetInput(feldkamp->GetOutput()); > > >>>>> > > >>>>> try > > >>>>> { > > >>>>> writer->Update(); > > >>>>> } > > >>>>> catch (itk::ExceptionObject & excp) > > >>>>> { > > >>>>> std::cerr << "Error while writing the image " << std::endl; > > >>>>> std::cerr << excp << std::endl; > > >>>>> getchar(); > > >>>>> } > > >>>>> #pragma endregion "WriteVolume" > > >>>>> delete[] angles; > > >>>>> return 0; > > >>>>> } > > >>>>> > > >>>>> > > >>>>> > > >>>>> Thanks & Regards > > >>>>> > > >>>>> Zahid Hasan Ansari > > >>>>> Senior Design Engineer > > >>>>> Mobile No. +91-9738379729 > > >>>>> > > >>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >>>> http://www.panaceamedical.com > > >>>>> Bangalore - India. > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> ----- Original Message ----- > > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > > >> Rit > > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>> > > >>>>> > > >>>>>> Dear Zahid, > > >>>>>> > > >>>>>> I was able to perform a reconstruction from your header and > geometry > > >>>>>> file, using the following command lines: > > >>>>>> > > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > > >>>>>> --phantomscale "128,128,128" --like Output.mhd > > >>>>>> > > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > > >> --hardware > > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > >>>>>> > > >>>>>> The first computes projections through a Shepp & Logan phantom, > with > > >> the > > >>>>>> same size, spacing, origin, etc... as your projections, using your > > >>>>>> geometry file geo.xml. > > >>>>>> > > >>>>>> The second line performs the FDK reconstruction. I had to use both > > the > > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > > (3GB, > > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > > by > > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > > >>>>>> parts, reconstructs them one by one, then assembles the results. > Can > > >> you > > >>>>>> run the same commands and let us know whether you still encounter > the > > >>>>>> crash you mentioned ? If it works, you can use your own projection > > data > > >>>>>> in the second command line instead of "simulatedprojections.mha". > > >>>>>> > > >>>>>> Best, > > >>>>>> > > >>>>>> Cyril > > >>>>>> > > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > >>>>>> > > >>>>>>> Dear Sir, > > >>>>>>> > > >>>>>>> Please find the Header file in the attachment. > > >>>>>>> > > >>>>>>> > > >>>>>>> Thanks & Regards > > >>>>>>> > > >>>>>>> Zahid Hasan Ansari > > >>>>>>> > > >>>>>>> > > >>>>>>> ----- Original Message ----- > > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > Simon > > >>>> Rit > > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>> > > >>>>>>> > > >>>>>>>> Dear Zahid, > > >>>>>>>> > > >>>>>>>> We do not need the projections file, at least not for a first > stage > > >> of > > >>>>>>>> error tracking. We only need the header. > > >>>>>>>> Try the following command line: > > >>>>>>>> > > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > > >>>>>>>> > > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" > file > > is > > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > > >> contains > > >>>>>>>> the pixel values, but at the moment we do not need them. We will > > >> create > > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough > to > > >>>>>>>> track down the error you encounter. > > >>>>>>>> > > >>>>>>>> Looking forward to receiving your file, > > >>>>>>>> Cyril > > >>>>>>>> > > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > > >>>>>>>>> Dear Sir, > > >>>>>>>>> > > >>>>>>>>> The single raw file of the projections is 1.4 GB > > and > > >> we > > >>>> are > > >>>>>> not > > >>>>>>>> able to send this big file to you. Can you please suggest other > > >>>>>> alternatives > > >>>>>>>> for this? > > >>>>>>>>> Or can you provide us the PC configuration to > solve > > >> the > > >>>>>> issue? > > >>>>>>>>> Let me know if any other clarification is > required. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> Thanks & Regards > > >>>>>>>>> > > >>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> ----- Original Message ----- > > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > >> Simon > > >>>>>> Rit > > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>>> Hello Zahid, > > >>>>>>>>>> > > >>>>>>>>>> We will need the header of your projections file, too (It is > best > > >> if > > >>>>>> you > > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > > file, > > >> so > > >>>>>> it > > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > > >>>>>>>>>> > > >>>>>>>>>> Regards, > > >>>>>>>>>> Cyril > > >>>>>>>>>> > > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>> Dear Cyril Mory, > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> I have only used RTK version 1.3.0. but > in > > the > > >>>> error > > >>>>>>>>>> message it is showing RTK version 1.2.0. > > >>>>>>>>>>> Please find the attachment of the > geometry > > >> file > > >>>> of > > >>>>>> our > > >>>>>>>>>> projections. > > >>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>> > > >>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com], > > >>>> Simon > > >>>>>>>> Rit > > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, > saimahesh.m at panaceamedical.com > > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>> > > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > > >>>> source > > >>>>>> of > > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > > >>>>>> therefore > > >>>>>>>>>>>> yourself): > > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > > changes > > >> in > > >>>>>> the > > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so > your > > >>>>>> problem > > >>>>>>>>>>>> might disappear just by upgrading to the new version > > >>>>>>>>>>>> - create a small example that reproduces your problem. You > can, > > >> for > > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > > >> logan > > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look > at > > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > > an > > >>>>>>>>>>>> example). And send us the script > > >>>>>>>>>>>> - OR send us your geometry file and the header of your > > >> projections > > >>>>>> file > > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > > >>>>>> zero-filled > > >>>>>>>>>>>> stack of projections), and the command line that crashes > > >>>>>>>>>>>> > > >>>>>>>>>>>> Best regards, > > >>>>>>>>>>>> Cyril > > >>>>>>>>>>>> > > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>>>> Dear Simon Rit, > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Please find the screen shot in the > > >> attachment. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > > : > > >>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>>>> To: Zahid Hasan Ansari > > [mailto:zahidhasan.a at panaceamedical.com] > > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > > >>>>>>>> [mailto:rtk-users at public.kitware.com], > > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is > a > > >> CUDA > > >>>>>>>>>> memory > > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > > >> first > > >>>>>> make > > >>>>>>>>>>>> sure > > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > > >> images. > > >>>>>> If > > >>>>>>>> it > > >>>>>>>>>>>> is > > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > > --divisions. > > >>>> The > > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > > use > > >>>> of > > >>>>>>>> RTK > > >>>>>>>>>> on > > >>>>>>>>>>>>>> our case studies webpage > > >>>>>>>>>>>> . > > >>>>>>>>>>>>>> Simon > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Dear Sir\Madam, > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > > >>>>>> reconstruction > > >>>>>>>>>> using > > >>>>>>>>>>>> RTK > > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > > screen > > >>>>>> shoot > > >>>>>>>> of > > >>>>>>>>>>>>>>> the > > >>>>>>>>>>>>>>>> same. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am using the following items > given > > >> below. > > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > > console > > >>>>>>>> application > > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > > >>>>>>>>>>>>>>>> 5. CUDA 7. > > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Please provide the solution of this > > and > > >> let > > >>>> me > > >>>>>>>> know > > >>>>>>>>>> if > > >>>>>>>>>>>>>> any > > >>>>>>>>>>>>>>>> other clarification is required. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, > > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 > | > > >> Url > > >>>> : > > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>>>> > ____________________________________________________________ > > >>>>>>>>>>>>>>> ________________ > > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> This email and any files transmitted with it are > > confidential > > >>>> and > > >>>>>>>>>>>> intended > > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom > they > > >> are > > >>>>>>>>>>>> addressed. > > >>>>>>>>>>>>>>> If you have received this email in error please notify the > > >>>> system > > >>>>>>>>>>>> manager. > > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > > email > > >>>> are > > >>>>>>>>>>>> solely > > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > > of > > >>>> the > > >>>>>>>>>>>> company. > > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > > >>>> attachments > > >>>>>>>> for > > >>>>>>>>>>>> the > > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > > any > > >>>>>> damage > > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> This email and any files transmitted with it are > confidential > > >> and > > >>>>>>>>>> intended > > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > > are > > >>>>>>>>>> addressed. > > >>>>>>>>>>>>> If you have received this email in error please notify the > > >> system > > >>>>>>>>>> manager. > > >>>>>>>>>>>>> Please note that any views or opinions presented in this > email > > >> are > > >>>>>>>>>> solely > > >>>>>>>>>>>>> those of the author and do not necessarily represent those > of > > >> the > > >>>>>>>>>> company. > > >>>>>>>>>>>>> Finally, the recipient should check this email and any > > >> attachments > > >>>>>> for > > >>>>>>>>>> the > > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > > >>>> damage > > >>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>> ________________________________________ > > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > Area > > >>>>>> Phase > > >>>>>>>> 1, > > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > Industrial > > >>>>>> Area, > > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>> > > >>>>>>>>>>> This email and any files transmitted with it are confidential > > and > > >>>>>>>> intended > > >>>>>>>>>>> solely for the use of the individual or entity to whom they > are > > >>>>>>>> addressed. > > >>>>>>>>>>> If you have received this email in error please notify the > > system > > >>>>>>>> manager. > > >>>>>>>>>>> Please note that any views or opinions presented in this email > > are > > >>>>>>>> solely > > >>>>>>>>>>> those of the author and do not necessarily represent those of > > the > > >>>>>>>> company. > > >>>>>>>>>>> Finally, the recipient should check this email and any > > attachments > > >>>> for > > >>>>>>>> the > > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > > >> damage > > >>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>> > > >>>>>>>>> ________________________________________ > > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > > >>>> Phase > > >>>>>> 1, > > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > > >>>> Area, > > >>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>> > > >>>>>>>>> This email and any files transmitted with it are confidential > and > > >>>>>> intended > > >>>>>>>>> solely for the use of the individual or entity to whom they are > > >>>>>> addressed. > > >>>>>>>>> If you have received this email in error please notify the > system > > >>>>>> manager. > > >>>>>>>>> Please note that any views or opinions presented in this email > are > > >>>>>> solely > > >>>>>>>>> those of the author and do not necessarily represent those of > the > > >>>>>> company. > > >>>>>>>>> Finally, the recipient should check this email and any > attachments > > >> for > > >>>>>> the > > >>>>>>>>> presence of viruses. The company accepts no liability for any > > damage > > >>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>> ________________________________________ > > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > >> Phase > > >>>> 1, > > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > >> Area, > > >>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>> Fax : + 91 80 42428710 > > >>>>>>> Url : http://www.panaceamedical.com > > >>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>> > > >>>>>>> This email and any files transmitted with it are confidential and > > >>>> intended > > >>>>>>> solely for the use of the individual or entity to whom they are > > >>>> addressed. > > >>>>>>> If you have received this email in error please notify the system > > >>>> manager. > > >>>>>>> Please note that any views or opinions presented in this email are > > >>>> solely > > >>>>>>> those of the author and do not necessarily represent those of the > > >>>> company. > > >>>>>>> Finally, the recipient should check this email and any attachments > > for > > >>>> the > > >>>>>>> presence of viruses. The company accepts no liability for any > damage > > >>>>>>> caused by any virus transmitted by this email. > > >>>>>>> > > >>>>> ________________________________________ > > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>> Fax : + 91 80 42428710 > > >>>>> Url : http://www.panaceamedical.com > > >>>>> > > >> > > > ____________________________________________________________________________ > > >>>>> PMT EMAIL DISCLAIMER: > > >>>>> > > >>>>> This email and any files transmitted with it are confidential and > > >> intended > > >>>>> solely for the use of the individual or entity to whom they are > > >> addressed. > > >>>>> If you have received this email in error please notify the system > > >> manager. > > >>>>> Please note that any views or opinions presented in this email are > > >> solely > > >>>>> those of the author and do not necessarily represent those of the > > >> company. > > >>>>> Finally, the recipient should check this email and any attachments > for > > >> the > > >>>>> presence of viruses. The company accepts no liability for any damage > > >>>>> caused by any virus transmitted by this email. > > >>>>> > > >>>>> > > >>>>> > > >>>> > > >>> ________________________________________ > > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 > > >>> Fax : + 91 80 42428710 > > >>> Url : http://www.panaceamedical.com > > >>> > > >> > > > ____________________________________________________________________________ > > >>> PMT EMAIL DISCLAIMER: > > >>> > > >>> This email and any files transmitted with it are confidential and > > intended > > >>> solely for the use of the individual or entity to whom they are > > addressed. > > >>> If you have received this email in error please notify the system > > manager. > > >>> Please note that any views or opinions presented in this email are > > solely > > >>> those of the author and do not necessarily represent those of the > > company. > > >>> Finally, the recipient should check this email and any attachments for > > the > > >>> presence of viruses. The company accepts no liability for any damage > > >>> caused by any virus transmitted by this email. > > >>> > > >>> > > >>> > > >>> > > >>> > > >> > > >> > > > > > > ________________________________________ > > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > > Malur - 563130. Kolar District. INDIA. > > > > > > Tel : +91 80 4242 8700 / 2845 4785 > > > Fax : + 91 80 42428710 > > > Url : http://www.panaceamedical.com > > > > > > ____________________________________________________________________________ > > > PMT EMAIL DISCLAIMER: > > > > > > This email and any files transmitted with it are confidential and > intended > > > solely for the use of the individual or entity to whom they are > addressed. > > > If you have received this email in error please notify the system > manager. > > > Please note that any views or opinions presented in this email are > solely > > > those of the author and do not necessarily represent those of the > company. > > > Finally, the recipient should check this email and any attachments for > the > > > presence of viruses. The company accepts no liability for any damage > > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: ScatterGlareError.png Type: image/png Size: 121487 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 3 10:28:49 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 3 Nov 2016 15:28:49 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> References: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Message-ID: Hi, I think you should look at the applications before posting a question on the mailing list. There is a rtkscatterglarecorrection tool, look at rtkscatterglarecorrection.cxx. You must init the coefficients. I'll add a check to make the error message more readable but please, take the time to look at all the examples available in applications before posting a question. Thanks, Simon On Thu, Nov 3, 2016 at 3:21 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > > We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. > > The RTKScatterGlareCorrectionImageFilter code is given below. > > //rtkLagCorrectionImageFilter > typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; > LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); > LagCorrection->SetInput(Projections); > > //rtkScatterGlareCorrectionImageFilter > typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; > ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); > ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); > > > > > > Thanks & Regards > > Zahid Hasan Ansari > > > > ----- Original Message ----- > From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Cyril Mory, >> >> >> Thank you for your help. We are able to reconstruct 1024 >> volume now. >> >> But the reconstruction time is around 4 minutes. Can you >> please help us to reduce the reconstruction time? >> >> We are using NVIDIA TITAN X GPU which has 12 GB memory. >> >> >> Thanks & Regards >> >> Zahid Hasan Ansari >> >> >> >> >> ----- Original Message ----- >> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> >> >> > Dear Zahid, >> > >> > The output looks correct. >> > >> > If the command line solution I suggested in a previous email works, the >> > best way to move forward would be to compare your code and that of >> > rtkfdk.cxx, and where it differs, make sure you have not introduced an >> > error. >> > >> > Cyril >> > >> > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: >> > > Dear Cyril Mory, >> > > >> > > I have done the same but the Output.mhd file is still 0 >> > KB for 1024 volume. Please find the attachment of the status of the output >> > displayed. >> > > >> > > Please suggest us for further process. >> > > >> > > >> > > Thanks & Regards >> > > >> > > Zahid Hasan Ansari >> > > >> > > >> > > >> > > >> > > ----- Original Message ----- >> > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >> > [mailto:simon.rit at creatis.insa-lyon.fr] >> > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > > >> > > >> > >> I see two errors: >> > >> >> > >> Remove this line >> > >> >> > >> writer->SetNumberOfStreamDivisions(4); >> > >> >> > >> since only the streaming filter, not the write filter, needs to know >> > >> about the number of divisions. >> > >> And change the filename to >> > >> >> > >> "D:\\Output.mhd" >> > >> >> > >> It will write both the .mhd and the .raw files. >> > >> >> > >> I hope it helps, >> > >> Cyril >> > >> >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >> > >>> Dear Cyril Mory, >> > >>> >> > >>> I have modified my file writer code and used >> > >> StreamingImageFilter. Now its not giving any error message but the >> final >> > >> output is 0 byte for 1024 volume. It working fine for 512 volume. >> > >>> Please check my modified file writer code given >> below. >> > >>> >> > >>> // Streaming depending on streaming capability of writer >> > >>> typedef itk::StreamingImageFilter >> > >> StreamerType; >> > >>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>> streamerBP->SetInput(feldkamp->GetOutput()); >> > >>> streamerBP->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> //create a writer and write reconstructed file >> > >>> itk::ImageFileWriter::Pointer writer; >> > >>> writer = itk::ImageFileWriter::New(); >> > >>> writer->SetFileName("D:\\Output.raw"); >> > >>> writer->SetImageIO(io); >> > >>> writer->SetInput(streamerBP->GetOutput()); >> > >>> writer->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> >> > >>> Please let me know if any clarification is required. >> > >>> >> > >>> >> > >>> Thanks & Regards >> > >>> >> > >>> Zahid Hasan Ansari >> > >>> Senior Design Engineer >> > >>> Mobile No. +91-9738379729 >> > >>> >> > >>> Panacea Medical Technologies Pvt. Ltd. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >> http://www.panaceamedical.com >> > >>> Bangalore - India. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> ----- Original Message ----- >> > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> > Rit >> > >> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>> >> > >>> >> > >>>> Dear Zahid, >> > >>>> >> > >>>> The --divisions is an option of the command-line application rtkfdk. >> It >> > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >> > >>>> rather, it is passed to a streaming filter at the end of the >> pipeline. >> > >>>> Look for the following bit of code in rtkfdk.cxx : >> > >>>> >> > >>>> // Streaming depending on streaming capability of writer >> > >>>> typedef itk::StreamingImageFilter> > >>>> CPUOutputImageType> StreamerType; >> > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>>> streamerBP->SetInput( pfeldkamp ); >> > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg >> ); >> > >>>> >> > >>>> You can find information on how a streaming filter works on this >> page: >> > >>>> >> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> > >>>> >> > >>>> I hope it helps, >> > >>>> >> > >>>> Cyril >> > >>>> >> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >> > >>>>> Dear Cyril Mory, >> > >>>>> >> > >>>>> I have tried but I am not getting where to give >> > >>>> --division 4 in my code. >> > >>>>> Please find my code given below and please let me >> > know >> > >>>> where I need to change in my code to make it work. >> > >>>>> int _tmain(int argc, _TCHAR* argv[]) >> > >>>>> { >> > >>>>> #pragma region "Variable declaration" >> > >>>>> const double PI = 3.14159265358979323846; >> > >>>>> float *angles; >> > >>>>> int nProj = 349; >> > >>>>> typedef unsigned short pixelType; >> > >>>>> typedef float OutpixelType; >> > >>>>> const int dimension = 3; >> > >>>>> typedef itk::Image imageType; >> > >>>>> typedef itk::ImageRegionConstIterator >> ImageIteratorType; >> > >>>>> imageType::Pointer Projections = imageType::New(); >> > >>>>> >> > >>>>> #pragma endregion "Variable declaration" >> > >>>>> >> > >>>>> Projections = >> > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> > >> nProj); >> > >>>>> imageType::SpacingType pSpacing; >> > >>>>> pSpacing[0] = 0.2960; >> > >>>>> pSpacing[1] = 0.2960; >> > >>>>> pSpacing[2] = 0.2960; >> > >>>>> Projections->SetSpacing(pSpacing); >> > >>>>> >> > >>>>> imageType::PointType pOrigin; >> > >>>>> pOrigin[0] = -212.972; >> > >>>>> pOrigin[1] = -212.972; >> > >>>>> pOrigin[2] = -212.972; //-158.50; >> > >>>>> Projections->SetOrigin(pOrigin); >> > >>>>> >> > >>>>> Projections->Update(); >> > >>>>> >> > >>>>> //Read angles. >> > >>>>> char *angles_file = >> "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >> > >>>>> angles = new float[nProj]; >> > >>>>> angles = readAngles(angles_file, angles); >> > >>>>> >> > >>>>> #pragma region"Geometry" >> > >>>>> // Geometry object >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> > >>>>> GeometryType::Pointer geometry = GeometryType::New(); >> > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >> > >>>>> { >> > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, >> 0, >> > >> 0); >> > >>>> // 136 half fan //2.07 Kidwai // >> > >>>>> } >> > >>>>> >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> > >>>> GeometryWriterType; >> > >>>>> GeometryWriterType::Pointer geometryWriter = >> > GeometryWriterType::New(); >> > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >> > >>>>> geometryWriter->SetObject(geometry); >> > >>>>> geometryWriter->WriteFile(); >> > >>>>> geometry->Update(); >> > >>>>> #pragma endregion "Geometry" >> > >>>>> >> > >>>>> //Define output image type >> > >>>>> >> > >>>>> #ifdef USE_CUDA >> > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > >> PSSFType; >> > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> > >>>>> #else >> > >>>>> typedef itk::Image OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter >> PSSFType; >> > >>>>> typedef rtk::FDKConeBeamReconstructionFilter >> > FDKType; >> > >>>>> #endif >> > >>>>> >> > >>>>> //ScatterCorrection >> > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter> > imageType >> > >>>> BoellaardScatterCorrectionImageFilterType; >> > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer >> ScatterCorrection >> > = >> > >>>> BoellaardScatterCorrectionImageFilterType::New(); >> > >>>>> ScatterCorrection->SetInput(Projections); >> > >>>>> >> > >>>>> //VarianObiRawImageFilter >> > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> > >>>> RawImageFilterType; >> > >>>>> RawImageFilterType::Pointer AttenuationFilter = >> > >>>> RawImageFilterType::New(); >> > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >> > >>>>> >> > >>>>> //Create the output image >> > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >> > >>>> ConstantImageSourceType; >> > >>>>> ConstantImageSourceType::PointType origin_p; >> > >>>>> ConstantImageSourceType::SizeType size_p; >> > >>>>> ConstantImageSourceType::SpacingType spacing_p; >> > >>>>> ConstantImageSourceType::Pointer projectionsSource = >> > >>>> ConstantImageSourceType::New(); >> > >>>>> origin_p[0] = -127.5; >> > >>>>> origin_p[1] = -127.5; >> > >>>>> origin_p[2] = -127.5; >> > >>>>> size_p[0] = 512; >> > >>>>> size_p[1] = 512; >> > >>>>> size_p[2] = 512; >> > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >> > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >> > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >> > >>>>> >> > >>>>> projectionsSource->SetOrigin(origin_p); >> > >>>>> projectionsSource->SetSpacing(spacing_p); >> > >>>>> projectionsSource->SetSize(size_p); >> > >>>>> projectionsSource->SetConstant(0); >> > >>>>> >> > >>>>> // Short scan image filter >> > >>>>> PSSFType::Pointer pssf = PSSFType::New(); >> > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >> > >>>>> pssf->SetGeometry(geometry); >> > >>>>> pssf->InPlaceOff(); >> > >>>>> std::cout << "short scan image filter success" << std::endl; >> > >>>>> >> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); >> > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >> > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >> > >>>>> feldkamp->SetGeometry(geometry); >> > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >> > >>>>> feldkamp->SetGPUEnabled(1); >> > >>>>> feldkamp->SetNumberOfThreads(10000); >> > >>>>> >> > >>>>> #pragma region "Write volume" >> > >>>>> >> > >>>>> //Create a raw io for writing >> > >>>>> >> > >>>>> itk::RawImageIO::Pointer io; >> > >>>>> io = itk::RawImageIO::New(); >> > >>>>> >> > >>>>> for (unsigned int i = 0; i < dimension; i++) >> > >>>>> { >> > >>>>> io->SetDimensions(i, size_p[i]); >> > >>>>> io->SetSpacing(i, spacing_p[i]); >> > >>>>> io->SetOrigin(i, origin_p[i]); >> > >>>>> } >> > >>>>> io->SetHeaderSize(0); >> > >>>>> io->SetByteOrderToLittleEndian(); >> > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >> > >>>>> io->SetNumberOfComponents(1); >> > >>>>> io->SetNumberOfDimensions(3); >> > >>>>> >> > >>>>> //create a writer and write reconstructed file >> > >>>>> itk::ImageFileWriter::Pointer writer; >> > >>>>> writer = itk::ImageFileWriter::New(); >> > >>>>> writer->SetFileName("D:\\Output.raw"); >> > >>>>> writer->SetImageIO(io); >> > >>>>> writer->SetInput(feldkamp->GetOutput()); >> > >>>>> >> > >>>>> try >> > >>>>> { >> > >>>>> writer->Update(); >> > >>>>> } >> > >>>>> catch (itk::ExceptionObject & excp) >> > >>>>> { >> > >>>>> std::cerr << "Error while writing the image " << std::endl; >> > >>>>> std::cerr << excp << std::endl; >> > >>>>> getchar(); >> > >>>>> } >> > >>>>> #pragma endregion "WriteVolume" >> > >>>>> delete[] angles; >> > >>>>> return 0; >> > >>>>> } >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> Thanks & Regards >> > >>>>> >> > >>>>> Zahid Hasan Ansari >> > >>>>> Senior Design Engineer >> > >>>>> Mobile No. +91-9738379729 >> > >>>>> >> > >>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >>>> http://www.panaceamedical.com >> > >>>>> Bangalore - India. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> ----- Original Message ----- >> > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >> > >> Rit >> > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>> >> > >>>>> >> > >>>>>> Dear Zahid, >> > >>>>>> >> > >>>>>> I was able to perform a reconstruction from your header and >> geometry >> > >>>>>> file, using the following command lines: >> > >>>>>> >> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> > >>>>>> --phantomscale "128,128,128" --like Output.mhd >> > >>>>>> >> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> > >> --hardware >> > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> > >>>>>> >> > >>>>>> The first computes projections through a Shepp & Logan phantom, >> with >> > >> the >> > >>>>>> same size, spacing, origin, etc... as your projections, using your >> > >>>>>> geometry file geo.xml. >> > >>>>>> >> > >>>>>> The second line performs the FDK reconstruction. I had to use both >> > the >> > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory >> > (3GB, >> > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory >> > by >> > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> > >>>>>> parts, reconstructs them one by one, then assembles the results. >> Can >> > >> you >> > >>>>>> run the same commands and let us know whether you still encounter >> the >> > >>>>>> crash you mentioned ? If it works, you can use your own projection >> > data >> > >>>>>> in the second command line instead of "simulatedprojections.mha". >> > >>>>>> >> > >>>>>> Best, >> > >>>>>> >> > >>>>>> Cyril >> > >>>>>> >> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> > >>>>>> >> > >>>>>>> Dear Sir, >> > >>>>>>> >> > >>>>>>> Please find the Header file in the attachment. >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> Thanks & Regards >> > >>>>>>> >> > >>>>>>> Zahid Hasan Ansari >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> ----- Original Message ----- >> > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > Simon >> > >>>> Rit >> > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>> >> > >>>>>>> >> > >>>>>>>> Dear Zahid, >> > >>>>>>>> >> > >>>>>>>> We do not need the projections file, at least not for a first >> stage >> > >> of >> > >>>>>>>> error tracking. We only need the header. >> > >>>>>>>> Try the following command line: >> > >>>>>>>> >> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >> > >>>>>>>> >> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" >> file >> > is >> > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> > >> contains >> > >>>>>>>> the pixel values, but at the moment we do not need them. We will >> > >> create >> > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough >> to >> > >>>>>>>> track down the error you encounter. >> > >>>>>>>> >> > >>>>>>>> Looking forward to receiving your file, >> > >>>>>>>> Cyril >> > >>>>>>>> >> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >> > >>>>>>>>> Dear Sir, >> > >>>>>>>>> >> > >>>>>>>>> The single raw file of the projections is 1.4 GB >> > and >> > >> we >> > >>>> are >> > >>>>>> not >> > >>>>>>>> able to send this big file to you. Can you please suggest other >> > >>>>>> alternatives >> > >>>>>>>> for this? >> > >>>>>>>>> Or can you provide us the PC configuration to >> solve >> > >> the >> > >>>>>> issue? >> > >>>>>>>>> Let me know if any other clarification is >> required. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> Thanks & Regards >> > >>>>>>>>> >> > >>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> ----- Original Message ----- >> > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > >> Simon >> > >>>>>> Rit >> > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>>> Hello Zahid, >> > >>>>>>>>>> >> > >>>>>>>>>> We will need the header of your projections file, too (It is >> best >> > >> if >> > >>>>>> you >> > >>>>>>>>>> have all your projections as a single .mhd and a single .raw >> > file, >> > >> so >> > >>>>>> it >> > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >> > >>>>>>>>>> >> > >>>>>>>>>> Regards, >> > >>>>>>>>>> Cyril >> > >>>>>>>>>> >> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>> Dear Cyril Mory, >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> I have only used RTK version 1.3.0. but >> in >> > the >> > >>>> error >> > >>>>>>>>>> message it is showing RTK version 1.2.0. >> > >>>>>>>>>>> Please find the attachment of the >> geometry >> > >> file >> > >>>> of >> > >>>>>> our >> > >>>>>>>>>> projections. >> > >>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>> >> > >>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>>>> To: Zahid Hasan Ansari >> [mailto:zahidhasan.a at panaceamedical.com], >> > >>>> Simon >> > >>>>>>>> Rit >> > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, >> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the >> > >>>> source >> > >>>>>> of >> > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >> > >>>>>> therefore >> > >>>>>>>>>>>> yourself): >> > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable >> > changes >> > >> in >> > >>>>>> the >> > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so >> your >> > >>>>>> problem >> > >>>>>>>>>>>> might disappear just by upgrading to the new version >> > >>>>>>>>>>>> - create a small example that reproduces your problem. You >> can, >> > >> for >> > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> > >> logan >> > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look >> at >> > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need >> > an >> > >>>>>>>>>>>> example). And send us the script >> > >>>>>>>>>>>> - OR send us your geometry file and the header of your >> > >> projections >> > >>>>>> file >> > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >> > >>>>>> zero-filled >> > >>>>>>>>>>>> stack of projections), and the command line that crashes >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Best regards, >> > >>>>>>>>>>>> Cyril >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>>>> Dear Simon Rit, >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Please find the screen shot in the >> > >> attachment. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >> > : >> > >>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>>>> To: Zahid Hasan Ansari >> > [mailto:zahidhasan.a at panaceamedical.com] >> > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >> > >>>>>>>> [mailto:rtk-users at public.kitware.com], >> > >>>>>>>>>>>> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is >> a >> > >> CUDA >> > >>>>>>>>>> memory >> > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> > >> first >> > >>>>>> make >> > >>>>>>>>>>>> sure >> > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> > >> images. >> > >>>>>> If >> > >>>>>>>> it >> > >>>>>>>>>>>> is >> > >>>>>>>>>>>>>> no sufficient, you can split your volume using the >> > --divisions. >> > >>>> The >> > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >> > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the >> > use >> > >>>> of >> > >>>>>>>> RTK >> > >>>>>>>>>> on >> > >>>>>>>>>>>>>> our case studies webpage >> > >>>>>>>>>>>> . >> > >>>>>>>>>>>>>> Simon >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >> > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Dear Sir\Madam, >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >> > >>>>>> reconstruction >> > >>>>>>>>>> using >> > >>>>>>>>>>>> RTK >> > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the >> > screen >> > >>>>>> shoot >> > >>>>>>>> of >> > >>>>>>>>>>>>>>> the >> > >>>>>>>>>>>>>>>> same. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am using the following items >> given >> > >> below. >> > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >> > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >> > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit >> > console >> > >>>>>>>> application >> > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >> > >>>>>>>>>>>>>>>> 5. CUDA 7. >> > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >> > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Please provide the solution of this >> > and >> > >> let >> > >>>> me >> > >>>>>>>> know >> > >>>>>>>>>> if >> > >>>>>>>>>>>>>> any >> > >>>>>>>>>>>>>>>> other clarification is required. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> > EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, >> > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 >> | >> > >> Url >> > >>>> : >> > >>>>>>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>>>> >> ____________________________________________________________ >> > >>>>>>>>>>>>>>> ________________ >> > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> This email and any files transmitted with it are >> > confidential >> > >>>> and >> > >>>>>>>>>>>> intended >> > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom >> they >> > >> are >> > >>>>>>>>>>>> addressed. >> > >>>>>>>>>>>>>>> If you have received this email in error please notify the >> > >>>> system >> > >>>>>>>>>>>> manager. >> > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this >> > email >> > >>>> are >> > >>>>>>>>>>>> solely >> > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those >> > of >> > >>>> the >> > >>>>>>>>>>>> company. >> > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >>>> attachments >> > >>>>>>>> for >> > >>>>>>>>>>>> the >> > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> > any >> > >>>>>> damage >> > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> This email and any files transmitted with it are >> confidential >> > >> and >> > >>>>>>>>>> intended >> > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> > are >> > >>>>>>>>>> addressed. >> > >>>>>>>>>>>>> If you have received this email in error please notify the >> > >> system >> > >>>>>>>>>> manager. >> > >>>>>>>>>>>>> Please note that any views or opinions presented in this >> email >> > >> are >> > >>>>>>>>>> solely >> > >>>>>>>>>>>>> those of the author and do not necessarily represent those >> of >> > >> the >> > >>>>>>>>>> company. >> > >>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >> attachments >> > >>>>>> for >> > >>>>>>>>>> the >> > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> any >> > >>>> damage >> > >>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > Area >> > >>>>>> Phase >> > >>>>>>>> 1, >> > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > Industrial >> > >>>>>> Area, >> > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>> >> > >>>>>>>>>>> This email and any files transmitted with it are confidential >> > and >> > >>>>>>>> intended >> > >>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >> > >>>>>>>> addressed. >> > >>>>>>>>>>> If you have received this email in error please notify the >> > system >> > >>>>>>>> manager. >> > >>>>>>>>>>> Please note that any views or opinions presented in this email >> > are >> > >>>>>>>> solely >> > >>>>>>>>>>> those of the author and do not necessarily represent those of >> > the >> > >>>>>>>> company. >> > >>>>>>>>>>> Finally, the recipient should check this email and any >> > attachments >> > >>>> for >> > >>>>>>>> the >> > >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> > >> damage >> > >>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>> >> > >>>>>>>>> ________________________________________ >> > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >> > >>>> Phase >> > >>>>>> 1, >> > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >> > >>>> Area, >> > >>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>> >> > >>>>>>>>> This email and any files transmitted with it are confidential >> and >> > >>>>>> intended >> > >>>>>>>>> solely for the use of the individual or entity to whom they are >> > >>>>>> addressed. >> > >>>>>>>>> If you have received this email in error please notify the >> system >> > >>>>>> manager. >> > >>>>>>>>> Please note that any views or opinions presented in this email >> are >> > >>>>>> solely >> > >>>>>>>>> those of the author and do not necessarily represent those of >> the >> > >>>>>> company. >> > >>>>>>>>> Finally, the recipient should check this email and any >> attachments >> > >> for >> > >>>>>> the >> > >>>>>>>>> presence of viruses. The company accepts no liability for any >> > damage >> > >>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>> ________________________________________ >> > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > >> Phase >> > >>>> 1, >> > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > >> Area, >> > >>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>> Fax : + 91 80 42428710 >> > >>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>> >> > >>>>>>> This email and any files transmitted with it are confidential and >> > >>>> intended >> > >>>>>>> solely for the use of the individual or entity to whom they are >> > >>>> addressed. >> > >>>>>>> If you have received this email in error please notify the system >> > >>>> manager. >> > >>>>>>> Please note that any views or opinions presented in this email are >> > >>>> solely >> > >>>>>>> those of the author and do not necessarily represent those of the >> > >>>> company. >> > >>>>>>> Finally, the recipient should check this email and any attachments >> > for >> > >>>> the >> > >>>>>>> presence of viruses. The company accepts no liability for any >> damage >> > >>>>>>> caused by any virus transmitted by this email. >> > >>>>>>> >> > >>>>> ________________________________________ >> > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>> Fax : + 91 80 42428710 >> > >>>>> Url : http://www.panaceamedical.com >> > >>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>> PMT EMAIL DISCLAIMER: >> > >>>>> >> > >>>>> This email and any files transmitted with it are confidential and >> > >> intended >> > >>>>> solely for the use of the individual or entity to whom they are >> > >> addressed. >> > >>>>> If you have received this email in error please notify the system >> > >> manager. >> > >>>>> Please note that any views or opinions presented in this email are >> > >> solely >> > >>>>> those of the author and do not necessarily represent those of the >> > >> company. >> > >>>>> Finally, the recipient should check this email and any attachments >> for >> > >> the >> > >>>>> presence of viruses. The company accepts no liability for any damage >> > >>>>> caused by any virus transmitted by this email. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>> >> > >>> ________________________________________ >> > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>> Fax : + 91 80 42428710 >> > >>> Url : http://www.panaceamedical.com >> > >>> >> > >> >> > >> ____________________________________________________________________________ >> > >>> PMT EMAIL DISCLAIMER: >> > >>> >> > >>> This email and any files transmitted with it are confidential and >> > intended >> > >>> solely for the use of the individual or entity to whom they are >> > addressed. >> > >>> If you have received this email in error please notify the system >> > manager. >> > >>> Please note that any views or opinions presented in this email are >> > solely >> > >>> those of the author and do not necessarily represent those of the >> > company. >> > >>> Finally, the recipient should check this email and any attachments for >> > the >> > >>> presence of viruses. The company accepts no liability for any damage >> > >>> caused by any virus transmitted by this email. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > >> >> > >> >> > > >> > > ________________________________________ >> > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >> > Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> > Malur - 563130. Kolar District. INDIA. >> > > >> > > Tel : +91 80 4242 8700 / 2845 4785 >> > > Fax : + 91 80 42428710 >> > > Url : http://www.panaceamedical.com >> > > >> > >> ____________________________________________________________________________ >> > > PMT EMAIL DISCLAIMER: >> > > >> > > This email and any files transmitted with it are confidential and >> intended >> > > solely for the use of the individual or entity to whom they are >> addressed. >> > > If you have received this email in error please notify the system >> manager. >> > > Please note that any views or opinions presented in this email are >> solely >> > > those of the author and do not necessarily represent those of the >> company. >> > > Finally, the recipient should check this email and any attachments for >> the >> > > presence of viruses. The company accepts no liability for any damage >> > > caused by any virus transmitted by this email. >> > > >> > >> > >> > > > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Thu Nov 3 16:10:31 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 20:10:31 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Message-ID: <1775591917.651990.1478203831679@mail.yahoo.com> OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right?About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question:I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards,Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Fri Nov 4 02:31:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 4 Nov 2016 07:31:18 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1775591917.651990.1478203831679@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> Message-ID: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: > OK. good. Thank Cyril to clarify it to me. To implement the Newton's > methods instead of multiplication of R with R^T, we need the > multiplication of Jacobian/Sensitivity (R here) matrix with vector > variable (here x) and the gradient vector (here multiplication of R > with -r). I think it is possible to implement the Newton optimization > methods with the current modules as I think we could extract the R and > f dot product and R and r dot product. Am I right? > About the displayed algorithms, I think the gradient vector is dot > product of matrix A (Jacobian) with the minus residual vector (-r). > > One more question: > I already developed my codes in python. Do you think it is easy to > wrap your modules in python? I don't have experience in these subject. > > Regards, > Vahid > > > On Thursday, November 3, 2016 2:23 AM, Cyril Mory > wrote: > > > Hello Vahid, > Thank you for this insight on Newton's methods. Yes, the output of the > backprojection filter, in SART, is the gradient of the cost function. > You may have noticed that the pipeline performs a division of the > forward projection by something coming from > "RayBoxIntersectionFilter". This is to normalize the forward > projection, so that R^T R f ~= blurry f. If you don't do it, you'll > have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, > and your algorithm will quickly diverge. > You could try to extract the gradient from the conjugate gradient > filter as well, but it is significantly more tricky: first, the CG > filter was implemented from the following algorithm, taken from > wikipedia (which embeds the normalization I was mentioning earlier): > In this algorithm, it is not clear to me what exactly is the gradient > of the cost function. I would say it is something like "- r_k", but > I'm not sure. Second, as you see, the CG filter needs an operator A, > which may differ from one problem to another, so this operator is > implemented in a separate filter, which in your case would be > rtkReconstructionConjugateGradientOperator, with the laplacian > regularization parameter gamma set to 0. > Note that we never actually store the system matrix R. Instead, the > interpolation coefficient it contains are re-computed on the fly > everytime we forward project. And the same holds for backprojection, > i.e the matrix R^T. > Best, > Cyril > > On 11/03/2016 03:38 AM, vahid ettehadi wrote: >> Hello Simon and Cyril, >> Thanks for the reply. >> You are right Simon. I did not notice it too in the literature. The >> main problem as you said is the storage. Actually I developed the >> conjugate gradient (CG), quasi-Newton and Newton optimization methods >> for optical tomography and I intended to apply them to the CT >> reconstruction as well. I implemented the Newton's methods >> (Gauss-Newton and Levenberg-Marquardt) in a >> Jacobian-Free-Newton-Krylov approaches to avoid the matrix >> multiplication of Jacobians (sensitivity). It means we only need to >> store the Jacobian matrix for the these methods (the matrix R that >> Cyril was mentioned), that is still a big matrix for practical >> problems in CT reconstruction. For the quasi-Newton I adapted an >> L-BFGS algorithm that only need the 3 or 8 last iterations of the >> gradient vector to calculate the Hessian matrix. In my case, the >> L-BFGS and Newton's methods was much faster than the CG as you know >> because of using the second order derivative (hessian matrix). I saw >> in your last paper you implement the conjugate gradient method, so I >> thought it might be easy to extract the gradient vector from CG >> modules and solve the cost function within the quasi-Newton/Newton >> methods. I will look at the codes to see what I can do. >> Thanks again for the reply. >> >> @Cyril: >> Please correct me if I am wrong. you mean the output of >> backProjectionFilter is the gradient of defined cost function? >> >> Regards, >> Vahid >> >> >> On Wednesday, November 2, 2016 2:53 AM, Cyril Mory >> >> wrote: >> >> >> Hi Vahid, >> Welcome to RTK :) >> Indeed, there are several iterative methods already implemented in >> RTK, but none of the filters allows you to easily extract the >> gradient of the least squares function there are minimizing. >> If you need to minimize the classical non-regularized tomographic >> cost function, ie || R f - p ||?, with R the forward projection >> operator, f the volume you are looking for, and p the measured >> projections, my best advice would be to copy some part of the >> pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, >> ie the following part (copy-paste this into webgraphviz.com) >> >> digraph SARTConeBeamReconstructionFilter { >> >> Input0 [ label="Input 0 (Volume)"]; >> Input0 [shape=Mdiamond]; >> Input1 [label="Input 1 (Projections)"]; >> Input1 [shape=Mdiamond]; >> >> node [shape=box]; >> ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref >> rtk::ForwardProjectionImageFilter"]; >> Extract [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref >> itk::MultiplyImageFilter"]; >> AfterExtract [label="", fixedsize="false", width=0, height=0, >> shape=none]; >> Subtract [ label="itk::SubtractImageFilter" URL="\ref >> itk::SubtractImageFilter"]; >> MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" >> URL="\ref itk::MultiplyImageFilter"]; >> Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref >> itk::DivideOrZeroOutImageFilter"]; >> GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" >> URL="\ref itk::MultiplyImageFilter", style=dashed]; >> Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref >> rtk::DisplacedDetectorImageFilter"]; >> ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref >> rtk::RayBoxIntersectionImageFilter"]; >> ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref >> rtk::BackProjectionImageFilter"]; >> OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; >> OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; >> Input0 -> OutofInput0 [arrowhead=none]; >> OutofInput0 -> ForwardProject; >> ConstantVolume -> BeforeBP [arrowhead=none]; >> BeforeBP -> BackProjection; >> Extract -> AfterExtract[arrowhead=none]; >> AfterExtract -> MultiplyByZero; >> AfterExtract -> Subtract; >> MultiplyByZero -> ForwardProject; >> Input1 -> Extract; >> ForwardProject -> Subtract; >> Subtract -> MultiplyByLambda; >> MultiplyByLambda -> Divide; >> Divide -> GatingWeight; >> GatingWeight -> Displaced; >> ConstantProjectionStack -> ExtractConstantProjection; >> ExtractConstantProjection -> RayBox; >> RayBox -> Divide; >> Displaced -> BackProjection; >> BackProjection -> OutofBP [arrowhead=none]; >> } >> >> As you can see, it is a very large part of the SART reconstruction >> filter, so yoiu might be better off just copying the whole >> SARTConeBeamReconstructionFilter and modifying it. >> >> Of course, you could also look into ITK's cost function class, and >> see if one of the classes inherited from it suits your needs, >> implement your cost function this way, and use ITK's off-the-shelf >> solvers to minimize it. See the inheritance diagram in >> https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if >> you want to try this approach. >> >> Best regards, >> Cyril >> >> On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >>> Hello RTK users and developers, >>> >>> I already implemented the RTK and reconstructed some images with the >>> FDK algorithm implemented in RTK. It works well. Thanks to RTK >>> developers. >>> Now, I am trying to develop a model-based image reconstruction for >>> our cone-beam micro-CT. I see already that some iterative algorithms >>> like ART and its modifications and conjugate-gradient (CG) method >>> are implemented in the RTK. I want to develop a model-based >>> reconstruction through the Newton/quasi-Newton optimizations >>> methods. I was wondering is it possible to extract the gradient of >>> least square function from implemented algorithms like CG module? >>> Any recommendation will be appreciated. >>> >>> Best Regards, >>> Vahid >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Fri Nov 4 16:42:08 2016 From: julien.jomier at kitware.com (Julien Jomier) Date: Fri, 4 Nov 2016 21:42:08 +0100 Subject: [Rtk-users] SimpleRTK + Matlab In-Reply-To: References: <06d4327e-9fd4-bf08-565d-5304f577b521@creatis.insa-lyon.fr> Message-ID: <89255846-9a06-a625-45f1-88d140c0013d@kitware.com> Hi Arvid, Sorry for the late reply. We successfully build the latest RTK with ITK 4.11.0 on Visual Studio 2013 with static libraries (BUILD_SHARED_LIBS set to OFF). I have just pushed a fix to SimpleRTK to build as shared libraries. Note that you would need to have ITK built as shared libraries as well. Let us know if you still have any issues, Julien On 23/09/2016 10:29, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi again. > > I've been spending some more time with this, and feel I learned a little > bit more. I have now tested this on several machines with several > compiler versions (more or less all of them) and serveral cmake versions > - all with Windows 7. > > I can actually reproduce the successful build you linked to, but this > can only be done if you do not include any of the language wrappings, > like in the build you linked to. Enable any of them, and the build will > break. (see attachment) > > I suspect it must have been working in the past, but since none of them > are included in your test there have been a breaking change, and none of > them work anymore. > > I am still trying to tweak then projects manually to build SimpleRTK > with some sort of language support, but still without any luck. > > best > > Arvid > > On Tue, Sep 20, 2016 at 4:19 PM, Simon Rit > > > wrote: > > Hi, > Sorry, I won't be able to help but I'd advise to tick on WRAP_PYTHON > only at first in cmake, not the other languages (i.e., tick off > WRAP_LUA). > I can't solve your problem but Kitware is going to look into an > upgrade of SimpleRTK in the coming days, I'll ask them if they know > what is the issue. If you look here: > http://my.cdash.org/viewNotes.php?buildid=1052065 > > this is a nightly build of SimpleRTK on Windows and it seems to > work. I don't see why it wouldn't work for you. > Simon > > On Tue, Sep 20, 2016 at 2:17 PM, Arvid Piehl Lauritsen B?ttiger > > wrote: > > Hi again. > > I understand, but could you please help me get in contact with > the person who knows something about the windows build (if any), > I think there is something wrong. > > I have been investigating the build problems I had and found > that in the sub folder "SimpleRTK-build" there is a solutions > file with SimpleRTK. I opened it up and found the projects which > I had problems building: "SimpleRTKCommon", > "SimpleRTKBasicFilters0", "SimpleRTKBasicFilters1" etc. > > When I then tried to build SimpleRTKCommon manually it just > compiled without any problems. However, when I followed up by > building "SimpleRTKBasicFilters0" it gave me an error which > stated that it couldn't find "SimpleRTKCommon-0.9.lib" - which I > just build. > > After some more investigation I realized that the > SimpleRTKCommon is set to build a dynamic linked library (DLL), > and SimpleRTKBasicFilters0 expects it to be a static linked > library (LIB). After changing SimpleRTKCommon to be build as a > static library - and changing the output location - I could > build SimpleRTKBasicFilters0. > > However, SimpleRTKBasicFilters0 is also build as an DLL, but > changing that to a LIB as well I could build > SimpleRTKBasicFilters1, then SimpleRTKBasicFilters2 and then > SimpleRTKBasicFilters3. You get the point. > > I'm unsure if the intention is to build them as static or > dynamic libraries, but in any case the current build > configuration doesn't work - on my setup at least. > > However, I should note than for some reason the "lua5" project > did build successfully out of the box. Whatever it does > differently works. > > best > > Arvid > > > > On Tue, Sep 20, 2016 at 7:33 AM, Simon Rit > > wrote: > > I'm not an msvc specialist but your first line suggests that > you have pasted only part of the log: > > 20> Done Building Project > "C:\Users\aplb\Work\RTK\RTK1.2-bin-vs13\SimpleRTK-build\ALL_BUILD.vcxproj" > (default targets) -- FAILED. > > What you need to find out is why this build failed. If the > build fails, the linking cannot work. > Cheers, > Simon > > > On 19/09/2016 19:44, Arvid Piehl Lauritsen B?ttiger wrote: >> I did a complete rebuild, and here is the end of the >> output: http://pastebin.com/hvQ33WWg >> >> I have to admit I'm not sure what to make of it. I should >> note that I'm trying to compile the version I just pulled >> from git earlier today, since the other version I normally >> work with is really old. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 6:50 PM, Simon Rit >> > > wrote: >> >> SimpleRTKCommon is a library generated when compiling. >> Don't you have another error before that which >> explains why it did not compile? >> Simon >> >> On Mon, Sep 19, 2016 at 2:30 PM, Arvid Piehl Lauritsen >> B?ttiger > > wrote: >> >> Hi again. >> >> I've been trying to get it working. However, I did >> run into some problems compiling SimpleRTK. The >> main issue seems to be that it depends on >> SimpleRTKCommon - which I do not have. >> >> Here is the last few lines from VS2013 >> >> > 5>LINK : fatal error LNK1181: cannot open input >> file '..\..\..\lib\Debug\SimpleRTKCommon-0.9.lib' >> [C:\Users\aplb\Work\RTK\RTK1.2- >> > >> bin-vs13\SimpleRTK-build\Code\IO\src\SimpleRTKIO.vcxproj] >> > 5> >> > 5> 0 Warning(s) >> > 5> 2 Error(s) >> > 5> >> > 5> Time Elapsed 00:00:25.26 >> > ========== Build: 4 succeeded, 1 failed, 0 >> up-to-date, 0 skipped ========== >> >> I'm not quite sure what is going on, because the >> only reference I can find to SimpleRTKCommon is >> the CMakeLists.txt on github: >> https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/CMakeLists.txt >> >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:19 AM, Simon Rit >> > > wrote: >> >> The latest MacOS. It's nice if you can test it >> on other platforms, I'll try to run it on >> Linux but I have to upgrade matlab first (I >> think python calls are available starting with >> Matlab 2014). >> Simon >> >> On Mon, Sep 19, 2016 at 11:14 AM, Arvid Piehl >> Lauritsen B?ttiger > > wrote: >> >> Dear Simon >> >> This look very interesting! Which platform >> did you successfully execute this on? >> I will give it a try at once (on windows) >> and let you know if I run into any problems. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:05 AM, Simon >> Rit > > >> wrote: >> >> Dear RTK users, >> I have quickly tested calling the >> SimpleRTK python lib from Matlab and >> it seems to work well: >> http://wiki.openrtk.org/index.php/SimpleRTK#Matlab >> >> Therefore, I don't think we have to >> work on Matlab wrappings but let us >> know if you think otherwise. >> Future works include a simple >> installation mechanism for >> pre-compiled SimpleRTK libraries. >> We'll keep you posted! >> Simon >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> >> >> >> >> > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From w_ettehadi at yahoo.com Mon Nov 7 16:53:54 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Mon, 7 Nov 2016 21:53:54 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Message-ID: <1477848112.17731.1478555634307@mail.yahoo.com> Thanks Cyril for your time and advises. Vahid On Friday, November 4, 2016 2:31 AM, Cyril Mory wrote: Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right? About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question: I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards, Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Philipp.Freislederer at med.uni-muenchen.de Thu Nov 17 05:08:09 2016 From: Philipp.Freislederer at med.uni-muenchen.de (Freislederer, Philipp) Date: Thu, 17 Nov 2016 10:08:09 +0000 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac Message-ID: Dear all, I currently have some issues in generating off-plane projections where I think rtk might be helpful. I am trying to generate projections from an Brainlab ExacTrac geometry. What I am getting is a projection matrix generated by the system itself. Using only this information I am able to project any voxel value in a CT onto a panel. Now, in order to speed everything up a little and not re-implement everything that has been done sufficiently already I am hoping to use 'rtkforwardprojections'. The problem is I am not able to reproduce the Brainlab geometry using 'rtksimulatedgeometry' from the projection matrix directly. I could calculate the room angle of the source to the panel from the projection matrix but I am getting weird results when applying these on something like plastimatch, so I think I have an error in there. Is there a way of creating a geometry simply from the projection matrix or do I have to work around and calculate every parameter needed specifically? Maybe someone has some experience with this type of issue. Thanks in advance! Philipp -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 17 05:27:14 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 17 Nov 2016 11:27:14 +0100 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac In-Reply-To: References: Message-ID: Hi, Yes ! I have actually added that functionality recently from Thibault Notargiacomo's code see bool rtk::ThreeDCircularProjectionGeometry::AddProjection ( const HomogeneousProjectionMatrixType & pMat) Note that the projection matrix must be for a 3D position in mm to a 2D position in mm. You can add pre-/post-matrices to go from mm to voxel. There is no command line tool to do it but you can easily create your command line tool to do it. This is tested in testing/rtkgeometryfrommatrixtest.cxx. Let me know if you need more info, Simon On Thu, Nov 17, 2016 at 11:08 AM, Freislederer, Philipp < Philipp.Freislederer at med.uni-muenchen.de> wrote: > Dear all, > > > > I currently have some issues in generating off-plane projections where I > think rtk might be helpful. > > I am trying to generate projections from an Brainlab ExacTrac geometry. > > What I am getting is a projection matrix generated by the system itself. > Using only this information I am able to project any voxel value in a CT > onto a panel. > > Now, in order to speed everything up a little and not re-implement > everything that has been done sufficiently already I am hoping to use > ?rtkforwardprojections?. > > The problem is I am not able to reproduce the Brainlab geometry using > ?rtksimulatedgeometry? from the projection matrix directly. > > I could calculate the room angle of the source to the panel from the > projection matrix but I am getting weird results when applying these on > something like plastimatch, so I think I have an error in there. > > > > Is there a way of creating a geometry simply from the projection matrix or > do I have to work around and calculate every parameter needed specifically? > > Maybe someone has some experience with this type of issue. > > > > Thanks in advance! > > > > Philipp > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Sat Nov 19 14:51:24 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Sat, 19 Nov 2016 19:51:24 +0000 Subject: [Rtk-users] Geometric calibration Message-ID: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ From simon.rit at creatis.insa-lyon.fr Tue Nov 22 02:01:19 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 22 Nov 2016 08:01:19 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: Message-ID: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper ). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > Hi RTK users, > > I'm interested in reconstructing images acquired by a fluoroscopy system > rotating around a knee phantom. Unfortunately, I've been unsuccessful so > far. I recognize some of the phantom in the reconstructed image, but it > contains double contours and the shape is deformed. > > I think the issue might be incorrect geometry specification. I have images > also including a phantom containing markers for which we know the > coordinates, which should allow us to calibrate the system. On the wiki on > image quality, I saw that some users had developed scripts to do the > calibration? Would someone be willing to share it? > > Kind regards, > Sepp > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: after.pdf Type: application/pdf Size: 5974 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: before.pdf Type: application/pdf Size: 5678 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: calib.py Type: text/x-python Size: 2488 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 23 12:44:11 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 23 Nov 2016 18:44:11 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Andreas, Today we had the RTK training and some users were looking for a XIM file reader. I pointed to your contributions but any chance to have it put in RTK soon? Thanks in advance, Simon On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit wrote: > Hi, > Thanks for sharing. There still seems to be some streak artefacts, do you > see the same in the Varian reconstruction? > I'm looking forward to the pull-request, I think we should try to make the > bzip2 optional. > Simon > > On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < > andreasg at phys.au.dk> wrote: > >> Thanks for the fast response Simon! >> >> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >> right all along! >> I just didn't get why it makes a difference. I think I do now, as the >> resulting image was flipped upside down and not left/right as I expected. >> [attached] >> >> The reconstruction is significantly better, I'll look into what should be >> included in the reader and what I should keep in my program to keep >> conformity with the other readers. Then I'll create a pull request. >> >> Just for the purpose of others hitting the same or a similar bug, I also >> attempted: >> I did the SART reconstruction with 10 iterations, lambda=0.3, and Joseph >> back/forward projection, *but with no* significant improvement [attached] >> >> And: >> If you want you can download the data set from: [Dropbox link to 460MB >> zip (I'll >> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >> is used along with the Scan.xml (Calibrations folder may be used in the >> future in my program, but I'm not sure if you can rely on the existence of >> the content). >> >> A MatLab XimReader is available: link >> (also >> available from Varian bitbucket along a with a python version and a >> C#->matlab plugin >> ). >> Otherwise my fork with the RTK-style reader is available from the same >> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >> so bzip2 is a new dependancy). >> >> Best regards >> Andreas >> >> >> __________________________________ >> >> Andreas Gravgaard Andersen >> >> Department of Oncology, >> >> Aarhus University Hospital >> >> N?rrebrogade 44, >> >> 8000, Aarhus C >> >> Mail: andreasg at phys.au.dk >> >> Cell: +45 3165 8140 >> >> >> >> 2016-09-16 16:13 GMT+02:00 Simon Rit : >> >>> Hi, >>> You can try any iterative reconstruction, they can also handle short >>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>> However, the nature of the artifacts indicate more a problem in the >>> geometry in my opinion. I have seen such errors when, for example, rotating >>> in the wrong direction. I can have a look if you share the dataset. >>> Cheers, >>> Simon >>> >>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>> andreasg at phys.au.dk> wrote: >>> >>>> Thanks for the suggestions, Simon and Cyril! >>>> >>>> I have been carefully looking though the geometry and from what I >>>> understand of the transformations matrices, the geometry looks correct/(as >>>> expected). >>>> >>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>> were because had used half-fan scans (full-arc). >>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>> artifacts occurs! >>>> >>>> Are there other (built-in) means of improving half-arc scans, than the >>>> parker short scan filter? >>>> >>>> Parker short scan does a decent job, but the result is still far from >>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>> >>>> Best regards >>>> Andreas >>>> >>>> >>>> __________________________________ >>>> >>>> Andreas Gravgaard Andersen >>>> >>>> Department of Oncology, >>>> >>>> Aarhus University Hospital >>>> >>>> N?rrebrogade 44, >>>> >>>> 8000, Aarhus C >>>> >>>> Mail: andreasg at phys.au.dk >>>> >>>> Cell: +45 3165 8140 >>>> >>>> >>>> >>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory : >>>> >>>>> One suggestion since it works with the Hnd projections: >>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>> Xim projections) and output two projection stack files and two geometry >>>>> files, then compare the projection stack files by subtracting one to the >>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>> are identical, then I do not see any reason why the reconstructions should >>>>> be different, so my guess is that you will find differences. >>>>> >>>>> >>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>> >>>>>> Hi, >>>>>> I have almost never worked with Varian data but it looks like a >>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>> projections which results in assigning a bad geometry to each >>>>>> projection. How did you name your projections? Maybe check that the >>>>>> order matches that of the RTK geometry file. Otherwise, there might be >>>>>> an issue in the creation of the geometry file itself. >>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>> code when you feel it's ready. >>>>>> Simon >>>>>> >>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>> wrote: >>>>>> >>>>>>> Dear RTK experts, >>>>>>> >>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>> format. I >>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>> available with RTK. >>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>> >>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>> in UI), >>>>>>> however when reconstructing with a regular FDK I get a reconstructed >>>>>>> image >>>>>>> that is smeared out around the high and low density areas [see >>>>>>> attached >>>>>>> image] >>>>>>> >>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>> Scripps >>>>>>> (~520 projections). Fixed detector and source (offset=0) with SID=2m, >>>>>>> SDD=3m. >>>>>>> >>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>> algorithm). >>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>> software works >>>>>>> perfectly. >>>>>>> >>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>> creates >>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>> If the first few projections are excluded, the following projection >>>>>>> will act >>>>>>> the same way. >>>>>>> >>>>>>> The projections are corrected for beam hardening and all the >>>>>>> projections >>>>>>> have the expected attenuation. >>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>> reconstruction >>>>>>> makes the same artifacts. >>>>>>> >>>>>>> Setting the value of the first and last projection to zero has the >>>>>>> same >>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>> not the >>>>>>> artifacts. >>>>>>> >>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>> >>>>>>> Best regards >>>>>>> Andreas >>>>>>> >>>>>>> __________________________________ >>>>>>> >>>>>>> Andreas Gravgaard Andersen >>>>>>> >>>>>>> Department of Oncology, >>>>>>> >>>>>>> Aarhus University Hospital >>>>>>> >>>>>>> N?rrebrogade 44, >>>>>>> >>>>>>> 8000, Aarhus C >>>>>>> >>>>>>> Mail: andreasg at phys.au.dk >>>>>>> >>>>>>> Cell: +45 3165 8140 >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Thu Nov 24 01:34:58 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Thu, 24 Nov 2016 06:34:58 +0000 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: , Message-ID: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Hi Simon, Thanks for the script. I was wondering if you could also share the csv or a dummy file? I'm unsure of what the second column contains. An offset distance to the rotation axis? Or the height? Which distance was known in your example? From the code it looks like the distance to the rotation axis? Sepp On 22 Nov 2016, at 08.01, Simon Rit > wrote: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt > wrote: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 24 01:44:42 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 24 Nov 2016 07:44:42 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> References: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Message-ID: Hi, Enclosed. Column 1 is platform angle, 2 is bb height, 3 is the u coordinate (in pixel) and 4 is the v coordinate (in pixel too). I had approximately measured the source-to-detector (270) and source-to-isocenter (210) distances but they were still optimized to have a better assessment. Simon On Thu, Nov 24, 2016 at 7:34 AM, Sepp de Raedt wrote: > Hi Simon, > > Thanks for the script. I was wondering if you could also share the csv or > a dummy file? I'm unsure of what the second column contains. An offset > distance to the rotation axis? Or the height? > > Which distance was known in your example? From the code it looks like the > distance to the rotation axis? > > Sepp > > On 22 Nov 2016, at 08.01, Simon Rit > wrote: > > Hi Sepp, > I did do a calibration script on a micro CT platform. The idea was that I > had a bb taken from 4 different view points at 4 different heights with a > known distance. Their projected position was segmented beforehand on the > projections and I tried to match the projections by optimizing the > calibration (which we see in before.pdf and after.pdf). I don't think it's > a good script, e.g., because I tried to find 8 parameters when 7 are > sufficient for my system (see, e.g., this paper > ). > But this gives you a starting point to develop your own script which will > hopefully be better. Please share if you do something from it! > Thanks, > Simon > > On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > >> Hi RTK users, >> >> I'm interested in reconstructing images acquired by a fluoroscopy system >> rotating around a knee phantom. Unfortunately, I've been unsuccessful so >> far. I recognize some of the phantom in the reconstructed image, but it >> contains double contours and the shape is deformed. >> >> I think the issue might be incorrect geometry specification. I have >> images also including a phantom containing markers for which we know the >> coordinates, which should allow us to calibrate the system. On the wiki on >> image quality, I saw that some users had developed scripts to do the >> calibration? Would someone be willing to share it? >> >> Kind regards, >> Sepp >> >> ______________________________________________________________________ >> This email has been scanned by the Symantec Email Security.cloud service. >> For more information please visit http://www.symanteccloud.com >> ______________________________________________________________________ >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > > > > > > > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CentroidPositions_H5_to_H25_90degstep.csv Type: text/csv Size: 321 bytes Desc: not available URL: From andreasg at phys.au.dk Fri Nov 25 10:25:55 2016 From: andreasg at phys.au.dk (Andreas Gravgaard Andersen) Date: Fri, 25 Nov 2016 16:25:55 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Simon, I have created a pull-request with the XIM file reader. I'm sorry for being late with the promised pull-request (there were a lot of merge conflicts, so it got postponed). I have cleaned it up, but it is still not flawless as mentioned in the pull-request-message. I have tried to keep the RTK coding-style by creating it as a modified HND file reader, but I have only a year of experience with C++, so I apologize if I've left some ugly code in there.. Best regards Andreas __________________________________ Andreas Gravgaard Andersen Department of Oncology, Aarhus University Hospital N?rrebrogade 44, 8000, Aarhus C Mail: andreasg at phys.au.dk Cell: +45 3165 8140 2016-11-23 18:44 GMT+01:00 Simon Rit : > Dear Andreas, > Today we had the RTK training and some users were looking for a XIM file > reader. I pointed to your contributions but any chance to have it put in > RTK soon? > Thanks in advance, > Simon > > On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit > wrote: > >> Hi, >> Thanks for sharing. There still seems to be some streak artefacts, do you >> see the same in the Varian reconstruction? >> I'm looking forward to the pull-request, I think we should try to make >> the bzip2 optional. >> Simon >> >> On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < >> andreasg at phys.au.dk> wrote: >> >>> Thanks for the fast response Simon! >>> >>> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >>> right all along! >>> I just didn't get why it makes a difference. I think I do now, as the >>> resulting image was flipped upside down and not left/right as I expected. >>> [attached] >>> >>> The reconstruction is significantly better, I'll look into what should >>> be included in the reader and what I should keep in my program to keep >>> conformity with the other readers. Then I'll create a pull request. >>> >>> Just for the purpose of others hitting the same or a similar bug, I also >>> attempted: >>> I did the SART reconstruction with 10 iterations, lambda=0.3, and >>> Joseph back/forward projection, *but with no* significant improvement >>> [attached] >>> >>> And: >>> If you want you can download the data set from: [Dropbox link to 460MB >>> zip (I'll >>> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >>> is used along with the Scan.xml (Calibrations folder may be used in the >>> future in my program, but I'm not sure if you can rely on the existence of >>> the content). >>> >>> A MatLab XimReader is available: link >>> (also >>> available from Varian bitbucket along a with a python version and a >>> C#->matlab plugin >>> ). >>> Otherwise my fork with the RTK-style reader is available from the same >>> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >>> so bzip2 is a new dependancy). >>> >>> Best regards >>> Andreas >>> >>> >>> __________________________________ >>> >>> Andreas Gravgaard Andersen >>> >>> Department of Oncology, >>> >>> Aarhus University Hospital >>> >>> N?rrebrogade 44, >>> >>> 8000, Aarhus C >>> >>> Mail: andreasg at phys.au.dk >>> >>> Cell: +45 3165 8140 >>> >>> >>> >>> 2016-09-16 16:13 GMT+02:00 Simon Rit : >>> >>>> Hi, >>>> You can try any iterative reconstruction, they can also handle short >>>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>>> However, the nature of the artifacts indicate more a problem in the >>>> geometry in my opinion. I have seen such errors when, for example, rotating >>>> in the wrong direction. I can have a look if you share the dataset. >>>> Cheers, >>>> Simon >>>> >>>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>>> andreasg at phys.au.dk> wrote: >>>> >>>>> Thanks for the suggestions, Simon and Cyril! >>>>> >>>>> I have been carefully looking though the geometry and from what I >>>>> understand of the transformations matrices, the geometry looks correct/(as >>>>> expected). >>>>> >>>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>>> were because had used half-fan scans (full-arc). >>>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>>> artifacts occurs! >>>>> >>>>> Are there other (built-in) means of improving half-arc scans, than the >>>>> parker short scan filter? >>>>> >>>>> Parker short scan does a decent job, but the result is still far from >>>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>>> >>>>> Best regards >>>>> Andreas >>>>> >>>>> >>>>> __________________________________ >>>>> >>>>> Andreas Gravgaard Andersen >>>>> >>>>> Department of Oncology, >>>>> >>>>> Aarhus University Hospital >>>>> >>>>> N?rrebrogade 44, >>>>> >>>>> 8000, Aarhus C >>>>> >>>>> Mail: andreasg at phys.au.dk >>>>> >>>>> Cell: +45 3165 8140 >>>>> >>>>> >>>>> >>>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory >>>>> : >>>>> >>>>>> One suggestion since it works with the Hnd projections: >>>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>>> Xim projections) and output two projection stack files and two geometry >>>>>> files, then compare the projection stack files by subtracting one to the >>>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>>> are identical, then I do not see any reason why the reconstructions should >>>>>> be different, so my guess is that you will find differences. >>>>>> >>>>>> >>>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>>> >>>>>>> Hi, >>>>>>> I have almost never worked with Varian data but it looks like a >>>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>>> projections which results in assigning a bad geometry to each >>>>>>> projection. How did you name your projections? Maybe check that the >>>>>>> order matches that of the RTK geometry file. Otherwise, there might >>>>>>> be >>>>>>> an issue in the creation of the geometry file itself. >>>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>>> code when you feel it's ready. >>>>>>> Simon >>>>>>> >>>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>>> wrote: >>>>>>> >>>>>>>> Dear RTK experts, >>>>>>>> >>>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>>> format. I >>>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>>> available with RTK. >>>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>>> >>>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>>> in UI), >>>>>>>> however when reconstructing with a regular FDK I get a >>>>>>>> reconstructed image >>>>>>>> that is smeared out around the high and low density areas [see >>>>>>>> attached >>>>>>>> image] >>>>>>>> >>>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>>> Scripps >>>>>>>> (~520 projections). Fixed detector and source (offset=0) with >>>>>>>> SID=2m, >>>>>>>> SDD=3m. >>>>>>>> >>>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>>> algorithm). >>>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>>> software works >>>>>>>> perfectly. >>>>>>>> >>>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>>> creates >>>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>>> If the first few projections are excluded, the following projection >>>>>>>> will act >>>>>>>> the same way. >>>>>>>> >>>>>>>> The projections are corrected for beam hardening and all the >>>>>>>> projections >>>>>>>> have the expected attenuation. >>>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>>> reconstruction >>>>>>>> makes the same artifacts. >>>>>>>> >>>>>>>> Setting the value of the first and last projection to zero has the >>>>>>>> same >>>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>>> not the >>>>>>>> artifacts. >>>>>>>> >>>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>>> >>>>>>>> Best regards >>>>>>>> Andreas >>>>>>>> >>>>>>>> __________________________________ >>>>>>>> >>>>>>>> Andreas Gravgaard Andersen >>>>>>>> >>>>>>>> Department of Oncology, >>>>>>>> >>>>>>>> Aarhus University Hospital >>>>>>>> >>>>>>>> N?rrebrogade 44, >>>>>>>> >>>>>>>> 8000, Aarhus C >>>>>>>> >>>>>>>> Mail: andreasg at phys.au.dk >>>>>>>> >>>>>>>> Cell: +45 3165 8140 >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rtk-users mailing list >>>>>>>> Rtk-users at public.kitware.com >>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From w_ettehadi at yahoo.com Tue Nov 1 12:50:12 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Tue, 1 Nov 2016 16:50:12 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> Message-ID: <1400014065.1872614.1478019012480@mail.yahoo.com> Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards,Vahid -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 02:53:39 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 07:53:39 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1400014065.1872614.1478019012480@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> Message-ID: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: > Hello RTK users and developers, > > I already implemented the RTK and reconstructed some images with the > FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. > Now, I am trying to develop a model-based image reconstruction for our > cone-beam micro-CT. I see already that some iterative algorithms like > ART and its modifications and conjugate-gradient (CG) method are > implemented in the RTK. I want to develop a model-based reconstruction > through the Newton/quasi-Newton optimizations methods. I was wondering > is it possible to extract the gradient of least square function from > implemented algorithms like CG module? Any recommendation will be > appreciated. > > Best Regards, > Vahid > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Wed Nov 2 04:01:30 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 08:01:30 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have tried but I am not getting where to give --division 4 in my code. Please find my code given below and please let me know where I need to change in my code to make it work. int _tmain(int argc, _TCHAR* argv[]) { #pragma region "Variable declaration" const double PI = 3.14159265358979323846; float *angles; int nProj = 349; typedef unsigned short pixelType; typedef float OutpixelType; const int dimension = 3; typedef itk::Image imageType; typedef itk::ImageRegionConstIterator ImageIteratorType; imageType::Pointer Projections = imageType::New(); #pragma endregion "Variable declaration" Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); imageType::SpacingType pSpacing; pSpacing[0] = 0.2960; pSpacing[1] = 0.2960; pSpacing[2] = 0.2960; Projections->SetSpacing(pSpacing); imageType::PointType pOrigin; pOrigin[0] = -212.972; pOrigin[1] = -212.972; pOrigin[2] = -212.972; //-158.50; Projections->SetOrigin(pOrigin); Projections->Update(); //Read angles. char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; angles = new float[nProj]; angles = readAngles(angles_file, angles); #pragma region"Geometry" // Geometry object typedef rtk::ThreeDCircularProjectionGeometry GeometryType; GeometryType::Pointer geometry = GeometryType::New(); for (unsigned int noProj = 0; noProj < nProj; noProj++) { geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // } typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); geometryWriter->SetFilename("D:\\geo.xml"); geometryWriter->SetObject(geometry); geometryWriter->WriteFile(); geometry->Update(); #pragma endregion "Geometry" //Define output image type #ifdef USE_CUDA typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; #else typedef itk::Image OutPutImageType; typedef rtk::ParkerShortScanImageFilter PSSFType; typedef rtk::FDKConeBeamReconstructionFilter FDKType; #endif //ScatterCorrection typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); ScatterCorrection->SetInput(Projections); //VarianObiRawImageFilter typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); //Create the output image typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; ConstantImageSourceType::PointType origin_p; ConstantImageSourceType::SizeType size_p; ConstantImageSourceType::SpacingType spacing_p; ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); origin_p[0] = -127.5; origin_p[1] = -127.5; origin_p[2] = -127.5; size_p[0] = 512; size_p[1] = 512; size_p[2] = 512; spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); projectionsSource->SetOrigin(origin_p); projectionsSource->SetSpacing(spacing_p); projectionsSource->SetSize(size_p); projectionsSource->SetConstant(0); // Short scan image filter PSSFType::Pointer pssf = PSSFType::New(); pssf->SetInput(AttenuationFilter->GetOutput()); pssf->SetGeometry(geometry); pssf->InPlaceOff(); std::cout << "short scan image filter success" << std::endl; FDKType::Pointer feldkamp = FDKType::New(); feldkamp->SetInput(0, projectionsSource->GetOutput()); feldkamp->SetInput(1, pssf->GetOutput()); feldkamp->SetGeometry(geometry); feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); feldkamp->GetRampFilter()->SetHammingFrequency(5.0); feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); feldkamp->SetGPUEnabled(1); feldkamp->SetNumberOfThreads(10000); #pragma region "Write volume" //Create a raw io for writing itk::RawImageIO::Pointer io; io = itk::RawImageIO::New(); for (unsigned int i = 0; i < dimension; i++) { io->SetDimensions(i, size_p[i]); io->SetSpacing(i, spacing_p[i]); io->SetOrigin(i, origin_p[i]); } io->SetHeaderSize(0); io->SetByteOrderToLittleEndian(); io->SetPixelType(itk::ImageIOBase::SCALAR); io->SetNumberOfComponents(1); io->SetNumberOfDimensions(3); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(feldkamp->GetOutput()); try { writer->Update(); } catch (itk::ExceptionObject & excp) { std::cerr << "Error while writing the image " << std::endl; std::cerr << excp << std::endl; getchar(); } #pragma endregion "WriteVolume" delete[] angles; return 0; } Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > I was able to perform a reconstruction from your header and geometry > file, using the following command lines: > > rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > --phantomscale "128,128,128" --like Output.mhd > > rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > The first computes projections through a Shepp & Logan phantom, with the > same size, spacing, origin, etc... as your projections, using your > geometry file geo.xml. > > The second line performs the FDK reconstruction. I had to use both the > "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > on a Geforce GTX 780). "--lowmem" loads the projections into memory by > subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > parts, reconstructs them one by one, then assembles the results. Can you > run the same commands and let us know whether you still encounter the > crash you mentioned ? If it works, you can use your own projection data > in the second command line instead of "simulatedprojections.mha". > > Best, > > Cyril > > On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > > Dear Sir, > > > > Please find the Header file in the attachment. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> We do not need the projections file, at least not for a first stage of > >> error tracking. We only need the header. > >> Try the following command line: > >> > >> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >> > >> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >> what we need, and it is a very light text file. The "proj.raw" contains > >> the pixel values, but at the moment we do not need them. We will create > >> our own proj.raw file, filled with zeros, which should be enough to > >> track down the error you encounter. > >> > >> Looking forward to receiving your file, > >> Cyril > >> > >> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>> Dear Sir, > >>> > >>> The single raw file of the projections is 1.4 GB and we are > not > >> able to send this big file to you. Can you please suggest other > alternatives > >> for this? > >>> Or can you provide us the PC configuration to solve the > issue? > >>> > >>> Let me know if any other clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Hello Zahid, > >>>> > >>>> We will need the header of your projections file, too (It is best if > you > >>>> have all your projections as a single .mhd and a single .raw file, so > it > >>>> should be 3-D image, and you send only the .mhd file). > >>>> > >>>> Regards, > >>>> Cyril > >>>> > >>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> > >>>>> I have only used RTK version 1.3.0. but in the error > >>>> message it is showing RTK version 1.2.0. > >>>>> Please find the attachment of the geometry file of > our > >>>> projections. > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> Without some more information, it's unlikely that we find the source > of > >>>>>> the problem. Here are a few things you can do to help us (and > therefore > >>>>>> yourself): > >>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > the > >>>>>> Cuda forward and back projection filters since v1.2.0, so your > problem > >>>>>> might disappear just by upgrading to the new version > >>>>>> - create a small example that reproduces your problem. You can, for > >>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>> example). And send us the script > >>>>>> - OR send us your geometry file and the header of your projections > file > >>>>>> (no need to send the projection data itself, we'll create a > zero-filled > >>>>>> stack of projections), and the command line that crashes > >>>>>> > >>>>>> Best regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Simon Rit, > >>>>>>> > >>>>>>> Please find the screen shot in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> Senior Design Engineer > >>>>>>> Mobile No. +91-9738379729 > >>>>>>> > >>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>> http://www.panaceamedical.com > >>>>>>> Bangalore - India. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>> Cc: rtk-users at public.kitware.com > >> [mailto:rtk-users at public.kitware.com], > >>>>>> saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>> memory > >>>>>>>> error. If you use the command line tool rtkfdk, you should first > make > >>>>>> sure > >>>>>>>> that you use the --lowmem option to stream the projection images. > If > >> it > >>>>>> is > >>>>>>>> no sufficient, you can split your volume using the --divisions. The > >>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of > >> RTK > >>>> on > >>>>>>>> our case studies webpage > >>>>>> . > >>>>>>>> Simon > >>>>>>>> > >>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>> > >>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>> > >>>>>>>>>> I am unable to do 1024x1024x1024 > reconstruction > >>>> using > >>>>>> RTK > >>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > shoot > >> of > >>>>>>>>> the > >>>>>>>>>> same. > >>>>>>>>>> > >>>>>>>>>> I am using the following items given below. > >>>>>>>>>> > >>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >> application > >>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>> 5. CUDA 7. > >>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>> > >>>>>>>>>> Please provide the solution of this and let me > >> know > >>>> if > >>>>>>>> any > >>>>>>>>>> other clarification is required. > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> Thanks & Regards > >>>>>>>>>> > >>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>> Senior Design Engineer > >>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>> > >>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>> Bangalore - India. > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> ____________________________________________________________ > >>>>>>>>> ________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> Rtk-users mailing list > >>>>>>> Rtk-users at public.kitware.com > >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 04:33:32 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 09:33:32 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> References: <20161102080130.3379a492@PMT-SER-2.panaceamedical.com> Message-ID: <398170fb-a69e-9781-73d5-2a419542d06d@creatis.insa-lyon.fr> Dear Zahid, The --divisions is an option of the command-line application rtkfdk. It is not directly an option of the FDKConeBeamReconstructionFilter : rather, it is passed to a streaming filter at the end of the pipeline. Look for the following bit of code in rtkfdk.cxx : // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput( pfeldkamp ); streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); You can find information on how a streaming filter works on this page: https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html I hope it helps, Cyril On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have tried but I am not getting where to give --division 4 in my code. > > > Please find my code given below and please let me know where I need to change in my code to make it work. > > > int _tmain(int argc, _TCHAR* argv[]) > { > #pragma region "Variable declaration" > const double PI = 3.14159265358979323846; > float *angles; > int nProj = 349; > typedef unsigned short pixelType; > typedef float OutpixelType; > const int dimension = 3; > typedef itk::Image imageType; > typedef itk::ImageRegionConstIterator ImageIteratorType; > imageType::Pointer Projections = imageType::New(); > > #pragma endregion "Variable declaration" > > Projections = ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > imageType::SpacingType pSpacing; > pSpacing[0] = 0.2960; > pSpacing[1] = 0.2960; > pSpacing[2] = 0.2960; > Projections->SetSpacing(pSpacing); > > imageType::PointType pOrigin; > pOrigin[0] = -212.972; > pOrigin[1] = -212.972; > pOrigin[2] = -212.972; //-158.50; > Projections->SetOrigin(pOrigin); > > Projections->Update(); > > //Read angles. > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > angles = new float[nProj]; > angles = readAngles(angles_file, angles); > > #pragma region"Geometry" > // Geometry object > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > GeometryType::Pointer geometry = GeometryType::New(); > for (unsigned int noProj = 0; noProj < nProj; noProj++) > { > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); // 136 half fan //2.07 Kidwai // > } > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter GeometryWriterType; > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > geometryWriter->SetFilename("D:\\geo.xml"); > geometryWriter->SetObject(geometry); > geometryWriter->WriteFile(); > geometry->Update(); > #pragma endregion "Geometry" > > //Define output image type > > #ifdef USE_CUDA > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > #else > typedef itk::Image OutPutImageType; > typedef rtk::ParkerShortScanImageFilter PSSFType; > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > #endif > > //ScatterCorrection > typedef rtk::BoellaardScatterCorrectionImageFilter BoellaardScatterCorrectionImageFilterType; > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = BoellaardScatterCorrectionImageFilterType::New(); > ScatterCorrection->SetInput(Projections); > > //VarianObiRawImageFilter > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > RawImageFilterType; > RawImageFilterType::Pointer AttenuationFilter = RawImageFilterType::New(); > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > //Create the output image > typedef rtk::ConstantImageSource< OutPutImageType > ConstantImageSourceType; > ConstantImageSourceType::PointType origin_p; > ConstantImageSourceType::SizeType size_p; > ConstantImageSourceType::SpacingType spacing_p; > ConstantImageSourceType::Pointer projectionsSource = ConstantImageSourceType::New(); > origin_p[0] = -127.5; > origin_p[1] = -127.5; > origin_p[2] = -127.5; > size_p[0] = 512; > size_p[1] = 512; > size_p[2] = 512; > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > projectionsSource->SetOrigin(origin_p); > projectionsSource->SetSpacing(spacing_p); > projectionsSource->SetSize(size_p); > projectionsSource->SetConstant(0); > > // Short scan image filter > PSSFType::Pointer pssf = PSSFType::New(); > pssf->SetInput(AttenuationFilter->GetOutput()); > pssf->SetGeometry(geometry); > pssf->InPlaceOff(); > std::cout << "short scan image filter success" << std::endl; > > FDKType::Pointer feldkamp = FDKType::New(); > feldkamp->SetInput(0, projectionsSource->GetOutput()); > feldkamp->SetInput(1, pssf->GetOutput()); > feldkamp->SetGeometry(geometry); > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > feldkamp->SetGPUEnabled(1); > feldkamp->SetNumberOfThreads(10000); > > #pragma region "Write volume" > > //Create a raw io for writing > > itk::RawImageIO::Pointer io; > io = itk::RawImageIO::New(); > > for (unsigned int i = 0; i < dimension; i++) > { > io->SetDimensions(i, size_p[i]); > io->SetSpacing(i, spacing_p[i]); > io->SetOrigin(i, origin_p[i]); > } > io->SetHeaderSize(0); > io->SetByteOrderToLittleEndian(); > io->SetPixelType(itk::ImageIOBase::SCALAR); > io->SetNumberOfComponents(1); > io->SetNumberOfDimensions(3); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(feldkamp->GetOutput()); > > try > { > writer->Update(); > } > catch (itk::ExceptionObject & excp) > { > std::cerr << "Error while writing the image " << std::endl; > std::cerr << excp << std::endl; > getchar(); > } > #pragma endregion "WriteVolume" > delete[] angles; > return 0; > } > > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> I was able to perform a reconstruction from your header and geometry >> file, using the following command lines: >> >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> --phantomscale "128,128,128" --like Output.mhd >> >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> >> The first computes projections through a Shepp & Logan phantom, with the >> same size, spacing, origin, etc... as your projections, using your >> geometry file geo.xml. >> >> The second line performs the FDK reconstruction. I had to use both the >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> parts, reconstructs them one by one, then assembles the results. Can you >> run the same commands and let us know whether you still encounter the >> crash you mentioned ? If it works, you can use your own projection data >> in the second command line instead of "simulatedprojections.mha". >> >> Best, >> >> Cyril >> >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> >>> Dear Sir, >>> >>> Please find the Header file in the attachment. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> We do not need the projections file, at least not for a first stage of >>>> error tracking. We only need the header. >>>> Try the following command line: >>>> >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>> >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>> what we need, and it is a very light text file. The "proj.raw" contains >>>> the pixel values, but at the moment we do not need them. We will create >>>> our own proj.raw file, filled with zeros, which should be enough to >>>> track down the error you encounter. >>>> >>>> Looking forward to receiving your file, >>>> Cyril >>>> >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>> Dear Sir, >>>>> >>>>> The single raw file of the projections is 1.4 GB and we are >> not >>>> able to send this big file to you. Can you please suggest other >> alternatives >>>> for this? >>>>> Or can you provide us the PC configuration to solve the >> issue? >>>>> Let me know if any other clarification is required. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Hello Zahid, >>>>>> >>>>>> We will need the header of your projections file, too (It is best if >> you >>>>>> have all your projections as a single .mhd and a single .raw file, so >> it >>>>>> should be 3-D image, and you send only the .mhd file). >>>>>> >>>>>> Regards, >>>>>> Cyril >>>>>> >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>> Dear Cyril Mory, >>>>>>> >>>>>>> >>>>>>> I have only used RTK version 1.3.0. but in the error >>>>>> message it is showing RTK version 1.2.0. >>>>>>> Please find the attachment of the geometry file of >> our >>>>>> projections. >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> Without some more information, it's unlikely that we find the source >> of >>>>>>>> the problem. Here are a few things you can do to help us (and >> therefore >>>>>>>> yourself): >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >> the >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >> problem >>>>>>>> might disappear just by upgrading to the new version >>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>> example). And send us the script >>>>>>>> - OR send us your geometry file and the header of your projections >> file >>>>>>>> (no need to send the projection data itself, we'll create a >> zero-filled >>>>>>>> stack of projections), and the command line that crashes >>>>>>>> >>>>>>>> Best regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Simon Rit, >>>>>>>>> >>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> Senior Design Engineer >>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>> >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>> http://www.panaceamedical.com >>>>>>>>> Bangalore - India. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>> Cc: rtk-users at public.kitware.com >>>> [mailto:rtk-users at public.kitware.com], >>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>> memory >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >> make >>>>>>>> sure >>>>>>>>>> that you use the --lowmem option to stream the projection images. >> If >>>> it >>>>>>>> is >>>>>>>>>> no sufficient, you can split your volume using the --divisions. The >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use of >>>> RTK >>>>>> on >>>>>>>>>> our case studies webpage >>>>>>>> . >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>> >>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>> >>>>>>>>>>>> I am unable to do 1024x1024x1024 >> reconstruction >>>>>> using >>>>>>>> RTK >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >> shoot >>>> of >>>>>>>>>>> the >>>>>>>>>>>> same. >>>>>>>>>>>> >>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>> >>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>> application >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>> >>>>>>>>>>>> Please provide the solution of this and let me >>>> know >>>>>> if >>>>>>>>>> any >>>>>>>>>>>> other clarification is required. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>> >>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>> >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>> Bangalore - India. >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>> ________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rtk-users mailing list >>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 06:57:15 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 10:57:15 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. Please check my modified file writer code given below. // Streaming depending on streaming capability of writer typedef itk::StreamingImageFilter StreamerType; StreamerType::Pointer streamerBP = StreamerType::New(); streamerBP->SetInput(feldkamp->GetOutput()); streamerBP->SetNumberOfStreamDivisions(4); //create a writer and write reconstructed file itk::ImageFileWriter::Pointer writer; writer = itk::ImageFileWriter::New(); writer->SetFileName("D:\\Output.raw"); writer->SetImageIO(io); writer->SetInput(streamerBP->GetOutput()); writer->SetNumberOfStreamDivisions(4); Please let me know if any clarification is required. Thanks & Regards Zahid Hasan Ansari Senior Design Engineer Mobile No. +91-9738379729 Panacea Medical Technologies Pvt. Ltd. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com Bangalore - India. ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The --divisions is an option of the command-line application rtkfdk. It > is not directly an option of the FDKConeBeamReconstructionFilter : > rather, it is passed to a streaming filter at the end of the pipeline. > Look for the following bit of code in rtkfdk.cxx : > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter CPUOutputImageType> StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput( pfeldkamp ); > streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > > You can find information on how a streaming filter works on this page: > > https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > I hope it helps, > > Cyril > > On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have tried but I am not getting where to give > --division 4 in my code. > > > > > > Please find my code given below and please let me know > where I need to change in my code to make it work. > > > > > > int _tmain(int argc, _TCHAR* argv[]) > > { > > #pragma region "Variable declaration" > > const double PI = 3.14159265358979323846; > > float *angles; > > int nProj = 349; > > typedef unsigned short pixelType; > > typedef float OutpixelType; > > const int dimension = 3; > > typedef itk::Image imageType; > > typedef itk::ImageRegionConstIterator ImageIteratorType; > > imageType::Pointer Projections = imageType::New(); > > > > #pragma endregion "Variable declaration" > > > > Projections = > ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); > > imageType::SpacingType pSpacing; > > pSpacing[0] = 0.2960; > > pSpacing[1] = 0.2960; > > pSpacing[2] = 0.2960; > > Projections->SetSpacing(pSpacing); > > > > imageType::PointType pOrigin; > > pOrigin[0] = -212.972; > > pOrigin[1] = -212.972; > > pOrigin[2] = -212.972; //-158.50; > > Projections->SetOrigin(pOrigin); > > > > Projections->Update(); > > > > //Read angles. > > char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > angles = new float[nProj]; > > angles = readAngles(angles_file, angles); > > > > #pragma region"Geometry" > > // Geometry object > > typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > GeometryType::Pointer geometry = GeometryType::New(); > > for (unsigned int noProj = 0; noProj < nProj; noProj++) > > { > > geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); > // 136 half fan //2.07 Kidwai // > > } > > > > typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > GeometryWriterType; > > GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > > geometryWriter->SetFilename("D:\\geo.xml"); > > geometryWriter->SetObject(geometry); > > geometryWriter->WriteFile(); > > geometry->Update(); > > #pragma endregion "Geometry" > > > > //Define output image type > > > > #ifdef USE_CUDA > > typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > > typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > #else > > typedef itk::Image OutPutImageType; > > typedef rtk::ParkerShortScanImageFilter PSSFType; > > typedef rtk::FDKConeBeamReconstructionFilter FDKType; > > #endif > > > > //ScatterCorrection > > typedef rtk::BoellaardScatterCorrectionImageFilter > BoellaardScatterCorrectionImageFilterType; > > BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > BoellaardScatterCorrectionImageFilterType::New(); > > ScatterCorrection->SetInput(Projections); > > > > //VarianObiRawImageFilter > > typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > RawImageFilterType; > > RawImageFilterType::Pointer AttenuationFilter = > RawImageFilterType::New(); > > AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > > > //Create the output image > > typedef rtk::ConstantImageSource< OutPutImageType > > ConstantImageSourceType; > > ConstantImageSourceType::PointType origin_p; > > ConstantImageSourceType::SizeType size_p; > > ConstantImageSourceType::SpacingType spacing_p; > > ConstantImageSourceType::Pointer projectionsSource = > ConstantImageSourceType::New(); > > origin_p[0] = -127.5; > > origin_p[1] = -127.5; > > origin_p[2] = -127.5; > > size_p[0] = 512; > > size_p[1] = 512; > > size_p[2] = 512; > > spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > > > projectionsSource->SetOrigin(origin_p); > > projectionsSource->SetSpacing(spacing_p); > > projectionsSource->SetSize(size_p); > > projectionsSource->SetConstant(0); > > > > // Short scan image filter > > PSSFType::Pointer pssf = PSSFType::New(); > > pssf->SetInput(AttenuationFilter->GetOutput()); > > pssf->SetGeometry(geometry); > > pssf->InPlaceOff(); > > std::cout << "short scan image filter success" << std::endl; > > > > FDKType::Pointer feldkamp = FDKType::New(); > > feldkamp->SetInput(0, projectionsSource->GetOutput()); > > feldkamp->SetInput(1, pssf->GetOutput()); > > feldkamp->SetGeometry(geometry); > > feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > feldkamp->SetGPUEnabled(1); > > feldkamp->SetNumberOfThreads(10000); > > > > #pragma region "Write volume" > > > > //Create a raw io for writing > > > > itk::RawImageIO::Pointer io; > > io = itk::RawImageIO::New(); > > > > for (unsigned int i = 0; i < dimension; i++) > > { > > io->SetDimensions(i, size_p[i]); > > io->SetSpacing(i, spacing_p[i]); > > io->SetOrigin(i, origin_p[i]); > > } > > io->SetHeaderSize(0); > > io->SetByteOrderToLittleEndian(); > > io->SetPixelType(itk::ImageIOBase::SCALAR); > > io->SetNumberOfComponents(1); > > io->SetNumberOfDimensions(3); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(feldkamp->GetOutput()); > > > > try > > { > > writer->Update(); > > } > > catch (itk::ExceptionObject & excp) > > { > > std::cerr << "Error while writing the image " << std::endl; > > std::cerr << excp << std::endl; > > getchar(); > > } > > #pragma endregion "WriteVolume" > > delete[] angles; > > return 0; > > } > > > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> I was able to perform a reconstruction from your header and geometry > >> file, using the following command lines: > >> > >> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >> --phantomscale "128,128,128" --like Output.mhd > >> > >> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware > >> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >> > >> The first computes projections through a Shepp & Logan phantom, with the > >> same size, spacing, origin, etc... as your projections, using your > >> geometry file geo.xml. > >> > >> The second line performs the FDK reconstruction. I had to use both the > >> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >> parts, reconstructs them one by one, then assembles the results. Can you > >> run the same commands and let us know whether you still encounter the > >> crash you mentioned ? If it works, you can use your own projection data > >> in the second command line instead of "simulatedprojections.mha". > >> > >> Best, > >> > >> Cyril > >> > >> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >> > >>> Dear Sir, > >>> > >>> Please find the Header file in the attachment. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> We do not need the projections file, at least not for a first stage of > >>>> error tracking. We only need the header. > >>>> Try the following command line: > >>>> > >>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>> > >>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>> what we need, and it is a very light text file. The "proj.raw" contains > >>>> the pixel values, but at the moment we do not need them. We will create > >>>> our own proj.raw file, filled with zeros, which should be enough to > >>>> track down the error you encounter. > >>>> > >>>> Looking forward to receiving your file, > >>>> Cyril > >>>> > >>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Sir, > >>>>> > >>>>> The single raw file of the projections is 1.4 GB and we > are > >> not > >>>> able to send this big file to you. Can you please suggest other > >> alternatives > >>>> for this? > >>>>> Or can you provide us the PC configuration to solve the > >> issue? > >>>>> Let me know if any other clarification is required. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Hello Zahid, > >>>>>> > >>>>>> We will need the header of your projections file, too (It is best if > >> you > >>>>>> have all your projections as a single .mhd and a single .raw file, so > >> it > >>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>> > >>>>>> Regards, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Cyril Mory, > >>>>>>> > >>>>>>> > >>>>>>> I have only used RTK version 1.3.0. but in the > error > >>>>>> message it is showing RTK version 1.2.0. > >>>>>>> Please find the attachment of the geometry file > of > >> our > >>>>>> projections. > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> Without some more information, it's unlikely that we find the > source > >> of > >>>>>>>> the problem. Here are a few things you can do to help us (and > >> therefore > >>>>>>>> yourself): > >>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in > >> the > >>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >> problem > >>>>>>>> might disappear just by upgrading to the new version > >>>>>>>> - create a small example that reproduces your problem. You can, for > >>>>>>>> example, simulate a geometry, simulate projections of a shepp logan > >>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>> example). And send us the script > >>>>>>>> - OR send us your geometry file and the header of your projections > >> file > >>>>>>>> (no need to send the projection data itself, we'll create a > >> zero-filled > >>>>>>>> stack of projections), and the command line that crashes > >>>>>>>> > >>>>>>>> Best regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Simon Rit, > >>>>>>>>> > >>>>>>>>> Please find the screen shot in the attachment. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> Senior Design Engineer > >>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>> > >>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>> http://www.panaceamedical.com > >>>>>>>>> Bangalore - India. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>> Cc: rtk-users at public.kitware.com > >>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA > >>>>>> memory > >>>>>>>>>> error. If you use the command line tool rtkfdk, you should first > >> make > >>>>>>>> sure > >>>>>>>>>> that you use the --lowmem option to stream the projection images. > >> If > >>>> it > >>>>>>>> is > >>>>>>>>>> no sufficient, you can split your volume using the --divisions. > The > >>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > of > >>>> RTK > >>>>>> on > >>>>>>>>>> our case studies webpage > >>>>>>>> . > >>>>>>>>>> Simon > >>>>>>>>>> > >>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>> > >>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>> > >>>>>>>>>>>> I am unable to do 1024x1024x1024 > >> reconstruction > >>>>>> using > >>>>>>>> RTK > >>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >> shoot > >>>> of > >>>>>>>>>>> the > >>>>>>>>>>>> same. > >>>>>>>>>>>> > >>>>>>>>>>>> I am using the following items given below. > >>>>>>>>>>>> > >>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>> application > >>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>> > >>>>>>>>>>>> Please provide the solution of this and let > me > >>>> know > >>>>>> if > >>>>>>>>>> any > >>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>> > >>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>> > >>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>> ________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Rtk-users mailing list > >>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 08:27:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 13:27:18 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> References: <20161102105715.ea4e5152@PMT-SER-2.panaceamedical.com> Message-ID: <84154ed0-3cb8-abf7-c253-3162d78bf7b7@creatis.insa-lyon.fr> I see two errors: Remove this line writer->SetNumberOfStreamDivisions(4); since only the streaming filter, not the write filter, needs to know about the number of divisions. And change the filename to "D:\\Output.mhd" It will write both the .mhd and the .raw files. I hope it helps, Cyril On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have modified my file writer code and used StreamingImageFilter. Now its not giving any error message but the final output is 0 byte for 1024 volume. It working fine for 512 volume. > > Please check my modified file writer code given below. > > // Streaming depending on streaming capability of writer > typedef itk::StreamingImageFilter StreamerType; > StreamerType::Pointer streamerBP = StreamerType::New(); > streamerBP->SetInput(feldkamp->GetOutput()); > streamerBP->SetNumberOfStreamDivisions(4); > > //create a writer and write reconstructed file > itk::ImageFileWriter::Pointer writer; > writer = itk::ImageFileWriter::New(); > writer->SetFileName("D:\\Output.raw"); > writer->SetImageIO(io); > writer->SetInput(streamerBP->GetOutput()); > writer->SetNumberOfStreamDivisions(4); > > > Please let me know if any clarification is required. > > > Thanks & Regards > > Zahid Hasan Ansari > Senior Design Engineer > Mobile No. +91-9738379729 > > Panacea Medical Technologies Pvt. Ltd. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : http://www.panaceamedical.com > Bangalore - India. > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Zahid, >> >> The --divisions is an option of the command-line application rtkfdk. It >> is not directly an option of the FDKConeBeamReconstructionFilter : >> rather, it is passed to a streaming filter at the end of the pipeline. >> Look for the following bit of code in rtkfdk.cxx : >> >> // Streaming depending on streaming capability of writer >> typedef itk::StreamingImageFilter> CPUOutputImageType> StreamerType; >> StreamerType::Pointer streamerBP = StreamerType::New(); >> streamerBP->SetInput( pfeldkamp ); >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >> >> You can find information on how a streaming filter works on this page: >> >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> >> I hope it helps, >> >> Cyril >> >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have tried but I am not getting where to give >> --division 4 in my code. >>> >>> Please find my code given below and please let me know >> where I need to change in my code to make it work. >>> >>> int _tmain(int argc, _TCHAR* argv[]) >>> { >>> #pragma region "Variable declaration" >>> const double PI = 3.14159265358979323846; >>> float *angles; >>> int nProj = 349; >>> typedef unsigned short pixelType; >>> typedef float OutpixelType; >>> const int dimension = 3; >>> typedef itk::Image imageType; >>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>> imageType::Pointer Projections = imageType::New(); >>> >>> #pragma endregion "Variable declaration" >>> >>> Projections = >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", nProj); >>> imageType::SpacingType pSpacing; >>> pSpacing[0] = 0.2960; >>> pSpacing[1] = 0.2960; >>> pSpacing[2] = 0.2960; >>> Projections->SetSpacing(pSpacing); >>> >>> imageType::PointType pOrigin; >>> pOrigin[0] = -212.972; >>> pOrigin[1] = -212.972; >>> pOrigin[2] = -212.972; //-158.50; >>> Projections->SetOrigin(pOrigin); >>> >>> Projections->Update(); >>> >>> //Read angles. >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>> angles = new float[nProj]; >>> angles = readAngles(angles_file, angles); >>> >>> #pragma region"Geometry" >>> // Geometry object >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>> GeometryType::Pointer geometry = GeometryType::New(); >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>> { >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, 0); >> // 136 half fan //2.07 Kidwai // >>> } >>> >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> GeometryWriterType; >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>> geometryWriter->SetFilename("D:\\geo.xml"); >>> geometryWriter->SetObject(geometry); >>> geometryWriter->WriteFile(); >>> geometry->Update(); >>> #pragma endregion "Geometry" >>> >>> //Define output image type >>> >>> #ifdef USE_CUDA >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>> #else >>> typedef itk::Image OutPutImageType; >>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>> #endif >>> >>> //ScatterCorrection >>> typedef rtk::BoellaardScatterCorrectionImageFilter >> BoellaardScatterCorrectionImageFilterType; >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >> BoellaardScatterCorrectionImageFilterType::New(); >>> ScatterCorrection->SetInput(Projections); >>> >>> //VarianObiRawImageFilter >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> RawImageFilterType; >>> RawImageFilterType::Pointer AttenuationFilter = >> RawImageFilterType::New(); >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>> >>> //Create the output image >>> typedef rtk::ConstantImageSource< OutPutImageType > >> ConstantImageSourceType; >>> ConstantImageSourceType::PointType origin_p; >>> ConstantImageSourceType::SizeType size_p; >>> ConstantImageSourceType::SpacingType spacing_p; >>> ConstantImageSourceType::Pointer projectionsSource = >> ConstantImageSourceType::New(); >>> origin_p[0] = -127.5; >>> origin_p[1] = -127.5; >>> origin_p[2] = -127.5; >>> size_p[0] = 512; >>> size_p[1] = 512; >>> size_p[2] = 512; >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>> >>> projectionsSource->SetOrigin(origin_p); >>> projectionsSource->SetSpacing(spacing_p); >>> projectionsSource->SetSize(size_p); >>> projectionsSource->SetConstant(0); >>> >>> // Short scan image filter >>> PSSFType::Pointer pssf = PSSFType::New(); >>> pssf->SetInput(AttenuationFilter->GetOutput()); >>> pssf->SetGeometry(geometry); >>> pssf->InPlaceOff(); >>> std::cout << "short scan image filter success" << std::endl; >>> >>> FDKType::Pointer feldkamp = FDKType::New(); >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>> feldkamp->SetInput(1, pssf->GetOutput()); >>> feldkamp->SetGeometry(geometry); >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>> feldkamp->SetGPUEnabled(1); >>> feldkamp->SetNumberOfThreads(10000); >>> >>> #pragma region "Write volume" >>> >>> //Create a raw io for writing >>> >>> itk::RawImageIO::Pointer io; >>> io = itk::RawImageIO::New(); >>> >>> for (unsigned int i = 0; i < dimension; i++) >>> { >>> io->SetDimensions(i, size_p[i]); >>> io->SetSpacing(i, spacing_p[i]); >>> io->SetOrigin(i, origin_p[i]); >>> } >>> io->SetHeaderSize(0); >>> io->SetByteOrderToLittleEndian(); >>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>> io->SetNumberOfComponents(1); >>> io->SetNumberOfDimensions(3); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(feldkamp->GetOutput()); >>> >>> try >>> { >>> writer->Update(); >>> } >>> catch (itk::ExceptionObject & excp) >>> { >>> std::cerr << "Error while writing the image " << std::endl; >>> std::cerr << excp << std::endl; >>> getchar(); >>> } >>> #pragma endregion "WriteVolume" >>> delete[] angles; >>> return 0; >>> } >>> >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> I was able to perform a reconstruction from your header and geometry >>>> file, using the following command lines: >>>> >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>> --phantomscale "128,128,128" --like Output.mhd >>>> >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha --hardware >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>> >>>> The first computes projections through a Shepp & Logan phantom, with the >>>> same size, spacing, origin, etc... as your projections, using your >>>> geometry file geo.xml. >>>> >>>> The second line performs the FDK reconstruction. I had to use both the >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>> parts, reconstructs them one by one, then assembles the results. Can you >>>> run the same commands and let us know whether you still encounter the >>>> crash you mentioned ? If it works, you can use your own projection data >>>> in the second command line instead of "simulatedprojections.mha". >>>> >>>> Best, >>>> >>>> Cyril >>>> >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>> >>>>> Dear Sir, >>>>> >>>>> Please find the Header file in the attachment. >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> We do not need the projections file, at least not for a first stage of >>>>>> error tracking. We only need the header. >>>>>> Try the following command line: >>>>>> >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>> >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>> what we need, and it is a very light text file. The "proj.raw" contains >>>>>> the pixel values, but at the moment we do not need them. We will create >>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>> track down the error you encounter. >>>>>> >>>>>> Looking forward to receiving your file, >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>> Dear Sir, >>>>>>> >>>>>>> The single raw file of the projections is 1.4 GB and we >> are >>>> not >>>>>> able to send this big file to you. Can you please suggest other >>>> alternatives >>>>>> for this? >>>>>>> Or can you provide us the PC configuration to solve the >>>> issue? >>>>>>> Let me know if any other clarification is required. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Hello Zahid, >>>>>>>> >>>>>>>> We will need the header of your projections file, too (It is best if >>>> you >>>>>>>> have all your projections as a single .mhd and a single .raw file, so >>>> it >>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>> >>>>>>>> Regards, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Cyril Mory, >>>>>>>>> >>>>>>>>> >>>>>>>>> I have only used RTK version 1.3.0. but in the >> error >>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>> Please find the attachment of the geometry file >> of >>>> our >>>>>>>> projections. >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Dear Zahid, >>>>>>>>>> >>>>>>>>>> Without some more information, it's unlikely that we find the >> source >>>> of >>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>> therefore >>>>>>>>>> yourself): >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes in >>>> the >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>> problem >>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>> - create a small example that reproduces your problem. You can, for >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp logan >>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>> example). And send us the script >>>>>>>>>> - OR send us your geometry file and the header of your projections >>>> file >>>>>>>>>> (no need to send the projection data itself, we'll create a >>>> zero-filled >>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>> >>>>>>>>>> Best regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>> >>>>>>>>>>> Please find the screen shot in the attachment. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> Senior Design Engineer >>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>> >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>> Bangalore - India. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a CUDA >>>>>>>> memory >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should first >>>> make >>>>>>>>>> sure >>>>>>>>>>>> that you use the --lowmem option to stream the projection images. >>>> If >>>>>> it >>>>>>>>>> is >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >> The >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >> of >>>>>> RTK >>>>>>>> on >>>>>>>>>>>> our case studies webpage >>>>>>>>>> . >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>> reconstruction >>>>>>>> using >>>>>>>>>> RTK >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>> shoot >>>>>> of >>>>>>>>>>>>> the >>>>>>>>>>>>>> same. >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am using the following items given below. >>>>>>>>>>>>>> >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>> application >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Please provide the solution of this and let >> me >>>>>> know >>>>>>>> if >>>>>>>>>>>> any >>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>> >>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>> >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url >> : >>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>> ________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>> >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>>>> >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >> >> > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > > > > > From zahidhasan.a at panaceamedical.com Wed Nov 2 09:37:23 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Wed, 02 Nov 2016 13:37:23 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. Please suggest us for further process. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > I see two errors: > > Remove this line > > writer->SetNumberOfStreamDivisions(4); > > since only the streaming filter, not the write filter, needs to know > about the number of divisions. > And change the filename to > > "D:\\Output.mhd" > > It will write both the .mhd and the .raw files. > > I hope it helps, > Cyril > > On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have modified my file writer code and used > StreamingImageFilter. Now its not giving any error message but the final > output is 0 byte for 1024 volume. It working fine for 512 volume. > > > > Please check my modified file writer code given below. > > > > // Streaming depending on streaming capability of writer > > typedef itk::StreamingImageFilter > StreamerType; > > StreamerType::Pointer streamerBP = StreamerType::New(); > > streamerBP->SetInput(feldkamp->GetOutput()); > > streamerBP->SetNumberOfStreamDivisions(4); > > > > //create a writer and write reconstructed file > > itk::ImageFileWriter::Pointer writer; > > writer = itk::ImageFileWriter::New(); > > writer->SetFileName("D:\\Output.raw"); > > writer->SetImageIO(io); > > writer->SetInput(streamerBP->GetOutput()); > > writer->SetNumberOfStreamDivisions(4); > > > > > > Please let me know if any clarification is required. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > Senior Design Engineer > > Mobile No. +91-9738379729 > > > > Panacea Medical Technologies Pvt. Ltd. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > http://www.panaceamedical.com > > Bangalore - India. > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> Dear Zahid, > >> > >> The --divisions is an option of the command-line application rtkfdk. It > >> is not directly an option of the FDKConeBeamReconstructionFilter : > >> rather, it is passed to a streaming filter at the end of the pipeline. > >> Look for the following bit of code in rtkfdk.cxx : > >> > >> // Streaming depending on streaming capability of writer > >> typedef itk::StreamingImageFilter >> CPUOutputImageType> StreamerType; > >> StreamerType::Pointer streamerBP = StreamerType::New(); > >> streamerBP->SetInput( pfeldkamp ); > >> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >> > >> You can find information on how a streaming filter works on this page: > >> > >> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >> > >> I hope it helps, > >> > >> Cyril > >> > >> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have tried but I am not getting where to give > >> --division 4 in my code. > >>> > >>> Please find my code given below and please let me know > >> where I need to change in my code to make it work. > >>> > >>> int _tmain(int argc, _TCHAR* argv[]) > >>> { > >>> #pragma region "Variable declaration" > >>> const double PI = 3.14159265358979323846; > >>> float *angles; > >>> int nProj = 349; > >>> typedef unsigned short pixelType; > >>> typedef float OutpixelType; > >>> const int dimension = 3; > >>> typedef itk::Image imageType; > >>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>> imageType::Pointer Projections = imageType::New(); > >>> > >>> #pragma endregion "Variable declaration" > >>> > >>> Projections = > >> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > nProj); > >>> imageType::SpacingType pSpacing; > >>> pSpacing[0] = 0.2960; > >>> pSpacing[1] = 0.2960; > >>> pSpacing[2] = 0.2960; > >>> Projections->SetSpacing(pSpacing); > >>> > >>> imageType::PointType pOrigin; > >>> pOrigin[0] = -212.972; > >>> pOrigin[1] = -212.972; > >>> pOrigin[2] = -212.972; //-158.50; > >>> Projections->SetOrigin(pOrigin); > >>> > >>> Projections->Update(); > >>> > >>> //Read angles. > >>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>> angles = new float[nProj]; > >>> angles = readAngles(angles_file, angles); > >>> > >>> #pragma region"Geometry" > >>> // Geometry object > >>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>> GeometryType::Pointer geometry = GeometryType::New(); > >>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>> { > >>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > 0); > >> // 136 half fan //2.07 Kidwai // > >>> } > >>> > >>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >> GeometryWriterType; > >>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); > >>> geometryWriter->SetFilename("D:\\geo.xml"); > >>> geometryWriter->SetObject(geometry); > >>> geometryWriter->WriteFile(); > >>> geometry->Update(); > >>> #pragma endregion "Geometry" > >>> > >>> //Define output image type > >>> > >>> #ifdef USE_CUDA > >>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>> #else > >>> typedef itk::Image OutPutImageType; > >>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; > >>> #endif > >>> > >>> //ScatterCorrection > >>> typedef rtk::BoellaardScatterCorrectionImageFilter > > >> BoellaardScatterCorrectionImageFilterType; > >>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = > >> BoellaardScatterCorrectionImageFilterType::New(); > >>> ScatterCorrection->SetInput(Projections); > >>> > >>> //VarianObiRawImageFilter > >>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >> RawImageFilterType; > >>> RawImageFilterType::Pointer AttenuationFilter = > >> RawImageFilterType::New(); > >>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>> > >>> //Create the output image > >>> typedef rtk::ConstantImageSource< OutPutImageType > > >> ConstantImageSourceType; > >>> ConstantImageSourceType::PointType origin_p; > >>> ConstantImageSourceType::SizeType size_p; > >>> ConstantImageSourceType::SpacingType spacing_p; > >>> ConstantImageSourceType::Pointer projectionsSource = > >> ConstantImageSourceType::New(); > >>> origin_p[0] = -127.5; > >>> origin_p[1] = -127.5; > >>> origin_p[2] = -127.5; > >>> size_p[0] = 512; > >>> size_p[1] = 512; > >>> size_p[2] = 512; > >>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>> > >>> projectionsSource->SetOrigin(origin_p); > >>> projectionsSource->SetSpacing(spacing_p); > >>> projectionsSource->SetSize(size_p); > >>> projectionsSource->SetConstant(0); > >>> > >>> // Short scan image filter > >>> PSSFType::Pointer pssf = PSSFType::New(); > >>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>> pssf->SetGeometry(geometry); > >>> pssf->InPlaceOff(); > >>> std::cout << "short scan image filter success" << std::endl; > >>> > >>> FDKType::Pointer feldkamp = FDKType::New(); > >>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>> feldkamp->SetInput(1, pssf->GetOutput()); > >>> feldkamp->SetGeometry(geometry); > >>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>> feldkamp->SetGPUEnabled(1); > >>> feldkamp->SetNumberOfThreads(10000); > >>> > >>> #pragma region "Write volume" > >>> > >>> //Create a raw io for writing > >>> > >>> itk::RawImageIO::Pointer io; > >>> io = itk::RawImageIO::New(); > >>> > >>> for (unsigned int i = 0; i < dimension; i++) > >>> { > >>> io->SetDimensions(i, size_p[i]); > >>> io->SetSpacing(i, spacing_p[i]); > >>> io->SetOrigin(i, origin_p[i]); > >>> } > >>> io->SetHeaderSize(0); > >>> io->SetByteOrderToLittleEndian(); > >>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>> io->SetNumberOfComponents(1); > >>> io->SetNumberOfDimensions(3); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(feldkamp->GetOutput()); > >>> > >>> try > >>> { > >>> writer->Update(); > >>> } > >>> catch (itk::ExceptionObject & excp) > >>> { > >>> std::cerr << "Error while writing the image " << std::endl; > >>> std::cerr << excp << std::endl; > >>> getchar(); > >>> } > >>> #pragma endregion "WriteVolume" > >>> delete[] angles; > >>> return 0; > >>> } > >>> > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> I was able to perform a reconstruction from your header and geometry > >>>> file, using the following command lines: > >>>> > >>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>> --phantomscale "128,128,128" --like Output.mhd > >>>> > >>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > --hardware > >>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>> > >>>> The first computes projections through a Shepp & Logan phantom, with > the > >>>> same size, spacing, origin, etc... as your projections, using your > >>>> geometry file geo.xml. > >>>> > >>>> The second line performs the FDK reconstruction. I had to use both the > >>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, > >>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by > >>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>> parts, reconstructs them one by one, then assembles the results. Can > you > >>>> run the same commands and let us know whether you still encounter the > >>>> crash you mentioned ? If it works, you can use your own projection data > >>>> in the second command line instead of "simulatedprojections.mha". > >>>> > >>>> Best, > >>>> > >>>> Cyril > >>>> > >>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>> > >>>>> Dear Sir, > >>>>> > >>>>> Please find the Header file in the attachment. > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> We do not need the projections file, at least not for a first stage > of > >>>>>> error tracking. We only need the header. > >>>>>> Try the following command line: > >>>>>> > >>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>> > >>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is > >>>>>> what we need, and it is a very light text file. The "proj.raw" > contains > >>>>>> the pixel values, but at the moment we do not need them. We will > create > >>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>> track down the error you encounter. > >>>>>> > >>>>>> Looking forward to receiving your file, > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> The single raw file of the projections is 1.4 GB and > we > >> are > >>>> not > >>>>>> able to send this big file to you. Can you please suggest other > >>>> alternatives > >>>>>> for this? > >>>>>>> Or can you provide us the PC configuration to solve > the > >>>> issue? > >>>>>>> Let me know if any other clarification is required. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Hello Zahid, > >>>>>>>> > >>>>>>>> We will need the header of your projections file, too (It is best > if > >>>> you > >>>>>>>> have all your projections as a single .mhd and a single .raw file, > so > >>>> it > >>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>> > >>>>>>>> Regards, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Cyril Mory, > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> I have only used RTK version 1.3.0. but in the > >> error > >>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>> Please find the attachment of the geometry > file > >> of > >>>> our > >>>>>>>> projections. > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Dear Zahid, > >>>>>>>>>> > >>>>>>>>>> Without some more information, it's unlikely that we find the > >> source > >>>> of > >>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>> therefore > >>>>>>>>>> yourself): > >>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes > in > >>>> the > >>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>> problem > >>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>> - create a small example that reproduces your problem. You can, > for > >>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > logan > >>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an > >>>>>>>>>> example). And send us the script > >>>>>>>>>> - OR send us your geometry file and the header of your > projections > >>>> file > >>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>> zero-filled > >>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>> > >>>>>>>>>> Best regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>> > >>>>>>>>>>> Please find the screen shot in the > attachment. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>> > >>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>> Bangalore - India. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > CUDA > >>>>>>>> memory > >>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > first > >>>> make > >>>>>>>>>> sure > >>>>>>>>>>>> that you use the --lowmem option to stream the projection > images. > >>>> If > >>>>>> it > >>>>>>>>>> is > >>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. > >> The > >>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use > >> of > >>>>>> RTK > >>>>>>>> on > >>>>>>>>>>>> our case studies webpage > >>>>>>>>>> . > >>>>>>>>>>>> Simon > >>>>>>>>>>>> > >>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>> reconstruction > >>>>>>>> using > >>>>>>>>>> RTK > >>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen > >>>> shoot > >>>>>> of > >>>>>>>>>>>>> the > >>>>>>>>>>>>>> same. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> I am using the following items given > below. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console > >>>>>> application > >>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Please provide the solution of this and > let > >> me > >>>>>> know > >>>>>>>> if > >>>>>>>>>>>> any > >>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, > >>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > >> : > >>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>> ________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>> > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> _______________________________________________ > >>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>>>> > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >> > >> > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: RTK_Error.png Type: image/png Size: 57211 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Wed Nov 2 10:00:50 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Wed, 2 Nov 2016 15:00:50 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> References: <20161102133723.5d6011e2@PMT-SER-2.panaceamedical.com> Message-ID: <94e0045d-ef88-726d-9b7b-8b5ebf5ac067@creatis.insa-lyon.fr> Dear Zahid, The output looks correct. If the command line solution I suggested in a previous email works, the best way to move forward would be to compare your code and that of rtkfdk.cxx, and where it differs, make sure you have not introduced an error. Cyril On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > I have done the same but the Output.mhd file is still 0 KB for 1024 volume. Please find the attachment of the status of the output displayed. > > Please suggest us for further process. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> I see two errors: >> >> Remove this line >> >> writer->SetNumberOfStreamDivisions(4); >> >> since only the streaming filter, not the write filter, needs to know >> about the number of divisions. >> And change the filename to >> >> "D:\\Output.mhd" >> >> It will write both the .mhd and the .raw files. >> >> I hope it helps, >> Cyril >> >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >>> Dear Cyril Mory, >>> >>> I have modified my file writer code and used >> StreamingImageFilter. Now its not giving any error message but the final >> output is 0 byte for 1024 volume. It working fine for 512 volume. >>> Please check my modified file writer code given below. >>> >>> // Streaming depending on streaming capability of writer >>> typedef itk::StreamingImageFilter >> StreamerType; >>> StreamerType::Pointer streamerBP = StreamerType::New(); >>> streamerBP->SetInput(feldkamp->GetOutput()); >>> streamerBP->SetNumberOfStreamDivisions(4); >>> >>> //create a writer and write reconstructed file >>> itk::ImageFileWriter::Pointer writer; >>> writer = itk::ImageFileWriter::New(); >>> writer->SetFileName("D:\\Output.raw"); >>> writer->SetImageIO(io); >>> writer->SetInput(streamerBP->GetOutput()); >>> writer->SetNumberOfStreamDivisions(4); >>> >>> >>> Please let me know if any clarification is required. >>> >>> >>> Thanks & Regards >>> >>> Zahid Hasan Ansari >>> Senior Design Engineer >>> Mobile No. +91-9738379729 >>> >>> Panacea Medical Technologies Pvt. Ltd. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> http://www.panaceamedical.com >>> Bangalore - India. >>> >>> >>> >>> >>> ----- Original Message ----- >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>> >>> >>>> Dear Zahid, >>>> >>>> The --divisions is an option of the command-line application rtkfdk. It >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >>>> rather, it is passed to a streaming filter at the end of the pipeline. >>>> Look for the following bit of code in rtkfdk.cxx : >>>> >>>> // Streaming depending on streaming capability of writer >>>> typedef itk::StreamingImageFilter>>> CPUOutputImageType> StreamerType; >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >>>> streamerBP->SetInput( pfeldkamp ); >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); >>>> >>>> You can find information on how a streaming filter works on this page: >>>> >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >>>> >>>> I hope it helps, >>>> >>>> Cyril >>>> >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >>>>> Dear Cyril Mory, >>>>> >>>>> I have tried but I am not getting where to give >>>> --division 4 in my code. >>>>> Please find my code given below and please let me know >>>> where I need to change in my code to make it work. >>>>> int _tmain(int argc, _TCHAR* argv[]) >>>>> { >>>>> #pragma region "Variable declaration" >>>>> const double PI = 3.14159265358979323846; >>>>> float *angles; >>>>> int nProj = 349; >>>>> typedef unsigned short pixelType; >>>>> typedef float OutpixelType; >>>>> const int dimension = 3; >>>>> typedef itk::Image imageType; >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; >>>>> imageType::Pointer Projections = imageType::New(); >>>>> >>>>> #pragma endregion "Variable declaration" >>>>> >>>>> Projections = >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> nProj); >>>>> imageType::SpacingType pSpacing; >>>>> pSpacing[0] = 0.2960; >>>>> pSpacing[1] = 0.2960; >>>>> pSpacing[2] = 0.2960; >>>>> Projections->SetSpacing(pSpacing); >>>>> >>>>> imageType::PointType pOrigin; >>>>> pOrigin[0] = -212.972; >>>>> pOrigin[1] = -212.972; >>>>> pOrigin[2] = -212.972; //-158.50; >>>>> Projections->SetOrigin(pOrigin); >>>>> >>>>> Projections->Update(); >>>>> >>>>> //Read angles. >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >>>>> angles = new float[nProj]; >>>>> angles = readAngles(angles_file, angles); >>>>> >>>>> #pragma region"Geometry" >>>>> // Geometry object >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >>>>> GeometryType::Pointer geometry = GeometryType::New(); >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >>>>> { >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, >> 0); >>>> // 136 half fan //2.07 Kidwai // >>>>> } >>>>> >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >>>> GeometryWriterType; >>>>> GeometryWriterType::Pointer geometryWriter = GeometryWriterType::New(); >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >>>>> geometryWriter->SetObject(geometry); >>>>> geometryWriter->WriteFile(); >>>>> geometry->Update(); >>>>> #pragma endregion "Geometry" >>>>> >>>>> //Define output image type >>>>> >>>>> #ifdef USE_CUDA >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >>>>> #else >>>>> typedef itk::Image OutPutImageType; >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; >>>>> typedef rtk::FDKConeBeamReconstructionFilter FDKType; >>>>> #endif >>>>> >>>>> //ScatterCorrection >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter>>> BoellaardScatterCorrectionImageFilterType; >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection = >>>> BoellaardScatterCorrectionImageFilterType::New(); >>>>> ScatterCorrection->SetInput(Projections); >>>>> >>>>> //VarianObiRawImageFilter >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >>>> RawImageFilterType; >>>>> RawImageFilterType::Pointer AttenuationFilter = >>>> RawImageFilterType::New(); >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >>>>> >>>>> //Create the output image >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >>>> ConstantImageSourceType; >>>>> ConstantImageSourceType::PointType origin_p; >>>>> ConstantImageSourceType::SizeType size_p; >>>>> ConstantImageSourceType::SpacingType spacing_p; >>>>> ConstantImageSourceType::Pointer projectionsSource = >>>> ConstantImageSourceType::New(); >>>>> origin_p[0] = -127.5; >>>>> origin_p[1] = -127.5; >>>>> origin_p[2] = -127.5; >>>>> size_p[0] = 512; >>>>> size_p[1] = 512; >>>>> size_p[2] = 512; >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >>>>> >>>>> projectionsSource->SetOrigin(origin_p); >>>>> projectionsSource->SetSpacing(spacing_p); >>>>> projectionsSource->SetSize(size_p); >>>>> projectionsSource->SetConstant(0); >>>>> >>>>> // Short scan image filter >>>>> PSSFType::Pointer pssf = PSSFType::New(); >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >>>>> pssf->SetGeometry(geometry); >>>>> pssf->InPlaceOff(); >>>>> std::cout << "short scan image filter success" << std::endl; >>>>> >>>>> FDKType::Pointer feldkamp = FDKType::New(); >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >>>>> feldkamp->SetGeometry(geometry); >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >>>>> feldkamp->SetGPUEnabled(1); >>>>> feldkamp->SetNumberOfThreads(10000); >>>>> >>>>> #pragma region "Write volume" >>>>> >>>>> //Create a raw io for writing >>>>> >>>>> itk::RawImageIO::Pointer io; >>>>> io = itk::RawImageIO::New(); >>>>> >>>>> for (unsigned int i = 0; i < dimension; i++) >>>>> { >>>>> io->SetDimensions(i, size_p[i]); >>>>> io->SetSpacing(i, spacing_p[i]); >>>>> io->SetOrigin(i, origin_p[i]); >>>>> } >>>>> io->SetHeaderSize(0); >>>>> io->SetByteOrderToLittleEndian(); >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >>>>> io->SetNumberOfComponents(1); >>>>> io->SetNumberOfDimensions(3); >>>>> >>>>> //create a writer and write reconstructed file >>>>> itk::ImageFileWriter::Pointer writer; >>>>> writer = itk::ImageFileWriter::New(); >>>>> writer->SetFileName("D:\\Output.raw"); >>>>> writer->SetImageIO(io); >>>>> writer->SetInput(feldkamp->GetOutput()); >>>>> >>>>> try >>>>> { >>>>> writer->Update(); >>>>> } >>>>> catch (itk::ExceptionObject & excp) >>>>> { >>>>> std::cerr << "Error while writing the image " << std::endl; >>>>> std::cerr << excp << std::endl; >>>>> getchar(); >>>>> } >>>>> #pragma endregion "WriteVolume" >>>>> delete[] angles; >>>>> return 0; >>>>> } >>>>> >>>>> >>>>> >>>>> Thanks & Regards >>>>> >>>>> Zahid Hasan Ansari >>>>> Senior Design Engineer >>>>> Mobile No. +91-9738379729 >>>>> >>>>> Panacea Medical Technologies Pvt. Ltd. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>> http://www.panaceamedical.com >>>>> Bangalore - India. >>>>> >>>>> >>>>> >>>>> >>>>> ----- Original Message ----- >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>> >>>>> >>>>>> Dear Zahid, >>>>>> >>>>>> I was able to perform a reconstruction from your header and geometry >>>>>> file, using the following command lines: >>>>>> >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >>>>>> --phantomscale "128,128,128" --like Output.mhd >>>>>> >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> --hardware >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >>>>>> >>>>>> The first computes projections through a Shepp & Logan phantom, with >> the >>>>>> same size, spacing, origin, etc... as your projections, using your >>>>>> geometry file geo.xml. >>>>>> >>>>>> The second line performs the FDK reconstruction. I had to use both the >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory (3GB, >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory by >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >>>>>> parts, reconstructs them one by one, then assembles the results. Can >> you >>>>>> run the same commands and let us know whether you still encounter the >>>>>> crash you mentioned ? If it works, you can use your own projection data >>>>>> in the second command line instead of "simulatedprojections.mha". >>>>>> >>>>>> Best, >>>>>> >>>>>> Cyril >>>>>> >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >>>>>> >>>>>>> Dear Sir, >>>>>>> >>>>>>> Please find the Header file in the attachment. >>>>>>> >>>>>>> >>>>>>> Thanks & Regards >>>>>>> >>>>>>> Zahid Hasan Ansari >>>>>>> >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >>>> Rit >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>> >>>>>>> >>>>>>>> Dear Zahid, >>>>>>>> >>>>>>>> We do not need the projections file, at least not for a first stage >> of >>>>>>>> error tracking. We only need the header. >>>>>>>> Try the following command line: >>>>>>>> >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >>>>>>>> >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file is >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> contains >>>>>>>> the pixel values, but at the moment we do not need them. We will >> create >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to >>>>>>>> track down the error you encounter. >>>>>>>> >>>>>>>> Looking forward to receiving your file, >>>>>>>> Cyril >>>>>>>> >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >>>>>>>>> Dear Sir, >>>>>>>>> >>>>>>>>> The single raw file of the projections is 1.4 GB and >> we >>>> are >>>>>> not >>>>>>>> able to send this big file to you. Can you please suggest other >>>>>> alternatives >>>>>>>> for this? >>>>>>>>> Or can you provide us the PC configuration to solve >> the >>>>>> issue? >>>>>>>>> Let me know if any other clarification is required. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> >>>>>>>>> Zahid Hasan Ansari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ----- Original Message ----- >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >>>>>> Rit >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>> >>>>>>>>> >>>>>>>>>> Hello Zahid, >>>>>>>>>> >>>>>>>>>> We will need the header of your projections file, too (It is best >> if >>>>>> you >>>>>>>>>> have all your projections as a single .mhd and a single .raw file, >> so >>>>>> it >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> Cyril >>>>>>>>>> >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>> Dear Cyril Mory, >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I have only used RTK version 1.3.0. but in the >>>> error >>>>>>>>>> message it is showing RTK version 1.2.0. >>>>>>>>>>> Please find the attachment of the geometry >> file >>>> of >>>>>> our >>>>>>>>>> projections. >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> >>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >>>> Simon >>>>>>>> Rit >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>> >>>>>>>>>>>> Without some more information, it's unlikely that we find the >>>> source >>>>>> of >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >>>>>> therefore >>>>>>>>>>>> yourself): >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable changes >> in >>>>>> the >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your >>>>>> problem >>>>>>>>>>>> might disappear just by upgrading to the new version >>>>>>>>>>>> - create a small example that reproduces your problem. You can, >> for >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> logan >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need an >>>>>>>>>>>> example). And send us the script >>>>>>>>>>>> - OR send us your geometry file and the header of your >> projections >>>>>> file >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >>>>>> zero-filled >>>>>>>>>>>> stack of projections), and the command line that crashes >>>>>>>>>>>> >>>>>>>>>>>> Best regards, >>>>>>>>>>>> Cyril >>>>>>>>>>>> >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >>>>>>>>>>>>> Dear Simon Rit, >>>>>>>>>>>>> >>>>>>>>>>>>> Please find the screen shot in the >> attachment. >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>> >>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>> >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >>>>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >>>>>>>> [mailto:rtk-users at public.kitware.com], >>>>>>>>>>>> saimahesh.m at panaceamedical.com >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> Dear Zahid, >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a >> CUDA >>>>>>>>>> memory >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> first >>>>>> make >>>>>>>>>>>> sure >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> images. >>>>>> If >>>>>>>> it >>>>>>>>>>>> is >>>>>>>>>>>>>> no sufficient, you can split your volume using the --divisions. >>>> The >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the use >>>> of >>>>>>>> RTK >>>>>>>>>> on >>>>>>>>>>>>>> our case studies webpage >>>>>>>>>>>> . >>>>>>>>>>>>>> Simon >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Dear Sir\Madam, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >>>>>> reconstruction >>>>>>>>>> using >>>>>>>>>>>> RTK >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the screen >>>>>> shoot >>>>>>>> of >>>>>>>>>>>>>>> the >>>>>>>>>>>>>>>> same. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I am using the following items given >> below. >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit console >>>>>>>> application >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >>>>>>>>>>>>>>>> 5. CUDA 7. >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Please provide the solution of this and >> let >>>> me >>>>>>>> know >>>>>>>>>> if >>>>>>>>>>>>>> any >>>>>>>>>>>>>>>> other clarification is required. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Zahid Hasan Ansari >>>>>>>>>>>>>>>> Senior Design Engineer >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >>>> : >>>>>>>>>>>>>>>> http://www.panaceamedical.com >>>>>>>>>>>>>>>> Bangalore - India. >>>>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >>>> Area >>>>>>>>>> Phase >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >>>> Industrial >>>>>>>>>> Area, >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>>>> ____________________________________________________________ >>>>>>>>>>>>>>> ________________ >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> This email and any files transmitted with it are confidential >>>> and >>>>>>>>>>>> intended >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >>>>>>>>>>>> addressed. >>>>>>>>>>>>>>> If you have received this email in error please notify the >>>> system >>>>>>>>>>>> manager. >>>>>>>>>>>>>>> Please note that any views or opinions presented in this email >>>> are >>>>>>>>>>>> solely >>>>>>>>>>>>>>> those of the author and do not necessarily represent those of >>>> the >>>>>>>>>>>> company. >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >>>> attachments >>>>>>>> for >>>>>>>>>>>> the >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>>>> damage >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>>>>>> >>>>>>>>>>>>> ________________________________________ >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >>>>>>>> Phase >>>>>>>>>> 1, >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >>>>>>>> Area, >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>>>> >>>>>>>>>>>>> This email and any files transmitted with it are confidential >> and >>>>>>>>>> intended >>>>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>>>> addressed. >>>>>>>>>>>>> If you have received this email in error please notify the >> system >>>>>>>>>> manager. >>>>>>>>>>>>> Please note that any views or opinions presented in this email >> are >>>>>>>>>> solely >>>>>>>>>>>>> those of the author and do not necessarily represent those of >> the >>>>>>>>>> company. >>>>>>>>>>>>> Finally, the recipient should check this email and any >> attachments >>>>>> for >>>>>>>>>> the >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any >>>> damage >>>>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>> Rtk-users mailing list >>>>>>>>>>>>> Rtk-users at public.kitware.com >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>>>>> ________________________________________ >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>>>> Phase >>>>>>>> 1, >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>>>> Area, >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>>>> >>>>>>>>>>> This email and any files transmitted with it are confidential and >>>>>>>> intended >>>>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>>>> addressed. >>>>>>>>>>> If you have received this email in error please notify the system >>>>>>>> manager. >>>>>>>>>>> Please note that any views or opinions presented in this email are >>>>>>>> solely >>>>>>>>>>> those of the author and do not necessarily represent those of the >>>>>>>> company. >>>>>>>>>>> Finally, the recipient should check this email and any attachments >>>> for >>>>>>>> the >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> damage >>>>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>>>> >>>>>>>>> ________________________________________ >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >>>> Phase >>>>>> 1, >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >>>> Area, >>>>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>>>> Fax : + 91 80 42428710 >>>>>>>>> Url : http://www.panaceamedical.com >>>>>>>>> >> ____________________________________________________________________________ >>>>>>>>> PMT EMAIL DISCLAIMER: >>>>>>>>> >>>>>>>>> This email and any files transmitted with it are confidential and >>>>>> intended >>>>>>>>> solely for the use of the individual or entity to whom they are >>>>>> addressed. >>>>>>>>> If you have received this email in error please notify the system >>>>>> manager. >>>>>>>>> Please note that any views or opinions presented in this email are >>>>>> solely >>>>>>>>> those of the author and do not necessarily represent those of the >>>>>> company. >>>>>>>>> Finally, the recipient should check this email and any attachments >> for >>>>>> the >>>>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>>>> caused by any virus transmitted by this email. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>> ________________________________________ >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >>>> 1, >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >>>>>> Malur - 563130. Kolar District. INDIA. >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>>>> Fax : + 91 80 42428710 >>>>>>> Url : http://www.panaceamedical.com >>>>>>> >> ____________________________________________________________________________ >>>>>>> PMT EMAIL DISCLAIMER: >>>>>>> >>>>>>> This email and any files transmitted with it are confidential and >>>> intended >>>>>>> solely for the use of the individual or entity to whom they are >>>> addressed. >>>>>>> If you have received this email in error please notify the system >>>> manager. >>>>>>> Please note that any views or opinions presented in this email are >>>> solely >>>>>>> those of the author and do not necessarily represent those of the >>>> company. >>>>>>> Finally, the recipient should check this email and any attachments for >>>> the >>>>>>> presence of viruses. The company accepts no liability for any damage >>>>>>> caused by any virus transmitted by this email. >>>>>>> >>>>> ________________________________________ >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >>>> Malur - 563130. Kolar District. INDIA. >>>>> Tel : +91 80 4242 8700 / 2845 4785 >>>>> Fax : + 91 80 42428710 >>>>> Url : http://www.panaceamedical.com >>>>> >> ____________________________________________________________________________ >>>>> PMT EMAIL DISCLAIMER: >>>>> >>>>> This email and any files transmitted with it are confidential and >> intended >>>>> solely for the use of the individual or entity to whom they are >> addressed. >>>>> If you have received this email in error please notify the system >> manager. >>>>> Please note that any views or opinions presented in this email are >> solely >>>>> those of the author and do not necessarily represent those of the >> company. >>>>> Finally, the recipient should check this email and any attachments for >> the >>>>> presence of viruses. The company accepts no liability for any damage >>>>> caused by any virus transmitted by this email. >>>>> >>>>> >>>>> >>>> >>> ________________________________________ >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> Malur - 563130. Kolar District. INDIA. >>> Tel : +91 80 4242 8700 / 2845 4785 >>> Fax : + 91 80 42428710 >>> Url : http://www.panaceamedical.com >>> >> ____________________________________________________________________________ >>> PMT EMAIL DISCLAIMER: >>> >>> This email and any files transmitted with it are confidential and intended >>> solely for the use of the individual or entity to whom they are addressed. >>> If you have received this email in error please notify the system manager. >>> Please note that any views or opinions presented in this email are solely >>> those of the author and do not necessarily represent those of the company. >>> Finally, the recipient should check this email and any attachments for the >>> presence of viruses. The company accepts no liability for any damage >>> caused by any virus transmitted by this email. >>> >>> >>> >>> >>> >> >> > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Wed Nov 2 22:38:38 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 02:38:38 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> Message-ID: <24189134.77160.1478140718379@mail.yahoo.com> Hello Simon and Cyril,Thanks for the reply.You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do.Thanks again for the reply. @Cyril:Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards,Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 02:05:51 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 06:05:51 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103060551.f7bfa0c3@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, Thank you for your help. We are able to reconstruct 1024 volume now. But the reconstruction time is around 4 minutes. Can you please help us to reduce the reconstruction time? We are using NVIDIA TITAN X GPU which has 12 GB memory. Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Zahid, > > The output looks correct. > > If the command line solution I suggested in a previous email works, the > best way to move forward would be to compare your code and that of > rtkfdk.cxx, and where it differs, make sure you have not introduced an > error. > > Cyril > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > Dear Cyril Mory, > > > > I have done the same but the Output.mhd file is still 0 > KB for 1024 volume. Please find the attachment of the status of the output > displayed. > > > > Please suggest us for further process. > > > > > > Thanks & Regards > > > > Zahid Hasan Ansari > > > > > > > > > > ----- Original Message ----- > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > >> I see two errors: > >> > >> Remove this line > >> > >> writer->SetNumberOfStreamDivisions(4); > >> > >> since only the streaming filter, not the write filter, needs to know > >> about the number of divisions. > >> And change the filename to > >> > >> "D:\\Output.mhd" > >> > >> It will write both the .mhd and the .raw files. > >> > >> I hope it helps, > >> Cyril > >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > >>> Dear Cyril Mory, > >>> > >>> I have modified my file writer code and used > >> StreamingImageFilter. Now its not giving any error message but the final > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > >>> Please check my modified file writer code given below. > >>> > >>> // Streaming depending on streaming capability of writer > >>> typedef itk::StreamingImageFilter > >> StreamerType; > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>> streamerBP->SetInput(feldkamp->GetOutput()); > >>> streamerBP->SetNumberOfStreamDivisions(4); > >>> > >>> //create a writer and write reconstructed file > >>> itk::ImageFileWriter::Pointer writer; > >>> writer = itk::ImageFileWriter::New(); > >>> writer->SetFileName("D:\\Output.raw"); > >>> writer->SetImageIO(io); > >>> writer->SetInput(streamerBP->GetOutput()); > >>> writer->SetNumberOfStreamDivisions(4); > >>> > >>> > >>> Please let me know if any clarification is required. > >>> > >>> > >>> Thanks & Regards > >>> > >>> Zahid Hasan Ansari > >>> Senior Design Engineer > >>> Mobile No. +91-9738379729 > >>> > >>> Panacea Medical Technologies Pvt. Ltd. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >> http://www.panaceamedical.com > >>> Bangalore - India. > >>> > >>> > >>> > >>> > >>> ----- Original Message ----- > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > >> [mailto:simon.rit at creatis.insa-lyon.fr] > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>> > >>> > >>>> Dear Zahid, > >>>> > >>>> The --divisions is an option of the command-line application rtkfdk. It > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > >>>> rather, it is passed to a streaming filter at the end of the pipeline. > >>>> Look for the following bit of code in rtkfdk.cxx : > >>>> > >>>> // Streaming depending on streaming capability of writer > >>>> typedef itk::StreamingImageFilter >>>> CPUOutputImageType> StreamerType; > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > >>>> streamerBP->SetInput( pfeldkamp ); > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg ); > >>>> > >>>> You can find information on how a streaming filter works on this page: > >>>> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > >>>> > >>>> I hope it helps, > >>>> > >>>> Cyril > >>>> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > >>>>> Dear Cyril Mory, > >>>>> > >>>>> I have tried but I am not getting where to give > >>>> --division 4 in my code. > >>>>> Please find my code given below and please let me > know > >>>> where I need to change in my code to make it work. > >>>>> int _tmain(int argc, _TCHAR* argv[]) > >>>>> { > >>>>> #pragma region "Variable declaration" > >>>>> const double PI = 3.14159265358979323846; > >>>>> float *angles; > >>>>> int nProj = 349; > >>>>> typedef unsigned short pixelType; > >>>>> typedef float OutpixelType; > >>>>> const int dimension = 3; > >>>>> typedef itk::Image imageType; > >>>>> typedef itk::ImageRegionConstIterator ImageIteratorType; > >>>>> imageType::Pointer Projections = imageType::New(); > >>>>> > >>>>> #pragma endregion "Variable declaration" > >>>>> > >>>>> Projections = > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > >> nProj); > >>>>> imageType::SpacingType pSpacing; > >>>>> pSpacing[0] = 0.2960; > >>>>> pSpacing[1] = 0.2960; > >>>>> pSpacing[2] = 0.2960; > >>>>> Projections->SetSpacing(pSpacing); > >>>>> > >>>>> imageType::PointType pOrigin; > >>>>> pOrigin[0] = -212.972; > >>>>> pOrigin[1] = -212.972; > >>>>> pOrigin[2] = -212.972; //-158.50; > >>>>> Projections->SetOrigin(pOrigin); > >>>>> > >>>>> Projections->Update(); > >>>>> > >>>>> //Read angles. > >>>>> char *angles_file = "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > >>>>> angles = new float[nProj]; > >>>>> angles = readAngles(angles_file, angles); > >>>>> > >>>>> #pragma region"Geometry" > >>>>> // Geometry object > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > >>>>> { > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, 0, > >> 0); > >>>> // 136 half fan //2.07 Kidwai // > >>>>> } > >>>>> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > >>>> GeometryWriterType; > >>>>> GeometryWriterType::Pointer geometryWriter = > GeometryWriterType::New(); > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > >>>>> geometryWriter->SetObject(geometry); > >>>>> geometryWriter->WriteFile(); > >>>>> geometry->Update(); > >>>>> #pragma endregion "Geometry" > >>>>> > >>>>> //Define output image type > >>>>> > >>>>> #ifdef USE_CUDA > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > PSSFType; > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > >>>>> #else > >>>>> typedef itk::Image OutPutImageType; > >>>>> typedef rtk::ParkerShortScanImageFilter PSSFType; > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > FDKType; > >>>>> #endif > >>>>> > >>>>> //ScatterCorrection > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter imageType > >>>> BoellaardScatterCorrectionImageFilterType; > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer ScatterCorrection > = > >>>> BoellaardScatterCorrectionImageFilterType::New(); > >>>>> ScatterCorrection->SetInput(Projections); > >>>>> > >>>>> //VarianObiRawImageFilter > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > >>>> RawImageFilterType; > >>>>> RawImageFilterType::Pointer AttenuationFilter = > >>>> RawImageFilterType::New(); > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > >>>>> > >>>>> //Create the output image > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > >>>> ConstantImageSourceType; > >>>>> ConstantImageSourceType::PointType origin_p; > >>>>> ConstantImageSourceType::SizeType size_p; > >>>>> ConstantImageSourceType::SpacingType spacing_p; > >>>>> ConstantImageSourceType::Pointer projectionsSource = > >>>> ConstantImageSourceType::New(); > >>>>> origin_p[0] = -127.5; > >>>>> origin_p[1] = -127.5; > >>>>> origin_p[2] = -127.5; > >>>>> size_p[0] = 512; > >>>>> size_p[1] = 512; > >>>>> size_p[2] = 512; > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > >>>>> > >>>>> projectionsSource->SetOrigin(origin_p); > >>>>> projectionsSource->SetSpacing(spacing_p); > >>>>> projectionsSource->SetSize(size_p); > >>>>> projectionsSource->SetConstant(0); > >>>>> > >>>>> // Short scan image filter > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > >>>>> pssf->SetGeometry(geometry); > >>>>> pssf->InPlaceOff(); > >>>>> std::cout << "short scan image filter success" << std::endl; > >>>>> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > >>>>> feldkamp->SetGeometry(geometry); > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > >>>>> feldkamp->SetGPUEnabled(1); > >>>>> feldkamp->SetNumberOfThreads(10000); > >>>>> > >>>>> #pragma region "Write volume" > >>>>> > >>>>> //Create a raw io for writing > >>>>> > >>>>> itk::RawImageIO::Pointer io; > >>>>> io = itk::RawImageIO::New(); > >>>>> > >>>>> for (unsigned int i = 0; i < dimension; i++) > >>>>> { > >>>>> io->SetDimensions(i, size_p[i]); > >>>>> io->SetSpacing(i, spacing_p[i]); > >>>>> io->SetOrigin(i, origin_p[i]); > >>>>> } > >>>>> io->SetHeaderSize(0); > >>>>> io->SetByteOrderToLittleEndian(); > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > >>>>> io->SetNumberOfComponents(1); > >>>>> io->SetNumberOfDimensions(3); > >>>>> > >>>>> //create a writer and write reconstructed file > >>>>> itk::ImageFileWriter::Pointer writer; > >>>>> writer = itk::ImageFileWriter::New(); > >>>>> writer->SetFileName("D:\\Output.raw"); > >>>>> writer->SetImageIO(io); > >>>>> writer->SetInput(feldkamp->GetOutput()); > >>>>> > >>>>> try > >>>>> { > >>>>> writer->Update(); > >>>>> } > >>>>> catch (itk::ExceptionObject & excp) > >>>>> { > >>>>> std::cerr << "Error while writing the image " << std::endl; > >>>>> std::cerr << excp << std::endl; > >>>>> getchar(); > >>>>> } > >>>>> #pragma endregion "WriteVolume" > >>>>> delete[] angles; > >>>>> return 0; > >>>>> } > >>>>> > >>>>> > >>>>> > >>>>> Thanks & Regards > >>>>> > >>>>> Zahid Hasan Ansari > >>>>> Senior Design Engineer > >>>>> Mobile No. +91-9738379729 > >>>>> > >>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > >>>> http://www.panaceamedical.com > >>>>> Bangalore - India. > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> ----- Original Message ----- > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > >> Rit > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>> > >>>>> > >>>>>> Dear Zahid, > >>>>>> > >>>>>> I was able to perform a reconstruction from your header and geometry > >>>>>> file, using the following command lines: > >>>>>> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > >>>>>> --phantomscale "128,128,128" --like Output.mhd > >>>>>> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > >> --hardware > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > >>>>>> > >>>>>> The first computes projections through a Shepp & Logan phantom, with > >> the > >>>>>> same size, spacing, origin, etc... as your projections, using your > >>>>>> geometry file geo.xml. > >>>>>> > >>>>>> The second line performs the FDK reconstruction. I had to use both > the > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > (3GB, > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > by > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > >>>>>> parts, reconstructs them one by one, then assembles the results. Can > >> you > >>>>>> run the same commands and let us know whether you still encounter the > >>>>>> crash you mentioned ? If it works, you can use your own projection > data > >>>>>> in the second command line instead of "simulatedprojections.mha". > >>>>>> > >>>>>> Best, > >>>>>> > >>>>>> Cyril > >>>>>> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > >>>>>> > >>>>>>> Dear Sir, > >>>>>>> > >>>>>>> Please find the Header file in the attachment. > >>>>>>> > >>>>>>> > >>>>>>> Thanks & Regards > >>>>>>> > >>>>>>> Zahid Hasan Ansari > >>>>>>> > >>>>>>> > >>>>>>> ----- Original Message ----- > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > >>>> Rit > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>> > >>>>>>> > >>>>>>>> Dear Zahid, > >>>>>>>> > >>>>>>>> We do not need the projections file, at least not for a first stage > >> of > >>>>>>>> error tracking. We only need the header. > >>>>>>>> Try the following command line: > >>>>>>>> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > >>>>>>>> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" file > is > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > >> contains > >>>>>>>> the pixel values, but at the moment we do not need them. We will > >> create > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough to > >>>>>>>> track down the error you encounter. > >>>>>>>> > >>>>>>>> Looking forward to receiving your file, > >>>>>>>> Cyril > >>>>>>>> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > >>>>>>>>> Dear Sir, > >>>>>>>>> > >>>>>>>>> The single raw file of the projections is 1.4 GB > and > >> we > >>>> are > >>>>>> not > >>>>>>>> able to send this big file to you. Can you please suggest other > >>>>>> alternatives > >>>>>>>> for this? > >>>>>>>>> Or can you provide us the PC configuration to solve > >> the > >>>>>> issue? > >>>>>>>>> Let me know if any other clarification is required. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> Thanks & Regards > >>>>>>>>> > >>>>>>>>> Zahid Hasan Ansari > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> ----- Original Message ----- > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >> Simon > >>>>>> Rit > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>> Hello Zahid, > >>>>>>>>>> > >>>>>>>>>> We will need the header of your projections file, too (It is best > >> if > >>>>>> you > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > file, > >> so > >>>>>> it > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > >>>>>>>>>> > >>>>>>>>>> Regards, > >>>>>>>>>> Cyril > >>>>>>>>>> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>> Dear Cyril Mory, > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> I have only used RTK version 1.3.0. but in > the > >>>> error > >>>>>>>>>> message it is showing RTK version 1.2.0. > >>>>>>>>>>> Please find the attachment of the geometry > >> file > >>>> of > >>>>>> our > >>>>>>>>>> projections. > >>>>>>>>>>> Thanks & Regards > >>>>>>>>>>> > >>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > >>>>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > >>>> Simon > >>>>>>>> Rit > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > >>>> source > >>>>>> of > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > >>>>>> therefore > >>>>>>>>>>>> yourself): > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > changes > >> in > >>>>>> the > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so your > >>>>>> problem > >>>>>>>>>>>> might disappear just by upgrading to the new version > >>>>>>>>>>>> - create a small example that reproduces your problem. You can, > >> for > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > >> logan > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look at > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > an > >>>>>>>>>>>> example). And send us the script > >>>>>>>>>>>> - OR send us your geometry file and the header of your > >> projections > >>>>>> file > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > >>>>>> zero-filled > >>>>>>>>>>>> stack of projections), and the command line that crashes > >>>>>>>>>>>> > >>>>>>>>>>>> Best regards, > >>>>>>>>>>>> Cyril > >>>>>>>>>>>> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > >>>>>>>>>>>>> Dear Simon Rit, > >>>>>>>>>>>>> > >>>>>>>>>>>>> Please find the screen shot in the > >> attachment. > >>>>>>>>>>>>> > >>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>> > >>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url > : > >>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> ----- Original Message ----- > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > >>>>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com] > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > >>>>>>>> [mailto:rtk-users at public.kitware.com], > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>>> Dear Zahid, > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is a > >> CUDA > >>>>>>>>>> memory > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > >> first > >>>>>> make > >>>>>>>>>>>> sure > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > >> images. > >>>>>> If > >>>>>>>> it > >>>>>>>>>>>> is > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > --divisions. > >>>> The > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > use > >>>> of > >>>>>>>> RTK > >>>>>>>>>> on > >>>>>>>>>>>>>> our case studies webpage > >>>>>>>>>>>> . > >>>>>>>>>>>>>> Simon > >>>>>>>>>>>>>> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > >>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Dear Sir\Madam, > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > >>>>>> reconstruction > >>>>>>>>>> using > >>>>>>>>>>>> RTK > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > screen > >>>>>> shoot > >>>>>>>> of > >>>>>>>>>>>>>>> the > >>>>>>>>>>>>>>>> same. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> I am using the following items given > >> below. > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > console > >>>>>>>> application > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > >>>>>>>>>>>>>>>> 5. CUDA 7. > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Please provide the solution of this > and > >> let > >>>> me > >>>>>>>> know > >>>>>>>>>> if > >>>>>>>>>>>>>> any > >>>>>>>>>>>>>>>> other clarification is required. > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Thanks & Regards > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > >>>>>>>>>>>>>>>> Senior Design Engineer > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > >>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > >> Url > >>>> : > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > >>>>>>>>>>>>>>>> Bangalore - India. > >>>>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >>>> Area > >>>>>>>>>> Phase > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >>>> Industrial > >>>>>>>>>> Area, > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>>>> ____________________________________________________________ > >>>>>>>>>>>>>>> ________________ > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> This email and any files transmitted with it are > confidential > >>>> and > >>>>>>>>>>>> intended > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom they > >> are > >>>>>>>>>>>> addressed. > >>>>>>>>>>>>>>> If you have received this email in error please notify the > >>>> system > >>>>>>>>>>>> manager. > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > email > >>>> are > >>>>>>>>>>>> solely > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > of > >>>> the > >>>>>>>>>>>> company. > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > >>>> attachments > >>>>>>>> for > >>>>>>>>>>>> the > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > >>>>>> damage > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> > >>>>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>>>>>> > >>>>>>>>>>>>> ________________________________________ > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > >> Area > >>>>>>>> Phase > >>>>>>>>>> 1, > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > >> Industrial > >>>>>>>> Area, > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>>>> > >>>>>>>>>>>>> This email and any files transmitted with it are confidential > >> and > >>>>>>>>>> intended > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > are > >>>>>>>>>> addressed. > >>>>>>>>>>>>> If you have received this email in error please notify the > >> system > >>>>>>>>>> manager. > >>>>>>>>>>>>> Please note that any views or opinions presented in this email > >> are > >>>>>>>>>> solely > >>>>>>>>>>>>> those of the author and do not necessarily represent those of > >> the > >>>>>>>>>> company. > >>>>>>>>>>>>> Finally, the recipient should check this email and any > >> attachments > >>>>>> for > >>>>>>>>>> the > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for any > >>>> damage > >>>>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> _______________________________________________ > >>>>>>>>>>>>> Rtk-users mailing list > >>>>>>>>>>>>> Rtk-users at public.kitware.com > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > >>>>>>>>>>> ________________________________________ > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > >>>>>> Phase > >>>>>>>> 1, > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > >>>>>> Area, > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>>>> > >>>>>>>>>>> This email and any files transmitted with it are confidential > and > >>>>>>>> intended > >>>>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>>>> addressed. > >>>>>>>>>>> If you have received this email in error please notify the > system > >>>>>>>> manager. > >>>>>>>>>>> Please note that any views or opinions presented in this email > are > >>>>>>>> solely > >>>>>>>>>>> those of the author and do not necessarily represent those of > the > >>>>>>>> company. > >>>>>>>>>>> Finally, the recipient should check this email and any > attachments > >>>> for > >>>>>>>> the > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > >> damage > >>>>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>>>> > >>>>>>>>> ________________________________________ > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >>>> Phase > >>>>>> 1, > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >>>> Area, > >>>>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>>>> Fax : + 91 80 42428710 > >>>>>>>>> Url : http://www.panaceamedical.com > >>>>>>>>> > >> > ____________________________________________________________________________ > >>>>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>>>> > >>>>>>>>> This email and any files transmitted with it are confidential and > >>>>>> intended > >>>>>>>>> solely for the use of the individual or entity to whom they are > >>>>>> addressed. > >>>>>>>>> If you have received this email in error please notify the system > >>>>>> manager. > >>>>>>>>> Please note that any views or opinions presented in this email are > >>>>>> solely > >>>>>>>>> those of the author and do not necessarily represent those of the > >>>>>> company. > >>>>>>>>> Finally, the recipient should check this email and any attachments > >> for > >>>>>> the > >>>>>>>>> presence of viruses. The company accepts no liability for any > damage > >>>>>>>>> caused by any virus transmitted by this email. > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>> ________________________________________ > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > >> Phase > >>>> 1, > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > >> Area, > >>>>>> Malur - 563130. Kolar District. INDIA. > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>>>> Fax : + 91 80 42428710 > >>>>>>> Url : http://www.panaceamedical.com > >>>>>>> > >> > ____________________________________________________________________________ > >>>>>>> PMT EMAIL DISCLAIMER: > >>>>>>> > >>>>>>> This email and any files transmitted with it are confidential and > >>>> intended > >>>>>>> solely for the use of the individual or entity to whom they are > >>>> addressed. > >>>>>>> If you have received this email in error please notify the system > >>>> manager. > >>>>>>> Please note that any views or opinions presented in this email are > >>>> solely > >>>>>>> those of the author and do not necessarily represent those of the > >>>> company. > >>>>>>> Finally, the recipient should check this email and any attachments > for > >>>> the > >>>>>>> presence of viruses. The company accepts no liability for any damage > >>>>>>> caused by any virus transmitted by this email. > >>>>>>> > >>>>> ________________________________________ > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > >> 1, > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > >>>> Malur - 563130. Kolar District. INDIA. > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > >>>>> Fax : + 91 80 42428710 > >>>>> Url : http://www.panaceamedical.com > >>>>> > >> > ____________________________________________________________________________ > >>>>> PMT EMAIL DISCLAIMER: > >>>>> > >>>>> This email and any files transmitted with it are confidential and > >> intended > >>>>> solely for the use of the individual or entity to whom they are > >> addressed. > >>>>> If you have received this email in error please notify the system > >> manager. > >>>>> Please note that any views or opinions presented in this email are > >> solely > >>>>> those of the author and do not necessarily represent those of the > >> company. > >>>>> Finally, the recipient should check this email and any attachments for > >> the > >>>>> presence of viruses. The company accepts no liability for any damage > >>>>> caused by any virus transmitted by this email. > >>>>> > >>>>> > >>>>> > >>>> > >>> ________________________________________ > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > >> Malur - 563130. Kolar District. INDIA. > >>> Tel : +91 80 4242 8700 / 2845 4785 > >>> Fax : + 91 80 42428710 > >>> Url : http://www.panaceamedical.com > >>> > >> > ____________________________________________________________________________ > >>> PMT EMAIL DISCLAIMER: > >>> > >>> This email and any files transmitted with it are confidential and > intended > >>> solely for the use of the individual or entity to whom they are > addressed. > >>> If you have received this email in error please notify the system > manager. > >>> Please note that any views or opinions presented in this email are > solely > >>> those of the author and do not necessarily represent those of the > company. > >>> Finally, the recipient should check this email and any attachments for > the > >>> presence of viruses. The company accepts no liability for any damage > >>> caused by any virus transmitted by this email. > >>> > >>> > >>> > >>> > >>> > >> > >> > > > > ________________________________________ > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > Malur - 563130. Kolar District. INDIA. > > > > Tel : +91 80 4242 8700 / 2845 4785 > > Fax : + 91 80 42428710 > > Url : http://www.panaceamedical.com > > > ____________________________________________________________________________ > > PMT EMAIL DISCLAIMER: > > > > This email and any files transmitted with it are confidential and intended > > solely for the use of the individual or entity to whom they are addressed. > > If you have received this email in error please notify the system manager. > > Please note that any views or opinions presented in this email are solely > > those of the author and do not necessarily represent those of the company. > > Finally, the recipient should check this email and any attachments for the > > presence of viruses. The company accepts no liability for any damage > > caused by any virus transmitted by this email. > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. From cyril.mory at creatis.insa-lyon.fr Thu Nov 3 02:23:25 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Thu, 3 Nov 2016 07:23:25 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <24189134.77160.1478140718379@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> Message-ID: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): {\begin{aligned}&\mathbf {r} _{0}:=\mathbf {b} -\mathbf {Ax} _{0}\\&\mathbf {p} _{0}:=\mathbf {r} _{0}\\&k:=0\\&{\hbox{repeat}}\\&\qquad \alpha _{k}:={\frac {\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}{\mathbf {p} _{k}^{\mathsf {T}}\mathbf {Ap} _{k}}}\\&\qquad \mathbf {x} _{k+1}:=\mathbf {x} _{k}+\alpha _{k}\mathbf {p} _{k}\\&\qquad \mathbf {r} _{k+1}:=\mathbf {r} _{k}-\alpha _{k}\mathbf {Ap} _{k}\\&\qquad {\hbox{if }}r_{k+1}{\hbox{ is sufficiently small then exit loop}}\\&\qquad \beta _{k}:={\frac {\mathbf {r} _{k+1}^{\mathsf {T}}\mathbf {r} _{k+1}}{\mathbf {r} _{k}^{\mathsf {T}}\mathbf {r} _{k}}}\\&\qquad \mathbf {p} _{k+1}:=\mathbf {r} _{k+1}+\beta _{k}\mathbf {p} _{k}\\&\qquad k:=k+1\\&{\hbox{end repeat}}\\&{\hbox{The result is }}\mathbf {x} _{k+1}\end{aligned}} In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: > Hello Simon and Cyril, > Thanks for the reply. > You are right Simon. I did not notice it too in the literature. The > main problem as you said is the storage. Actually I developed the > conjugate gradient (CG), quasi-Newton and Newton optimization methods > for optical tomography and I intended to apply them to the CT > reconstruction as well. I implemented the Newton's methods > (Gauss-Newton and Levenberg-Marquardt) in a > Jacobian-Free-Newton-Krylov approaches to avoid the matrix > multiplication of Jacobians (sensitivity). It means we only need to > store the Jacobian matrix for the these methods (the matrix R that > Cyril was mentioned), that is still a big matrix for practical > problems in CT reconstruction. For the quasi-Newton I adapted an > L-BFGS algorithm that only need the 3 or 8 last iterations of the > gradient vector to calculate the Hessian matrix. In my case, the > L-BFGS and Newton's methods was much faster than the CG as you know > because of using the second order derivative (hessian matrix). I saw > in your last paper you implement the conjugate gradient method, so I > thought it might be easy to extract the gradient vector from CG > modules and solve the cost function within the quasi-Newton/Newton > methods. I will look at the codes to see what I can do. > Thanks again for the reply. > > @Cyril: > Please correct me if I am wrong. you mean the output of > backProjectionFilter is the gradient of defined cost function? > > Regards, > Vahid > > > On Wednesday, November 2, 2016 2:53 AM, Cyril Mory > wrote: > > > Hi Vahid, > Welcome to RTK :) > Indeed, there are several iterative methods already implemented in > RTK, but none of the filters allows you to easily extract the gradient > of the least squares function there are minimizing. > If you need to minimize the classical non-regularized tomographic cost > function, ie || R f - p ||?, with R the forward projection operator, f > the volume you are looking for, and p the measured projections, my > best advice would be to copy some part of the pipeline of > rtkSARTConeBeamReconstructionFilter to get the job done, ie the > following part (copy-paste this into webgraphviz.com) > > digraph SARTConeBeamReconstructionFilter { > > Input0 [ label="Input 0 (Volume)"]; > Input0 [shape=Mdiamond]; > Input1 [label="Input 1 (Projections)"]; > Input1 [shape=Mdiamond]; > > node [shape=box]; > ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref > rtk::ForwardProjectionImageFilter"]; > Extract [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref > itk::MultiplyImageFilter"]; > AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; > Subtract [ label="itk::SubtractImageFilter" URL="\ref > itk::SubtractImageFilter"]; > MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" > URL="\ref itk::MultiplyImageFilter"]; > Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref > itk::DivideOrZeroOutImageFilter"]; > GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" > URL="\ref itk::MultiplyImageFilter", style=dashed]; > Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref > rtk::DisplacedDetectorImageFilter"]; > ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref > itk::ExtractImageFilter"]; > RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref > rtk::RayBoxIntersectionImageFilter"]; > ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref > rtk::ConstantImageSource"]; > BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref > rtk::BackProjectionImageFilter"]; > OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; > OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; > BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; > Input0 -> OutofInput0 [arrowhead=none]; > OutofInput0 -> ForwardProject; > ConstantVolume -> BeforeBP [arrowhead=none]; > BeforeBP -> BackProjection; > Extract -> AfterExtract[arrowhead=none]; > AfterExtract -> MultiplyByZero; > AfterExtract -> Subtract; > MultiplyByZero -> ForwardProject; > Input1 -> Extract; > ForwardProject -> Subtract; > Subtract -> MultiplyByLambda; > MultiplyByLambda -> Divide; > Divide -> GatingWeight; > GatingWeight -> Displaced; > ConstantProjectionStack -> ExtractConstantProjection; > ExtractConstantProjection -> RayBox; > RayBox -> Divide; > Displaced -> BackProjection; > BackProjection -> OutofBP [arrowhead=none]; > } > > As you can see, it is a very large part of the SART reconstruction > filter, so yoiu might be better off just copying the whole > SARTConeBeamReconstructionFilter and modifying it. > > Of course, you could also look into ITK's cost function class, and see > if one of the classes inherited from it suits your needs, implement > your cost function this way, and use ITK's off-the-shelf solvers to > minimize it. See the inheritance diagram in > https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if > you want to try this approach. > > Best regards, > Cyril > > On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >> Hello RTK users and developers, >> >> I already implemented the RTK and reconstructed some images with the >> FDK algorithm implemented in RTK. It works well. Thanks to RTK >> developers. >> Now, I am trying to develop a model-based image reconstruction for >> our cone-beam micro-CT. I see already that some iterative algorithms >> like ART and its modifications and conjugate-gradient (CG) method are >> implemented in the RTK. I want to develop a model-based >> reconstruction through the Newton/quasi-Newton optimizations methods. >> I was wondering is it possible to extract the gradient of least >> square function from implemented algorithms like CG module? Any >> recommendation will be appreciated. >> >> Best Regards, >> Vahid >> >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From zahidhasan.a at panaceamedical.com Thu Nov 3 10:21:11 2016 From: zahidhasan.a at panaceamedical.com (Zahid Hasan Ansari) Date: Thu, 03 Nov 2016 14:21:11 +0000 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error Message-ID: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Dear Cyril Mory, We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. The RTKScatterGlareCorrectionImageFilter code is given below. //rtkLagCorrectionImageFilter typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); LagCorrection->SetInput(Projections); //rtkScatterGlareCorrectionImageFilter typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); Thanks & Regards Zahid Hasan Ansari ----- Original Message ----- From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > Dear Cyril Mory, > > > Thank you for your help. We are able to reconstruct 1024 > volume now. > > But the reconstruction time is around 4 minutes. Can you > please help us to reduce the reconstruction time? > > We are using NVIDIA TITAN X GPU which has 12 GB memory. > > > Thanks & Regards > > Zahid Hasan Ansari > > > > > ----- Original Message ----- > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit > [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > Dear Zahid, > > > > The output looks correct. > > > > If the command line solution I suggested in a previous email works, the > > best way to move forward would be to compare your code and that of > > rtkfdk.cxx, and where it differs, make sure you have not introduced an > > error. > > > > Cyril > > > > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: > > > Dear Cyril Mory, > > > > > > I have done the same but the Output.mhd file is still 0 > > KB for 1024 volume. Please find the attachment of the status of the output > > displayed. > > > > > > Please suggest us for further process. > > > > > > > > > Thanks & Regards > > > > > > Zahid Hasan Ansari > > > > > > > > > > > > > > > ----- Original Message ----- > > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > Rit > > [mailto:simon.rit at creatis.insa-lyon.fr] > > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > > > > > > > >> I see two errors: > > >> > > >> Remove this line > > >> > > >> writer->SetNumberOfStreamDivisions(4); > > >> > > >> since only the streaming filter, not the write filter, needs to know > > >> about the number of divisions. > > >> And change the filename to > > >> > > >> "D:\\Output.mhd" > > >> > > >> It will write both the .mhd and the .raw files. > > >> > > >> I hope it helps, > > >> Cyril > > >> > > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: > > >>> Dear Cyril Mory, > > >>> > > >>> I have modified my file writer code and used > > >> StreamingImageFilter. Now its not giving any error message but the > final > > >> output is 0 byte for 1024 volume. It working fine for 512 volume. > > >>> Please check my modified file writer code given > below. > > >>> > > >>> // Streaming depending on streaming capability of writer > > >>> typedef itk::StreamingImageFilter > > >> StreamerType; > > >>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>> streamerBP->SetInput(feldkamp->GetOutput()); > > >>> streamerBP->SetNumberOfStreamDivisions(4); > > >>> > > >>> //create a writer and write reconstructed file > > >>> itk::ImageFileWriter::Pointer writer; > > >>> writer = itk::ImageFileWriter::New(); > > >>> writer->SetFileName("D:\\Output.raw"); > > >>> writer->SetImageIO(io); > > >>> writer->SetInput(streamerBP->GetOutput()); > > >>> writer->SetNumberOfStreamDivisions(4); > > >>> > > >>> > > >>> Please let me know if any clarification is required. > > >>> > > >>> > > >>> Thanks & Regards > > >>> > > >>> Zahid Hasan Ansari > > >>> Senior Design Engineer > > >>> Mobile No. +91-9738379729 > > >>> > > >>> Panacea Medical Technologies Pvt. Ltd. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >> http://www.panaceamedical.com > > >>> Bangalore - India. > > >>> > > >>> > > >>> > > >>> > > >>> ----- Original Message ----- > > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon > > Rit > > >> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>> > > >>> > > >>>> Dear Zahid, > > >>>> > > >>>> The --divisions is an option of the command-line application rtkfdk. > It > > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : > > >>>> rather, it is passed to a streaming filter at the end of the > pipeline. > > >>>> Look for the following bit of code in rtkfdk.cxx : > > >>>> > > >>>> // Streaming depending on streaming capability of writer > > >>>> typedef itk::StreamingImageFilter > >>>> CPUOutputImageType> StreamerType; > > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); > > >>>> streamerBP->SetInput( pfeldkamp ); > > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg > ); > > >>>> > > >>>> You can find information on how a streaming filter works on this > page: > > >>>> > > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html > > >>>> > > >>>> I hope it helps, > > >>>> > > >>>> Cyril > > >>>> > > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: > > >>>>> Dear Cyril Mory, > > >>>>> > > >>>>> I have tried but I am not getting where to give > > >>>> --division 4 in my code. > > >>>>> Please find my code given below and please let me > > know > > >>>> where I need to change in my code to make it work. > > >>>>> int _tmain(int argc, _TCHAR* argv[]) > > >>>>> { > > >>>>> #pragma region "Variable declaration" > > >>>>> const double PI = 3.14159265358979323846; > > >>>>> float *angles; > > >>>>> int nProj = 349; > > >>>>> typedef unsigned short pixelType; > > >>>>> typedef float OutpixelType; > > >>>>> const int dimension = 3; > > >>>>> typedef itk::Image imageType; > > >>>>> typedef itk::ImageRegionConstIterator > ImageIteratorType; > > >>>>> imageType::Pointer Projections = imageType::New(); > > >>>>> > > >>>>> #pragma endregion "Variable declaration" > > >>>>> > > >>>>> Projections = > > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", > > >> nProj); > > >>>>> imageType::SpacingType pSpacing; > > >>>>> pSpacing[0] = 0.2960; > > >>>>> pSpacing[1] = 0.2960; > > >>>>> pSpacing[2] = 0.2960; > > >>>>> Projections->SetSpacing(pSpacing); > > >>>>> > > >>>>> imageType::PointType pOrigin; > > >>>>> pOrigin[0] = -212.972; > > >>>>> pOrigin[1] = -212.972; > > >>>>> pOrigin[2] = -212.972; //-158.50; > > >>>>> Projections->SetOrigin(pOrigin); > > >>>>> > > >>>>> Projections->Update(); > > >>>>> > > >>>>> //Read angles. > > >>>>> char *angles_file = > "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; > > >>>>> angles = new float[nProj]; > > >>>>> angles = readAngles(angles_file, angles); > > >>>>> > > >>>>> #pragma region"Geometry" > > >>>>> // Geometry object > > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; > > >>>>> GeometryType::Pointer geometry = GeometryType::New(); > > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) > > >>>>> { > > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, > 0, > > >> 0); > > >>>> // 136 half fan //2.07 Kidwai // > > >>>>> } > > >>>>> > > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter > > >>>> GeometryWriterType; > > >>>>> GeometryWriterType::Pointer geometryWriter = > > GeometryWriterType::New(); > > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); > > >>>>> geometryWriter->SetObject(geometry); > > >>>>> geometryWriter->WriteFile(); > > >>>>> geometry->Update(); > > >>>>> #pragma endregion "Geometry" > > >>>>> > > >>>>> //Define output image type > > >>>>> > > >>>>> #ifdef USE_CUDA > > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > > PSSFType; > > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; > > >>>>> #else > > >>>>> typedef itk::Image OutPutImageType; > > >>>>> typedef rtk::ParkerShortScanImageFilter > PSSFType; > > >>>>> typedef rtk::FDKConeBeamReconstructionFilter > > FDKType; > > >>>>> #endif > > >>>>> > > >>>>> //ScatterCorrection > > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter > imageType > > >>>> BoellaardScatterCorrectionImageFilterType; > > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer > ScatterCorrection > > = > > >>>> BoellaardScatterCorrectionImageFilterType::New(); > > >>>>> ScatterCorrection->SetInput(Projections); > > >>>>> > > >>>>> //VarianObiRawImageFilter > > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > > > >>>> RawImageFilterType; > > >>>>> RawImageFilterType::Pointer AttenuationFilter = > > >>>> RawImageFilterType::New(); > > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); > > >>>>> > > >>>>> //Create the output image > > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > > > >>>> ConstantImageSourceType; > > >>>>> ConstantImageSourceType::PointType origin_p; > > >>>>> ConstantImageSourceType::SizeType size_p; > > >>>>> ConstantImageSourceType::SpacingType spacing_p; > > >>>>> ConstantImageSourceType::Pointer projectionsSource = > > >>>> ConstantImageSourceType::New(); > > >>>>> origin_p[0] = -127.5; > > >>>>> origin_p[1] = -127.5; > > >>>>> origin_p[2] = -127.5; > > >>>>> size_p[0] = 512; > > >>>>> size_p[1] = 512; > > >>>>> size_p[2] = 512; > > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); > > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); > > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); > > >>>>> > > >>>>> projectionsSource->SetOrigin(origin_p); > > >>>>> projectionsSource->SetSpacing(spacing_p); > > >>>>> projectionsSource->SetSize(size_p); > > >>>>> projectionsSource->SetConstant(0); > > >>>>> > > >>>>> // Short scan image filter > > >>>>> PSSFType::Pointer pssf = PSSFType::New(); > > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); > > >>>>> pssf->SetGeometry(geometry); > > >>>>> pssf->InPlaceOff(); > > >>>>> std::cout << "short scan image filter success" << std::endl; > > >>>>> > > >>>>> FDKType::Pointer feldkamp = FDKType::New(); > > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); > > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); > > >>>>> feldkamp->SetGeometry(geometry); > > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); > > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); > > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); > > >>>>> feldkamp->SetGPUEnabled(1); > > >>>>> feldkamp->SetNumberOfThreads(10000); > > >>>>> > > >>>>> #pragma region "Write volume" > > >>>>> > > >>>>> //Create a raw io for writing > > >>>>> > > >>>>> itk::RawImageIO::Pointer io; > > >>>>> io = itk::RawImageIO::New(); > > >>>>> > > >>>>> for (unsigned int i = 0; i < dimension; i++) > > >>>>> { > > >>>>> io->SetDimensions(i, size_p[i]); > > >>>>> io->SetSpacing(i, spacing_p[i]); > > >>>>> io->SetOrigin(i, origin_p[i]); > > >>>>> } > > >>>>> io->SetHeaderSize(0); > > >>>>> io->SetByteOrderToLittleEndian(); > > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); > > >>>>> io->SetNumberOfComponents(1); > > >>>>> io->SetNumberOfDimensions(3); > > >>>>> > > >>>>> //create a writer and write reconstructed file > > >>>>> itk::ImageFileWriter::Pointer writer; > > >>>>> writer = itk::ImageFileWriter::New(); > > >>>>> writer->SetFileName("D:\\Output.raw"); > > >>>>> writer->SetImageIO(io); > > >>>>> writer->SetInput(feldkamp->GetOutput()); > > >>>>> > > >>>>> try > > >>>>> { > > >>>>> writer->Update(); > > >>>>> } > > >>>>> catch (itk::ExceptionObject & excp) > > >>>>> { > > >>>>> std::cerr << "Error while writing the image " << std::endl; > > >>>>> std::cerr << excp << std::endl; > > >>>>> getchar(); > > >>>>> } > > >>>>> #pragma endregion "WriteVolume" > > >>>>> delete[] angles; > > >>>>> return 0; > > >>>>> } > > >>>>> > > >>>>> > > >>>>> > > >>>>> Thanks & Regards > > >>>>> > > >>>>> Zahid Hasan Ansari > > >>>>> Senior Design Engineer > > >>>>> Mobile No. +91-9738379729 > > >>>>> > > >>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : > > >>>> http://www.panaceamedical.com > > >>>>> Bangalore - India. > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> ----- Original Message ----- > > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > Simon > > >> Rit > > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>> > > >>>>> > > >>>>>> Dear Zahid, > > >>>>>> > > >>>>>> I was able to perform a reconstruction from your header and > geometry > > >>>>>> file, using the following command lines: > > >>>>>> > > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml > > >>>>>> --phantomscale "128,128,128" --like Output.mhd > > >>>>>> > > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha > > >> --hardware > > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 > > >>>>>> > > >>>>>> The first computes projections through a Shepp & Logan phantom, > with > > >> the > > >>>>>> same size, spacing, origin, etc... as your projections, using your > > >>>>>> geometry file geo.xml. > > >>>>>> > > >>>>>> The second line performs the FDK reconstruction. I had to use both > > the > > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory > > (3GB, > > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory > > by > > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 > > >>>>>> parts, reconstructs them one by one, then assembles the results. > Can > > >> you > > >>>>>> run the same commands and let us know whether you still encounter > the > > >>>>>> crash you mentioned ? If it works, you can use your own projection > > data > > >>>>>> in the second command line instead of "simulatedprojections.mha". > > >>>>>> > > >>>>>> Best, > > >>>>>> > > >>>>>> Cyril > > >>>>>> > > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: > > >>>>>> > > >>>>>>> Dear Sir, > > >>>>>>> > > >>>>>>> Please find the Header file in the attachment. > > >>>>>>> > > >>>>>>> > > >>>>>>> Thanks & Regards > > >>>>>>> > > >>>>>>> Zahid Hasan Ansari > > >>>>>>> > > >>>>>>> > > >>>>>>> ----- Original Message ----- > > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > Simon > > >>>> Rit > > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>> > > >>>>>>> > > >>>>>>>> Dear Zahid, > > >>>>>>>> > > >>>>>>>> We do not need the projections file, at least not for a first > stage > > >> of > > >>>>>>>> error tracking. We only need the header. > > >>>>>>>> Try the following command line: > > >>>>>>>> > > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd > > >>>>>>>> > > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" > file > > is > > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" > > >> contains > > >>>>>>>> the pixel values, but at the moment we do not need them. We will > > >> create > > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough > to > > >>>>>>>> track down the error you encounter. > > >>>>>>>> > > >>>>>>>> Looking forward to receiving your file, > > >>>>>>>> Cyril > > >>>>>>>> > > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: > > >>>>>>>>> Dear Sir, > > >>>>>>>>> > > >>>>>>>>> The single raw file of the projections is 1.4 GB > > and > > >> we > > >>>> are > > >>>>>> not > > >>>>>>>> able to send this big file to you. Can you please suggest other > > >>>>>> alternatives > > >>>>>>>> for this? > > >>>>>>>>> Or can you provide us the PC configuration to > solve > > >> the > > >>>>>> issue? > > >>>>>>>>> Let me know if any other clarification is > required. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> Thanks & Regards > > >>>>>>>>> > > >>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> ----- Original Message ----- > > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], > > >> Simon > > >>>>>> Rit > > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>>> Hello Zahid, > > >>>>>>>>>> > > >>>>>>>>>> We will need the header of your projections file, too (It is > best > > >> if > > >>>>>> you > > >>>>>>>>>> have all your projections as a single .mhd and a single .raw > > file, > > >> so > > >>>>>> it > > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). > > >>>>>>>>>> > > >>>>>>>>>> Regards, > > >>>>>>>>>> Cyril > > >>>>>>>>>> > > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>> Dear Cyril Mory, > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> I have only used RTK version 1.3.0. but > in > > the > > >>>> error > > >>>>>>>>>> message it is showing RTK version 1.2.0. > > >>>>>>>>>>> Please find the attachment of the > geometry > > >> file > > >>>> of > > >>>>>> our > > >>>>>>>>>> projections. > > >>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>> > > >>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] > > >>>>>>>>>>> To: Zahid Hasan Ansari > [mailto:zahidhasan.a at panaceamedical.com], > > >>>> Simon > > >>>>>>>> Rit > > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, > saimahesh.m at panaceamedical.com > > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>> > > >>>>>>>>>>> > > >>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>> > > >>>>>>>>>>>> Without some more information, it's unlikely that we find the > > >>>> source > > >>>>>> of > > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and > > >>>>>> therefore > > >>>>>>>>>>>> yourself): > > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable > > changes > > >> in > > >>>>>> the > > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so > your > > >>>>>> problem > > >>>>>>>>>>>> might disappear just by upgrading to the new version > > >>>>>>>>>>>> - create a small example that reproduces your problem. You > can, > > >> for > > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp > > >> logan > > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look > at > > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need > > an > > >>>>>>>>>>>> example). And send us the script > > >>>>>>>>>>>> - OR send us your geometry file and the header of your > > >> projections > > >>>>>> file > > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a > > >>>>>> zero-filled > > >>>>>>>>>>>> stack of projections), and the command line that crashes > > >>>>>>>>>>>> > > >>>>>>>>>>>> Best regards, > > >>>>>>>>>>>> Cyril > > >>>>>>>>>>>> > > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: > > >>>>>>>>>>>>> Dear Simon Rit, > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Please find the screen shot in the > > >> attachment. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | > Url > > : > > >>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> ----- Original Message ----- > > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > > >>>>>>>>>>>>> To: Zahid Hasan Ansari > > [mailto:zahidhasan.a at panaceamedical.com] > > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com > > >>>>>>>> [mailto:rtk-users at public.kitware.com], > > >>>>>>>>>>>> saimahesh.m at panaceamedical.com > > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>>> Dear Zahid, > > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is > a > > >> CUDA > > >>>>>>>>>> memory > > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should > > >> first > > >>>>>> make > > >>>>>>>>>>>> sure > > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection > > >> images. > > >>>>>> If > > >>>>>>>> it > > >>>>>>>>>>>> is > > >>>>>>>>>>>>>> no sufficient, you can split your volume using the > > --divisions. > > >>>> The > > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. > > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the > > use > > >>>> of > > >>>>>>>> RTK > > >>>>>>>>>> on > > >>>>>>>>>>>>>> our case studies webpage > > >>>>>>>>>>>> . > > >>>>>>>>>>>>>> Simon > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < > > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: > > >>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Dear Sir\Madam, > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 > > >>>>>> reconstruction > > >>>>>>>>>> using > > >>>>>>>>>>>> RTK > > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the > > screen > > >>>>>> shoot > > >>>>>>>> of > > >>>>>>>>>>>>>>> the > > >>>>>>>>>>>>>>>> same. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> I am using the following items > given > > >> below. > > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 > > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 > > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit > > console > > >>>>>>>> application > > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. > > >>>>>>>>>>>>>>>> 5. CUDA 7. > > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. > > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Please provide the solution of this > > and > > >> let > > >>>> me > > >>>>>>>> know > > >>>>>>>>>> if > > >>>>>>>>>>>>>> any > > >>>>>>>>>>>>>>>> other clarification is required. > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Thanks & Regards > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Zahid Hasan Ansari > > >>>>>>>>>>>>>>>> Senior Design Engineer > > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 > > >>>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. > > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, > > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 > | > > >> Url > > >>>> : > > >>>>>>>>>>>>>>>> http://www.panaceamedical.com > > >>>>>>>>>>>>>>>> Bangalore - India. > > >>>>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, > EPIP > > >>>> Area > > >>>>>>>>>> Phase > > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >>>> Industrial > > >>>>>>>>>> Area, > > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>>>> > ____________________________________________________________ > > >>>>>>>>>>>>>>> ________________ > > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> This email and any files transmitted with it are > > confidential > > >>>> and > > >>>>>>>>>>>> intended > > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom > they > > >> are > > >>>>>>>>>>>> addressed. > > >>>>>>>>>>>>>>> If you have received this email in error please notify the > > >>>> system > > >>>>>>>>>>>> manager. > > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this > > email > > >>>> are > > >>>>>>>>>>>> solely > > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those > > of > > >>>> the > > >>>>>>>>>>>> company. > > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any > > >>>> attachments > > >>>>>>>> for > > >>>>>>>>>>>> the > > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for > > any > > >>>>>> damage > > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>>>>>> > > >>>>>>>>>>>>> ________________________________________ > > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > >> Area > > >>>>>>>> Phase > > >>>>>>>>>> 1, > > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > >> Industrial > > >>>>>>>> Area, > > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> This email and any files transmitted with it are > confidential > > >> and > > >>>>>>>>>> intended > > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they > > are > > >>>>>>>>>> addressed. > > >>>>>>>>>>>>> If you have received this email in error please notify the > > >> system > > >>>>>>>>>> manager. > > >>>>>>>>>>>>> Please note that any views or opinions presented in this > email > > >> are > > >>>>>>>>>> solely > > >>>>>>>>>>>>> those of the author and do not necessarily represent those > of > > >> the > > >>>>>>>>>> company. > > >>>>>>>>>>>>> Finally, the recipient should check this email and any > > >> attachments > > >>>>>> for > > >>>>>>>>>> the > > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for > any > > >>>> damage > > >>>>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> > > >>>>>>>>>>>>> _______________________________________________ > > >>>>>>>>>>>>> Rtk-users mailing list > > >>>>>>>>>>>>> Rtk-users at public.kitware.com > > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users > > >>>>>>>>>>> ________________________________________ > > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > > Area > > >>>>>> Phase > > >>>>>>>> 1, > > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > > Industrial > > >>>>>> Area, > > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>>>> > > >>>>>>>>>>> This email and any files transmitted with it are confidential > > and > > >>>>>>>> intended > > >>>>>>>>>>> solely for the use of the individual or entity to whom they > are > > >>>>>>>> addressed. > > >>>>>>>>>>> If you have received this email in error please notify the > > system > > >>>>>>>> manager. > > >>>>>>>>>>> Please note that any views or opinions presented in this email > > are > > >>>>>>>> solely > > >>>>>>>>>>> those of the author and do not necessarily represent those of > > the > > >>>>>>>> company. > > >>>>>>>>>>> Finally, the recipient should check this email and any > > attachments > > >>>> for > > >>>>>>>> the > > >>>>>>>>>>> presence of viruses. The company accepts no liability for any > > >> damage > > >>>>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>>>> > > >>>>>>>>> ________________________________________ > > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP > Area > > >>>> Phase > > >>>>>> 1, > > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB > Industrial > > >>>> Area, > > >>>>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>>>> Fax : + 91 80 42428710 > > >>>>>>>>> Url : http://www.panaceamedical.com > > >>>>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>>>> > > >>>>>>>>> This email and any files transmitted with it are confidential > and > > >>>>>> intended > > >>>>>>>>> solely for the use of the individual or entity to whom they are > > >>>>>> addressed. > > >>>>>>>>> If you have received this email in error please notify the > system > > >>>>>> manager. > > >>>>>>>>> Please note that any views or opinions presented in this email > are > > >>>>>> solely > > >>>>>>>>> those of the author and do not necessarily represent those of > the > > >>>>>> company. > > >>>>>>>>> Finally, the recipient should check this email and any > attachments > > >> for > > >>>>>> the > > >>>>>>>>> presence of viruses. The company accepts no liability for any > > damage > > >>>>>>>>> caused by any virus transmitted by this email. > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>>>> > > >>>>>>> ________________________________________ > > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > >> Phase > > >>>> 1, > > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > >> Area, > > >>>>>> Malur - 563130. Kolar District. INDIA. > > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>>>> Fax : + 91 80 42428710 > > >>>>>>> Url : http://www.panaceamedical.com > > >>>>>>> > > >> > > > ____________________________________________________________________________ > > >>>>>>> PMT EMAIL DISCLAIMER: > > >>>>>>> > > >>>>>>> This email and any files transmitted with it are confidential and > > >>>> intended > > >>>>>>> solely for the use of the individual or entity to whom they are > > >>>> addressed. > > >>>>>>> If you have received this email in error please notify the system > > >>>> manager. > > >>>>>>> Please note that any views or opinions presented in this email are > > >>>> solely > > >>>>>>> those of the author and do not necessarily represent those of the > > >>>> company. > > >>>>>>> Finally, the recipient should check this email and any attachments > > for > > >>>> the > > >>>>>>> presence of viruses. The company accepts no liability for any > damage > > >>>>>>> caused by any virus transmitted by this email. > > >>>>>>> > > >>>>> ________________________________________ > > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > > Phase > > >> 1, > > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > > Area, > > >>>> Malur - 563130. Kolar District. INDIA. > > >>>>> Tel : +91 80 4242 8700 / 2845 4785 > > >>>>> Fax : + 91 80 42428710 > > >>>>> Url : http://www.panaceamedical.com > > >>>>> > > >> > > > ____________________________________________________________________________ > > >>>>> PMT EMAIL DISCLAIMER: > > >>>>> > > >>>>> This email and any files transmitted with it are confidential and > > >> intended > > >>>>> solely for the use of the individual or entity to whom they are > > >> addressed. > > >>>>> If you have received this email in error please notify the system > > >> manager. > > >>>>> Please note that any views or opinions presented in this email are > > >> solely > > >>>>> those of the author and do not necessarily represent those of the > > >> company. > > >>>>> Finally, the recipient should check this email and any attachments > for > > >> the > > >>>>> presence of viruses. The company accepts no liability for any damage > > >>>>> caused by any virus transmitted by this email. > > >>>>> > > >>>>> > > >>>>> > > >>>> > > >>> ________________________________________ > > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area > Phase > > 1, > > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA > > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial > Area, > > >> Malur - 563130. Kolar District. INDIA. > > >>> Tel : +91 80 4242 8700 / 2845 4785 > > >>> Fax : + 91 80 42428710 > > >>> Url : http://www.panaceamedical.com > > >>> > > >> > > > ____________________________________________________________________________ > > >>> PMT EMAIL DISCLAIMER: > > >>> > > >>> This email and any files transmitted with it are confidential and > > intended > > >>> solely for the use of the individual or entity to whom they are > > addressed. > > >>> If you have received this email in error please notify the system > > manager. > > >>> Please note that any views or opinions presented in this email are > > solely > > >>> those of the author and do not necessarily represent those of the > > company. > > >>> Finally, the recipient should check this email and any attachments for > > the > > >>> presence of viruses. The company accepts no liability for any damage > > >>> caused by any virus transmitted by this email. > > >>> > > >>> > > >>> > > >>> > > >>> > > >> > > >> > > > > > > ________________________________________ > > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase > 1, > > Whitefield, Bangalore - 560 066, Karnataka, INDIA > > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, > > Malur - 563130. Kolar District. INDIA. > > > > > > Tel : +91 80 4242 8700 / 2845 4785 > > > Fax : + 91 80 42428710 > > > Url : http://www.panaceamedical.com > > > > > > ____________________________________________________________________________ > > > PMT EMAIL DISCLAIMER: > > > > > > This email and any files transmitted with it are confidential and > intended > > > solely for the use of the individual or entity to whom they are > addressed. > > > If you have received this email in error please notify the system > manager. > > > Please note that any views or opinions presented in this email are > solely > > > those of the author and do not necessarily represent those of the > company. > > > Finally, the recipient should check this email and any attachments for > the > > > presence of viruses. The company accepts no liability for any damage > > > caused by any virus transmitted by this email. > > > > > > > > > ________________________________________ PANACEA MEDICAL TECHNOLOGIES PVT. LTD. Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. Tel : +91 80 4242 8700 / 2845 4785 Fax : + 91 80 42428710 Url : http://www.panaceamedical.com ____________________________________________________________________________ PMT EMAIL DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. -------------- next part -------------- A non-text attachment was scrubbed... Name: ScatterGlareError.png Type: image/png Size: 121487 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 3 10:28:49 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 3 Nov 2016 15:28:49 +0100 Subject: [Rtk-users] Reg: CBCT 1k reconstruction error In-Reply-To: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> References: <20161103142111.091ecf0b@PMT-SER-2.panaceamedical.com> Message-ID: Hi, I think you should look at the applications before posting a question on the mailing list. There is a rtkscatterglarecorrection tool, look at rtkscatterglarecorrection.cxx. You must init the coefficients. I'll add a check to make the error message more readable but please, take the time to look at all the examples available in applications before posting a question. Thanks, Simon On Thu, Nov 3, 2016 at 3:21 PM, Zahid Hasan Ansari wrote: > Dear Cyril Mory, > > > We are using ScatterGlareCorrectionImageFilter in our code but the software is crashing. Please check in the screen shot. > > The RTKScatterGlareCorrectionImageFilter code is given below. > > //rtkLagCorrectionImageFilter > typedef rtk::LagCorrectionImageFilter LagCorrectionImageFilterType; > LagCorrectionImageFilterType::Pointer LagCorrection = LagCorrectionImageFilterType::New(); > LagCorrection->SetInput(Projections); > > //rtkScatterGlareCorrectionImageFilter > typedef rtk::ScatterGlareCorrectionImageFilter ScatterGlareCorrectionImageFilterType; > ScatterGlareCorrectionImageFilterType::Pointer ScatterGlareCorrection = ScatterGlareCorrectionImageFilterType::New(); > ScatterGlareCorrection->SetInput(LagCorrection->GetOutput()); > > > > > > Thanks & Regards > > Zahid Hasan Ansari > > > > ----- Original Message ----- > From: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com] > To: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr], Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error > > >> Dear Cyril Mory, >> >> >> Thank you for your help. We are able to reconstruct 1024 >> volume now. >> >> But the reconstruction time is around 4 minutes. Can you >> please help us to reduce the reconstruction time? >> >> We are using NVIDIA TITAN X GPU which has 12 GB memory. >> >> >> Thanks & Regards >> >> Zahid Hasan Ansari >> >> >> >> >> ----- Original Message ----- >> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon Rit >> [mailto:simon.rit at creatis.insa-lyon.fr] >> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> >> >> > Dear Zahid, >> > >> > The output looks correct. >> > >> > If the command line solution I suggested in a previous email works, the >> > best way to move forward would be to compare your code and that of >> > rtkfdk.cxx, and where it differs, make sure you have not introduced an >> > error. >> > >> > Cyril >> > >> > On 11/02/2016 02:37 PM, Zahid Hasan Ansari wrote: >> > > Dear Cyril Mory, >> > > >> > > I have done the same but the Output.mhd file is still 0 >> > KB for 1024 volume. Please find the attachment of the status of the output >> > displayed. >> > > >> > > Please suggest us for further process. >> > > >> > > >> > > Thanks & Regards >> > > >> > > Zahid Hasan Ansari >> > > >> > > >> > > >> > > >> > > ----- Original Message ----- >> > > From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > > To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> Rit >> > [mailto:simon.rit at creatis.insa-lyon.fr] >> > > Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > > Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > > >> > > >> > >> I see two errors: >> > >> >> > >> Remove this line >> > >> >> > >> writer->SetNumberOfStreamDivisions(4); >> > >> >> > >> since only the streaming filter, not the write filter, needs to know >> > >> about the number of divisions. >> > >> And change the filename to >> > >> >> > >> "D:\\Output.mhd" >> > >> >> > >> It will write both the .mhd and the .raw files. >> > >> >> > >> I hope it helps, >> > >> Cyril >> > >> >> > >> On 11/02/2016 11:57 AM, Zahid Hasan Ansari wrote: >> > >>> Dear Cyril Mory, >> > >>> >> > >>> I have modified my file writer code and used >> > >> StreamingImageFilter. Now its not giving any error message but the >> final >> > >> output is 0 byte for 1024 volume. It working fine for 512 volume. >> > >>> Please check my modified file writer code given >> below. >> > >>> >> > >>> // Streaming depending on streaming capability of writer >> > >>> typedef itk::StreamingImageFilter >> > >> StreamerType; >> > >>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>> streamerBP->SetInput(feldkamp->GetOutput()); >> > >>> streamerBP->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> //create a writer and write reconstructed file >> > >>> itk::ImageFileWriter::Pointer writer; >> > >>> writer = itk::ImageFileWriter::New(); >> > >>> writer->SetFileName("D:\\Output.raw"); >> > >>> writer->SetImageIO(io); >> > >>> writer->SetInput(streamerBP->GetOutput()); >> > >>> writer->SetNumberOfStreamDivisions(4); >> > >>> >> > >>> >> > >>> Please let me know if any clarification is required. >> > >>> >> > >>> >> > >>> Thanks & Regards >> > >>> >> > >>> Zahid Hasan Ansari >> > >>> Senior Design Engineer >> > >>> Mobile No. +91-9738379729 >> > >>> >> > >>> Panacea Medical Technologies Pvt. Ltd. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >> http://www.panaceamedical.com >> > >>> Bangalore - India. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> ----- Original Message ----- >> > >>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], Simon >> > Rit >> > >> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>> >> > >>> >> > >>>> Dear Zahid, >> > >>>> >> > >>>> The --divisions is an option of the command-line application rtkfdk. >> It >> > >>>> is not directly an option of the FDKConeBeamReconstructionFilter : >> > >>>> rather, it is passed to a streaming filter at the end of the >> pipeline. >> > >>>> Look for the following bit of code in rtkfdk.cxx : >> > >>>> >> > >>>> // Streaming depending on streaming capability of writer >> > >>>> typedef itk::StreamingImageFilter> > >>>> CPUOutputImageType> StreamerType; >> > >>>> StreamerType::Pointer streamerBP = StreamerType::New(); >> > >>>> streamerBP->SetInput( pfeldkamp ); >> > >>>> streamerBP->SetNumberOfStreamDivisions( args_info.divisions_arg >> ); >> > >>>> >> > >>>> You can find information on how a streaming filter works on this >> page: >> > >>>> >> > >>>> https://itk.org/Doxygen/html/classitk_1_1StreamingImageFilter.html >> > >>>> >> > >>>> I hope it helps, >> > >>>> >> > >>>> Cyril >> > >>>> >> > >>>> On 11/02/2016 09:01 AM, Zahid Hasan Ansari wrote: >> > >>>>> Dear Cyril Mory, >> > >>>>> >> > >>>>> I have tried but I am not getting where to give >> > >>>> --division 4 in my code. >> > >>>>> Please find my code given below and please let me >> > know >> > >>>> where I need to change in my code to make it work. >> > >>>>> int _tmain(int argc, _TCHAR* argv[]) >> > >>>>> { >> > >>>>> #pragma region "Variable declaration" >> > >>>>> const double PI = 3.14159265358979323846; >> > >>>>> float *angles; >> > >>>>> int nProj = 349; >> > >>>>> typedef unsigned short pixelType; >> > >>>>> typedef float OutpixelType; >> > >>>>> const int dimension = 3; >> > >>>>> typedef itk::Image imageType; >> > >>>>> typedef itk::ImageRegionConstIterator >> ImageIteratorType; >> > >>>>> imageType::Pointer Projections = imageType::New(); >> > >>>>> >> > >>>>> #pragma endregion "Variable declaration" >> > >>>>> >> > >>>>> Projections = >> > >>>> ReadRawImages("D:\\CBCT\\CIRS_1204020_25022016153227\\Proj_%d.raw", >> > >> nProj); >> > >>>>> imageType::SpacingType pSpacing; >> > >>>>> pSpacing[0] = 0.2960; >> > >>>>> pSpacing[1] = 0.2960; >> > >>>>> pSpacing[2] = 0.2960; >> > >>>>> Projections->SetSpacing(pSpacing); >> > >>>>> >> > >>>>> imageType::PointType pOrigin; >> > >>>>> pOrigin[0] = -212.972; >> > >>>>> pOrigin[1] = -212.972; >> > >>>>> pOrigin[2] = -212.972; //-158.50; >> > >>>>> Projections->SetOrigin(pOrigin); >> > >>>>> >> > >>>>> Projections->Update(); >> > >>>>> >> > >>>>> //Read angles. >> > >>>>> char *angles_file = >> "D:/CBCT/CIRS_1204020_25022016153227/angle.txt"; >> > >>>>> angles = new float[nProj]; >> > >>>>> angles = readAngles(angles_file, angles); >> > >>>>> >> > >>>>> #pragma region"Geometry" >> > >>>>> // Geometry object >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometry GeometryType; >> > >>>>> GeometryType::Pointer geometry = GeometryType::New(); >> > >>>>> for (unsigned int noProj = 0; noProj < nProj; noProj++) >> > >>>>> { >> > >>>>> geometry->AddProjection(1000.0, 1500.0, angles[noProj], 15.0, 10, >> 0, >> > >> 0); >> > >>>> // 136 half fan //2.07 Kidwai // >> > >>>>> } >> > >>>>> >> > >>>>> typedef rtk::ThreeDCircularProjectionGeometryXMLFileWriter >> > >>>> GeometryWriterType; >> > >>>>> GeometryWriterType::Pointer geometryWriter = >> > GeometryWriterType::New(); >> > >>>>> geometryWriter->SetFilename("D:\\geo.xml"); >> > >>>>> geometryWriter->SetObject(geometry); >> > >>>>> geometryWriter->WriteFile(); >> > >>>>> geometry->Update(); >> > >>>>> #pragma endregion "Geometry" >> > >>>>> >> > >>>>> //Define output image type >> > >>>>> >> > >>>>> #ifdef USE_CUDA >> > >>>>> typedef itk::CudaImage< OutpixelType, dimension > OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter< OutPutImageType > >> PSSFType; >> > >>>>> typedef rtk::CudaFDKConeBeamReconstructionFilter FDKType; >> > >>>>> #else >> > >>>>> typedef itk::Image OutPutImageType; >> > >>>>> typedef rtk::ParkerShortScanImageFilter >> PSSFType; >> > >>>>> typedef rtk::FDKConeBeamReconstructionFilter >> > FDKType; >> > >>>>> #endif >> > >>>>> >> > >>>>> //ScatterCorrection >> > >>>>> typedef rtk::BoellaardScatterCorrectionImageFilter> > imageType >> > >>>> BoellaardScatterCorrectionImageFilterType; >> > >>>>> BoellaardScatterCorrectionImageFilterType::Pointer >> ScatterCorrection >> > = >> > >>>> BoellaardScatterCorrectionImageFilterType::New(); >> > >>>>> ScatterCorrection->SetInput(Projections); >> > >>>>> >> > >>>>> //VarianObiRawImageFilter >> > >>>>> typedef rtk::VarianObiRawImageFilter< imageType, OutPutImageType > >> > >>>> RawImageFilterType; >> > >>>>> RawImageFilterType::Pointer AttenuationFilter = >> > >>>> RawImageFilterType::New(); >> > >>>>> AttenuationFilter->SetInput(ScatterCorrection->GetOutput()); >> > >>>>> >> > >>>>> //Create the output image >> > >>>>> typedef rtk::ConstantImageSource< OutPutImageType > >> > >>>> ConstantImageSourceType; >> > >>>>> ConstantImageSourceType::PointType origin_p; >> > >>>>> ConstantImageSourceType::SizeType size_p; >> > >>>>> ConstantImageSourceType::SpacingType spacing_p; >> > >>>>> ConstantImageSourceType::Pointer projectionsSource = >> > >>>> ConstantImageSourceType::New(); >> > >>>>> origin_p[0] = -127.5; >> > >>>>> origin_p[1] = -127.5; >> > >>>>> origin_p[2] = -127.5; >> > >>>>> size_p[0] = 512; >> > >>>>> size_p[1] = 512; >> > >>>>> size_p[2] = 512; >> > >>>>> spacing_p[0] = (origin_p[0] / size_p[0]) * 2 * (-1); >> > >>>>> spacing_p[1] = (origin_p[1] / size_p[1]) * 2 * (-1); >> > >>>>> spacing_p[2] = (origin_p[2] / size_p[2]) * 2 * (-1); >> > >>>>> >> > >>>>> projectionsSource->SetOrigin(origin_p); >> > >>>>> projectionsSource->SetSpacing(spacing_p); >> > >>>>> projectionsSource->SetSize(size_p); >> > >>>>> projectionsSource->SetConstant(0); >> > >>>>> >> > >>>>> // Short scan image filter >> > >>>>> PSSFType::Pointer pssf = PSSFType::New(); >> > >>>>> pssf->SetInput(AttenuationFilter->GetOutput()); >> > >>>>> pssf->SetGeometry(geometry); >> > >>>>> pssf->InPlaceOff(); >> > >>>>> std::cout << "short scan image filter success" << std::endl; >> > >>>>> >> > >>>>> FDKType::Pointer feldkamp = FDKType::New(); >> > >>>>> feldkamp->SetInput(0, projectionsSource->GetOutput()); >> > >>>>> feldkamp->SetInput(1, pssf->GetOutput()); >> > >>>>> feldkamp->SetGeometry(geometry); >> > >>>>> feldkamp->GetRampFilter()->SetTruncationCorrection(1.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHannCutFrequencyY(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetCosineCutFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetHammingFrequency(5.0); >> > >>>>> feldkamp->GetRampFilter()->SetRamLakCutFrequency(5.0); >> > >>>>> feldkamp->SetGPUEnabled(1); >> > >>>>> feldkamp->SetNumberOfThreads(10000); >> > >>>>> >> > >>>>> #pragma region "Write volume" >> > >>>>> >> > >>>>> //Create a raw io for writing >> > >>>>> >> > >>>>> itk::RawImageIO::Pointer io; >> > >>>>> io = itk::RawImageIO::New(); >> > >>>>> >> > >>>>> for (unsigned int i = 0; i < dimension; i++) >> > >>>>> { >> > >>>>> io->SetDimensions(i, size_p[i]); >> > >>>>> io->SetSpacing(i, spacing_p[i]); >> > >>>>> io->SetOrigin(i, origin_p[i]); >> > >>>>> } >> > >>>>> io->SetHeaderSize(0); >> > >>>>> io->SetByteOrderToLittleEndian(); >> > >>>>> io->SetPixelType(itk::ImageIOBase::SCALAR); >> > >>>>> io->SetNumberOfComponents(1); >> > >>>>> io->SetNumberOfDimensions(3); >> > >>>>> >> > >>>>> //create a writer and write reconstructed file >> > >>>>> itk::ImageFileWriter::Pointer writer; >> > >>>>> writer = itk::ImageFileWriter::New(); >> > >>>>> writer->SetFileName("D:\\Output.raw"); >> > >>>>> writer->SetImageIO(io); >> > >>>>> writer->SetInput(feldkamp->GetOutput()); >> > >>>>> >> > >>>>> try >> > >>>>> { >> > >>>>> writer->Update(); >> > >>>>> } >> > >>>>> catch (itk::ExceptionObject & excp) >> > >>>>> { >> > >>>>> std::cerr << "Error while writing the image " << std::endl; >> > >>>>> std::cerr << excp << std::endl; >> > >>>>> getchar(); >> > >>>>> } >> > >>>>> #pragma endregion "WriteVolume" >> > >>>>> delete[] angles; >> > >>>>> return 0; >> > >>>>> } >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> Thanks & Regards >> > >>>>> >> > >>>>> Zahid Hasan Ansari >> > >>>>> Senior Design Engineer >> > >>>>> Mobile No. +91-9738379729 >> > >>>>> >> > >>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | Url : >> > >>>> http://www.panaceamedical.com >> > >>>>> Bangalore - India. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>>> ----- Original Message ----- >> > >>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> Simon >> > >> Rit >> > >>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>> >> > >>>>> >> > >>>>>> Dear Zahid, >> > >>>>>> >> > >>>>>> I was able to perform a reconstruction from your header and >> geometry >> > >>>>>> file, using the following command lines: >> > >>>>>> >> > >>>>>> rtkprojectshepploganphantom -o simulatedprojections.mha -g geo.xml >> > >>>>>> --phantomscale "128,128,128" --like Output.mhd >> > >>>>>> >> > >>>>>> rtkfdk -p . -r simulatedprojections.mha -g geo.xml -o fdk.mha >> > >> --hardware >> > >>>>>> cuda --dimension 1024 --spacing 0.25 --lowmem --divisions 4 >> > >>>>>> >> > >>>>>> The first computes projections through a Shepp & Logan phantom, >> with >> > >> the >> > >>>>>> same size, spacing, origin, etc... as your projections, using your >> > >>>>>> geometry file geo.xml. >> > >>>>>> >> > >>>>>> The second line performs the FDK reconstruction. I had to use both >> > the >> > >>>>>> "--lowmem" and the "--divisions 4" since I have little GPU memory >> > (3GB, >> > >>>>>> on a Geforce GTX 780). "--lowmem" loads the projections into memory >> > by >> > >>>>>> subsets of 16. "--divisions 4" cuts the reconstructed volume into 4 >> > >>>>>> parts, reconstructs them one by one, then assembles the results. >> Can >> > >> you >> > >>>>>> run the same commands and let us know whether you still encounter >> the >> > >>>>>> crash you mentioned ? If it works, you can use your own projection >> > data >> > >>>>>> in the second command line instead of "simulatedprojections.mha". >> > >>>>>> >> > >>>>>> Best, >> > >>>>>> >> > >>>>>> Cyril >> > >>>>>> >> > >>>>>> On 10/25/2016 01:13 PM, Zahid Hasan Ansari wrote: >> > >>>>>> >> > >>>>>>> Dear Sir, >> > >>>>>>> >> > >>>>>>> Please find the Header file in the attachment. >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> Thanks & Regards >> > >>>>>>> >> > >>>>>>> Zahid Hasan Ansari >> > >>>>>>> >> > >>>>>>> >> > >>>>>>> ----- Original Message ----- >> > >>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > Simon >> > >>>> Rit >> > >>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>> >> > >>>>>>> >> > >>>>>>>> Dear Zahid, >> > >>>>>>>> >> > >>>>>>>> We do not need the projections file, at least not for a first >> stage >> > >> of >> > >>>>>>>> error tracking. We only need the header. >> > >>>>>>>> Try the following command line: >> > >>>>>>>> >> > >>>>>>>> rtkprojections -p . -r yourProjectionsFileName -o proj.mhd >> > >>>>>>>> >> > >>>>>>>> It should write a "proj.mhd" and a "proj.raw". The "proj.mhd" >> file >> > is >> > >>>>>>>> what we need, and it is a very light text file. The "proj.raw" >> > >> contains >> > >>>>>>>> the pixel values, but at the moment we do not need them. We will >> > >> create >> > >>>>>>>> our own proj.raw file, filled with zeros, which should be enough >> to >> > >>>>>>>> track down the error you encounter. >> > >>>>>>>> >> > >>>>>>>> Looking forward to receiving your file, >> > >>>>>>>> Cyril >> > >>>>>>>> >> > >>>>>>>> On 10/25/2016 09:22 AM, Zahid Hasan Ansari wrote: >> > >>>>>>>>> Dear Sir, >> > >>>>>>>>> >> > >>>>>>>>> The single raw file of the projections is 1.4 GB >> > and >> > >> we >> > >>>> are >> > >>>>>> not >> > >>>>>>>> able to send this big file to you. Can you please suggest other >> > >>>>>> alternatives >> > >>>>>>>> for this? >> > >>>>>>>>> Or can you provide us the PC configuration to >> solve >> > >> the >> > >>>>>> issue? >> > >>>>>>>>> Let me know if any other clarification is >> required. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> Thanks & Regards >> > >>>>>>>>> >> > >>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> ----- Original Message ----- >> > >>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>> To: Zahid Hasan Ansari [mailto:zahidhasan.a at panaceamedical.com], >> > >> Simon >> > >>>>>> Rit >> > >>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>> Cc: rtk-users at public.kitware.com, saimahesh.m at panaceamedical.com >> > >>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>>> Hello Zahid, >> > >>>>>>>>>> >> > >>>>>>>>>> We will need the header of your projections file, too (It is >> best >> > >> if >> > >>>>>> you >> > >>>>>>>>>> have all your projections as a single .mhd and a single .raw >> > file, >> > >> so >> > >>>>>> it >> > >>>>>>>>>> should be 3-D image, and you send only the .mhd file). >> > >>>>>>>>>> >> > >>>>>>>>>> Regards, >> > >>>>>>>>>> Cyril >> > >>>>>>>>>> >> > >>>>>>>>>> On 10/19/2016 03:18 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>> Dear Cyril Mory, >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> I have only used RTK version 1.3.0. but >> in >> > the >> > >>>> error >> > >>>>>>>>>> message it is showing RTK version 1.2.0. >> > >>>>>>>>>>> Please find the attachment of the >> geometry >> > >> file >> > >>>> of >> > >>>>>> our >> > >>>>>>>>>> projections. >> > >>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>> >> > >>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>> From: Cyril Mory [mailto:cyril.mory at creatis.insa-lyon.fr] >> > >>>>>>>>>>> To: Zahid Hasan Ansari >> [mailto:zahidhasan.a at panaceamedical.com], >> > >>>> Simon >> > >>>>>>>> Rit >> > >>>>>>>>>> [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>> Cc: rtk-users at public.kitware.com, >> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>> >> > >>>>>>>>>>> >> > >>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Without some more information, it's unlikely that we find the >> > >>>> source >> > >>>>>> of >> > >>>>>>>>>>>> the problem. Here are a few things you can do to help us (and >> > >>>>>> therefore >> > >>>>>>>>>>>> yourself): >> > >>>>>>>>>>>> - try version 1.3.0 of RTK: there have been considerable >> > changes >> > >> in >> > >>>>>> the >> > >>>>>>>>>>>> Cuda forward and back projection filters since v1.2.0, so >> your >> > >>>>>> problem >> > >>>>>>>>>>>> might disappear just by upgrading to the new version >> > >>>>>>>>>>>> - create a small example that reproduces your problem. You >> can, >> > >> for >> > >>>>>>>>>>>> example, simulate a geometry, simulate projections of a shepp >> > >> logan >> > >>>>>>>>>>>> phantom, and reconstruct from these projections (take a look >> at >> > >>>>>>>>>>>> http://wiki.openrtk.org/index.php/RTK/Scripts/FDK if you need >> > an >> > >>>>>>>>>>>> example). And send us the script >> > >>>>>>>>>>>> - OR send us your geometry file and the header of your >> > >> projections >> > >>>>>> file >> > >>>>>>>>>>>> (no need to send the projection data itself, we'll create a >> > >>>>>> zero-filled >> > >>>>>>>>>>>> stack of projections), and the command line that crashes >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> Best regards, >> > >>>>>>>>>>>> Cyril >> > >>>>>>>>>>>> >> > >>>>>>>>>>>> On 10/17/2016 02:27 PM, Zahid Hasan Ansari wrote: >> > >>>>>>>>>>>>> Dear Simon Rit, >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Please find the screen shot in the >> > >> attachment. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 | >> Url >> > : >> > >>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> ----- Original Message ----- >> > >>>>>>>>>>>>> From: Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr] >> > >>>>>>>>>>>>> To: Zahid Hasan Ansari >> > [mailto:zahidhasan.a at panaceamedical.com] >> > >>>>>>>>>>>>> Cc: rtk-users at public.kitware.com >> > >>>>>>>> [mailto:rtk-users at public.kitware.com], >> > >>>>>>>>>>>> saimahesh.m at panaceamedical.com >> > >>>>>>>>>>>>> Subject: Re: [Rtk-users] Reg: CBCT 1k reconstruction error >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>>> Dear Zahid, >> > >>>>>>>>>>>>>> There is no screenshot so I'm guessing that the problem is >> a >> > >> CUDA >> > >>>>>>>>>> memory >> > >>>>>>>>>>>>>> error. If you use the command line tool rtkfdk, you should >> > >> first >> > >>>>>> make >> > >>>>>>>>>>>> sure >> > >>>>>>>>>>>>>> that you use the --lowmem option to stream the projection >> > >> images. >> > >>>>>> If >> > >>>>>>>> it >> > >>>>>>>>>>>> is >> > >>>>>>>>>>>>>> no sufficient, you can split your volume using the >> > --divisions. >> > >>>> The >> > >>>>>>>>>>>>>> corresponding C++ code can be found in rtkfdk.cxx. >> > >>>>>>>>>>>>>> Is Panacea Medical using RTK? We are happy to advertise the >> > use >> > >>>> of >> > >>>>>>>> RTK >> > >>>>>>>>>> on >> > >>>>>>>>>>>>>> our case studies webpage >> > >>>>>>>>>>>> . >> > >>>>>>>>>>>>>> Simon >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>> On Sat, Oct 15, 2016 at 11:12 AM, Zahid Hasan Ansari < >> > >>>>>>>>>>>>>> zahidhasan.a at panaceamedical.com> wrote: >> > >>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Dear Sir\Madam, >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am unable to do 1024x1024x1024 >> > >>>>>> reconstruction >> > >>>>>>>>>> using >> > >>>>>>>>>>>> RTK >> > >>>>>>>>>>>>>>>> CudaFDKConeBeamReconstructionFilter. Please check the >> > screen >> > >>>>>> shoot >> > >>>>>>>> of >> > >>>>>>>>>>>>>>> the >> > >>>>>>>>>>>>>>>> same. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> I am using the following items >> given >> > >> below. >> > >>>>>>>>>>>>>>>> 1. RTK - RTK version 1.3 >> > >>>>>>>>>>>>>>>> 2. ITK - ITK version 4.7 >> > >>>>>>>>>>>>>>>> 3. Visual Studio 2013 win 64-bit >> > console >> > >>>>>>>> application >> > >>>>>>>>>>>>>>>> 4. GeForce GTX TITAN X GPU. >> > >>>>>>>>>>>>>>>> 5. CUDA 7. >> > >>>>>>>>>>>>>>>> 6. CMake version 3.4.3. >> > >>>>>>>>>>>>>>>> 7. Windows 7 64-bit OS. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Please provide the solution of this >> > and >> > >> let >> > >>>> me >> > >>>>>>>> know >> > >>>>>>>>>> if >> > >>>>>>>>>>>>>> any >> > >>>>>>>>>>>>>>>> other clarification is required. >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Thanks & Regards >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Zahid Hasan Ansari >> > >>>>>>>>>>>>>>>> Senior Design Engineer >> > >>>>>>>>>>>>>>>> Mobile No. +91-9738379729 >> > >>>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>>> Panacea Medical Technologies Pvt. Ltd. >> > >>>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> > EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, >> > >>>>>>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 | Fax : + 91 42428710 >> | >> > >> Url >> > >>>> : >> > >>>>>>>>>>>>>>>> http://www.panaceamedical.com >> > >>>>>>>>>>>>>>>> Bangalore - India. >> > >>>>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, >> EPIP >> > >>>> Area >> > >>>>>>>>>> Phase >> > >>>>>>>>>>>>>>> 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >>>> Industrial >> > >>>>>>>>>> Area, >> > >>>>>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>>>> >> ____________________________________________________________ >> > >>>>>>>>>>>>>>> ________________ >> > >>>>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> This email and any files transmitted with it are >> > confidential >> > >>>> and >> > >>>>>>>>>>>> intended >> > >>>>>>>>>>>>>>> solely for the use of the individual or entity to whom >> they >> > >> are >> > >>>>>>>>>>>> addressed. >> > >>>>>>>>>>>>>>> If you have received this email in error please notify the >> > >>>> system >> > >>>>>>>>>>>> manager. >> > >>>>>>>>>>>>>>> Please note that any views or opinions presented in this >> > email >> > >>>> are >> > >>>>>>>>>>>> solely >> > >>>>>>>>>>>>>>> those of the author and do not necessarily represent those >> > of >> > >>>> the >> > >>>>>>>>>>>> company. >> > >>>>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >>>> attachments >> > >>>>>>>> for >> > >>>>>>>>>>>> the >> > >>>>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> > any >> > >>>>>> damage >> > >>>>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>>>>>> >> > >>>>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > >> Area >> > >>>>>>>> Phase >> > >>>>>>>>>> 1, >> > >>>>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > >> Industrial >> > >>>>>>>> Area, >> > >>>>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> This email and any files transmitted with it are >> confidential >> > >> and >> > >>>>>>>>>> intended >> > >>>>>>>>>>>>> solely for the use of the individual or entity to whom they >> > are >> > >>>>>>>>>> addressed. >> > >>>>>>>>>>>>> If you have received this email in error please notify the >> > >> system >> > >>>>>>>>>> manager. >> > >>>>>>>>>>>>> Please note that any views or opinions presented in this >> email >> > >> are >> > >>>>>>>>>> solely >> > >>>>>>>>>>>>> those of the author and do not necessarily represent those >> of >> > >> the >> > >>>>>>>>>> company. >> > >>>>>>>>>>>>> Finally, the recipient should check this email and any >> > >> attachments >> > >>>>>> for >> > >>>>>>>>>> the >> > >>>>>>>>>>>>> presence of viruses. The company accepts no liability for >> any >> > >>>> damage >> > >>>>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> >> > >>>>>>>>>>>>> _______________________________________________ >> > >>>>>>>>>>>>> Rtk-users mailing list >> > >>>>>>>>>>>>> Rtk-users at public.kitware.com >> > >>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >> > >>>>>>>>>>> ________________________________________ >> > >>>>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> > Area >> > >>>>>> Phase >> > >>>>>>>> 1, >> > >>>>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> > Industrial >> > >>>>>> Area, >> > >>>>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>>>> >> > >>>>>>>>>>> This email and any files transmitted with it are confidential >> > and >> > >>>>>>>> intended >> > >>>>>>>>>>> solely for the use of the individual or entity to whom they >> are >> > >>>>>>>> addressed. >> > >>>>>>>>>>> If you have received this email in error please notify the >> > system >> > >>>>>>>> manager. >> > >>>>>>>>>>> Please note that any views or opinions presented in this email >> > are >> > >>>>>>>> solely >> > >>>>>>>>>>> those of the author and do not necessarily represent those of >> > the >> > >>>>>>>> company. >> > >>>>>>>>>>> Finally, the recipient should check this email and any >> > attachments >> > >>>> for >> > >>>>>>>> the >> > >>>>>>>>>>> presence of viruses. The company accepts no liability for any >> > >> damage >> > >>>>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>>>> >> > >>>>>>>>> ________________________________________ >> > >>>>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP >> Area >> > >>>> Phase >> > >>>>>> 1, >> > >>>>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB >> Industrial >> > >>>> Area, >> > >>>>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>>>> Fax : + 91 80 42428710 >> > >>>>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>>>> >> > >>>>>>>>> This email and any files transmitted with it are confidential >> and >> > >>>>>> intended >> > >>>>>>>>> solely for the use of the individual or entity to whom they are >> > >>>>>> addressed. >> > >>>>>>>>> If you have received this email in error please notify the >> system >> > >>>>>> manager. >> > >>>>>>>>> Please note that any views or opinions presented in this email >> are >> > >>>>>> solely >> > >>>>>>>>> those of the author and do not necessarily represent those of >> the >> > >>>>>> company. >> > >>>>>>>>> Finally, the recipient should check this email and any >> attachments >> > >> for >> > >>>>>> the >> > >>>>>>>>> presence of viruses. The company accepts no liability for any >> > damage >> > >>>>>>>>> caused by any virus transmitted by this email. >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>>>> >> > >>>>>>> ________________________________________ >> > >>>>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > >> Phase >> > >>>> 1, >> > >>>>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > >> Area, >> > >>>>>> Malur - 563130. Kolar District. INDIA. >> > >>>>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>>>> Fax : + 91 80 42428710 >> > >>>>>>> Url : http://www.panaceamedical.com >> > >>>>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>>>> PMT EMAIL DISCLAIMER: >> > >>>>>>> >> > >>>>>>> This email and any files transmitted with it are confidential and >> > >>>> intended >> > >>>>>>> solely for the use of the individual or entity to whom they are >> > >>>> addressed. >> > >>>>>>> If you have received this email in error please notify the system >> > >>>> manager. >> > >>>>>>> Please note that any views or opinions presented in this email are >> > >>>> solely >> > >>>>>>> those of the author and do not necessarily represent those of the >> > >>>> company. >> > >>>>>>> Finally, the recipient should check this email and any attachments >> > for >> > >>>> the >> > >>>>>>> presence of viruses. The company accepts no liability for any >> damage >> > >>>>>>> caused by any virus transmitted by this email. >> > >>>>>>> >> > >>>>> ________________________________________ >> > >>>>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>>>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> > Phase >> > >> 1, >> > >>>> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>>>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> > Area, >> > >>>> Malur - 563130. Kolar District. INDIA. >> > >>>>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>>>> Fax : + 91 80 42428710 >> > >>>>> Url : http://www.panaceamedical.com >> > >>>>> >> > >> >> > >> ____________________________________________________________________________ >> > >>>>> PMT EMAIL DISCLAIMER: >> > >>>>> >> > >>>>> This email and any files transmitted with it are confidential and >> > >> intended >> > >>>>> solely for the use of the individual or entity to whom they are >> > >> addressed. >> > >>>>> If you have received this email in error please notify the system >> > >> manager. >> > >>>>> Please note that any views or opinions presented in this email are >> > >> solely >> > >>>>> those of the author and do not necessarily represent those of the >> > >> company. >> > >>>>> Finally, the recipient should check this email and any attachments >> for >> > >> the >> > >>>>> presence of viruses. The company accepts no liability for any damage >> > >>>>> caused by any virus transmitted by this email. >> > >>>>> >> > >>>>> >> > >>>>> >> > >>>> >> > >>> ________________________________________ >> > >>> PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > >>> Head Office: Plot #119, GF, Envision Technology Center, EPIP Area >> Phase >> > 1, >> > >> Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > >>> Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial >> Area, >> > >> Malur - 563130. Kolar District. INDIA. >> > >>> Tel : +91 80 4242 8700 / 2845 4785 >> > >>> Fax : + 91 80 42428710 >> > >>> Url : http://www.panaceamedical.com >> > >>> >> > >> >> > >> ____________________________________________________________________________ >> > >>> PMT EMAIL DISCLAIMER: >> > >>> >> > >>> This email and any files transmitted with it are confidential and >> > intended >> > >>> solely for the use of the individual or entity to whom they are >> > addressed. >> > >>> If you have received this email in error please notify the system >> > manager. >> > >>> Please note that any views or opinions presented in this email are >> > solely >> > >>> those of the author and do not necessarily represent those of the >> > company. >> > >>> Finally, the recipient should check this email and any attachments for >> > the >> > >>> presence of viruses. The company accepts no liability for any damage >> > >>> caused by any virus transmitted by this email. >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > >> >> > >> >> > > >> > > ________________________________________ >> > > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. >> > > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase >> 1, >> > Whitefield, Bangalore - 560 066, Karnataka, INDIA >> > > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, >> > Malur - 563130. Kolar District. INDIA. >> > > >> > > Tel : +91 80 4242 8700 / 2845 4785 >> > > Fax : + 91 80 42428710 >> > > Url : http://www.panaceamedical.com >> > > >> > >> ____________________________________________________________________________ >> > > PMT EMAIL DISCLAIMER: >> > > >> > > This email and any files transmitted with it are confidential and >> intended >> > > solely for the use of the individual or entity to whom they are >> addressed. >> > > If you have received this email in error please notify the system >> manager. >> > > Please note that any views or opinions presented in this email are >> solely >> > > those of the author and do not necessarily represent those of the >> company. >> > > Finally, the recipient should check this email and any attachments for >> the >> > > presence of viruses. The company accepts no liability for any damage >> > > caused by any virus transmitted by this email. >> > > >> > >> > >> > > > > ________________________________________ > PANACEA MEDICAL TECHNOLOGIES PVT. LTD. > Head Office: Plot #119, GF, Envision Technology Center, EPIP Area Phase 1, Whitefield, Bangalore - 560 066, Karnataka, INDIA > Manufacturing Unit: Plot #87 A, Phase -II, Malur KIADB Industrial Area, Malur - 563130. Kolar District. INDIA. > > Tel : +91 80 4242 8700 / 2845 4785 > Fax : + 91 80 42428710 > Url : http://www.panaceamedical.com > ____________________________________________________________________________ > PMT EMAIL DISCLAIMER: > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager. > Please note that any views or opinions presented in this email are solely > those of the author and do not necessarily represent those of the company. > Finally, the recipient should check this email and any attachments for the > presence of viruses. The company accepts no liability for any damage > caused by any virus transmitted by this email. > From w_ettehadi at yahoo.com Thu Nov 3 16:10:31 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Thu, 3 Nov 2016 20:10:31 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> Message-ID: <1775591917.651990.1478203831679@mail.yahoo.com> OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right?About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question:I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards,Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e300dfefdbd374cdee765397528a65a5736a50d3 Type: image/svg+xml Size: 29828 bytes Desc: not available URL: From cyril.mory at creatis.insa-lyon.fr Fri Nov 4 02:31:18 2016 From: cyril.mory at creatis.insa-lyon.fr (Cyril Mory) Date: Fri, 4 Nov 2016 07:31:18 +0100 Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <1775591917.651990.1478203831679@mail.yahoo.com> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> Message-ID: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: > OK. good. Thank Cyril to clarify it to me. To implement the Newton's > methods instead of multiplication of R with R^T, we need the > multiplication of Jacobian/Sensitivity (R here) matrix with vector > variable (here x) and the gradient vector (here multiplication of R > with -r). I think it is possible to implement the Newton optimization > methods with the current modules as I think we could extract the R and > f dot product and R and r dot product. Am I right? > About the displayed algorithms, I think the gradient vector is dot > product of matrix A (Jacobian) with the minus residual vector (-r). > > One more question: > I already developed my codes in python. Do you think it is easy to > wrap your modules in python? I don't have experience in these subject. > > Regards, > Vahid > > > On Thursday, November 3, 2016 2:23 AM, Cyril Mory > wrote: > > > Hello Vahid, > Thank you for this insight on Newton's methods. Yes, the output of the > backprojection filter, in SART, is the gradient of the cost function. > You may have noticed that the pipeline performs a division of the > forward projection by something coming from > "RayBoxIntersectionFilter". This is to normalize the forward > projection, so that R^T R f ~= blurry f. If you don't do it, you'll > have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, > and your algorithm will quickly diverge. > You could try to extract the gradient from the conjugate gradient > filter as well, but it is significantly more tricky: first, the CG > filter was implemented from the following algorithm, taken from > wikipedia (which embeds the normalization I was mentioning earlier): > In this algorithm, it is not clear to me what exactly is the gradient > of the cost function. I would say it is something like "- r_k", but > I'm not sure. Second, as you see, the CG filter needs an operator A, > which may differ from one problem to another, so this operator is > implemented in a separate filter, which in your case would be > rtkReconstructionConjugateGradientOperator, with the laplacian > regularization parameter gamma set to 0. > Note that we never actually store the system matrix R. Instead, the > interpolation coefficient it contains are re-computed on the fly > everytime we forward project. And the same holds for backprojection, > i.e the matrix R^T. > Best, > Cyril > > On 11/03/2016 03:38 AM, vahid ettehadi wrote: >> Hello Simon and Cyril, >> Thanks for the reply. >> You are right Simon. I did not notice it too in the literature. The >> main problem as you said is the storage. Actually I developed the >> conjugate gradient (CG), quasi-Newton and Newton optimization methods >> for optical tomography and I intended to apply them to the CT >> reconstruction as well. I implemented the Newton's methods >> (Gauss-Newton and Levenberg-Marquardt) in a >> Jacobian-Free-Newton-Krylov approaches to avoid the matrix >> multiplication of Jacobians (sensitivity). It means we only need to >> store the Jacobian matrix for the these methods (the matrix R that >> Cyril was mentioned), that is still a big matrix for practical >> problems in CT reconstruction. For the quasi-Newton I adapted an >> L-BFGS algorithm that only need the 3 or 8 last iterations of the >> gradient vector to calculate the Hessian matrix. In my case, the >> L-BFGS and Newton's methods was much faster than the CG as you know >> because of using the second order derivative (hessian matrix). I saw >> in your last paper you implement the conjugate gradient method, so I >> thought it might be easy to extract the gradient vector from CG >> modules and solve the cost function within the quasi-Newton/Newton >> methods. I will look at the codes to see what I can do. >> Thanks again for the reply. >> >> @Cyril: >> Please correct me if I am wrong. you mean the output of >> backProjectionFilter is the gradient of defined cost function? >> >> Regards, >> Vahid >> >> >> On Wednesday, November 2, 2016 2:53 AM, Cyril Mory >> >> wrote: >> >> >> Hi Vahid, >> Welcome to RTK :) >> Indeed, there are several iterative methods already implemented in >> RTK, but none of the filters allows you to easily extract the >> gradient of the least squares function there are minimizing. >> If you need to minimize the classical non-regularized tomographic >> cost function, ie || R f - p ||?, with R the forward projection >> operator, f the volume you are looking for, and p the measured >> projections, my best advice would be to copy some part of the >> pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, >> ie the following part (copy-paste this into webgraphviz.com) >> >> digraph SARTConeBeamReconstructionFilter { >> >> Input0 [ label="Input 0 (Volume)"]; >> Input0 [shape=Mdiamond]; >> Input1 [label="Input 1 (Projections)"]; >> Input1 [shape=Mdiamond]; >> >> node [shape=box]; >> ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref >> rtk::ForwardProjectionImageFilter"]; >> Extract [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref >> itk::MultiplyImageFilter"]; >> AfterExtract [label="", fixedsize="false", width=0, height=0, >> shape=none]; >> Subtract [ label="itk::SubtractImageFilter" URL="\ref >> itk::SubtractImageFilter"]; >> MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" >> URL="\ref itk::MultiplyImageFilter"]; >> Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref >> itk::DivideOrZeroOutImageFilter"]; >> GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" >> URL="\ref itk::MultiplyImageFilter", style=dashed]; >> Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref >> rtk::DisplacedDetectorImageFilter"]; >> ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref >> itk::ExtractImageFilter"]; >> RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref >> rtk::RayBoxIntersectionImageFilter"]; >> ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref >> rtk::ConstantImageSource"]; >> BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref >> rtk::BackProjectionImageFilter"]; >> OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; >> OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; >> BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; >> Input0 -> OutofInput0 [arrowhead=none]; >> OutofInput0 -> ForwardProject; >> ConstantVolume -> BeforeBP [arrowhead=none]; >> BeforeBP -> BackProjection; >> Extract -> AfterExtract[arrowhead=none]; >> AfterExtract -> MultiplyByZero; >> AfterExtract -> Subtract; >> MultiplyByZero -> ForwardProject; >> Input1 -> Extract; >> ForwardProject -> Subtract; >> Subtract -> MultiplyByLambda; >> MultiplyByLambda -> Divide; >> Divide -> GatingWeight; >> GatingWeight -> Displaced; >> ConstantProjectionStack -> ExtractConstantProjection; >> ExtractConstantProjection -> RayBox; >> RayBox -> Divide; >> Displaced -> BackProjection; >> BackProjection -> OutofBP [arrowhead=none]; >> } >> >> As you can see, it is a very large part of the SART reconstruction >> filter, so yoiu might be better off just copying the whole >> SARTConeBeamReconstructionFilter and modifying it. >> >> Of course, you could also look into ITK's cost function class, and >> see if one of the classes inherited from it suits your needs, >> implement your cost function this way, and use ITK's off-the-shelf >> solvers to minimize it. See the inheritance diagram in >> https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if >> you want to try this approach. >> >> Best regards, >> Cyril >> >> On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: >>> Hello RTK users and developers, >>> >>> I already implemented the RTK and reconstructed some images with the >>> FDK algorithm implemented in RTK. It works well. Thanks to RTK >>> developers. >>> Now, I am trying to develop a model-based image reconstruction for >>> our cone-beam micro-CT. I see already that some iterative algorithms >>> like ART and its modifications and conjugate-gradient (CG) method >>> are implemented in the RTK. I want to develop a model-based >>> reconstruction through the Newton/quasi-Newton optimizations >>> methods. I was wondering is it possible to extract the gradient of >>> least square function from implemented algorithms like CG module? >>> Any recommendation will be appreciated. >>> >>> Best Regards, >>> Vahid >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users at public.kitware.com >>> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Fri Nov 4 16:42:08 2016 From: julien.jomier at kitware.com (Julien Jomier) Date: Fri, 4 Nov 2016 21:42:08 +0100 Subject: [Rtk-users] SimpleRTK + Matlab In-Reply-To: References: <06d4327e-9fd4-bf08-565d-5304f577b521@creatis.insa-lyon.fr> Message-ID: <89255846-9a06-a625-45f1-88d140c0013d@kitware.com> Hi Arvid, Sorry for the late reply. We successfully build the latest RTK with ITK 4.11.0 on Visual Studio 2013 with static libraries (BUILD_SHARED_LIBS set to OFF). I have just pushed a fix to SimpleRTK to build as shared libraries. Note that you would need to have ITK built as shared libraries as well. Let us know if you still have any issues, Julien On 23/09/2016 10:29, Arvid Piehl Lauritsen B?ttiger wrote: > > Hi again. > > I've been spending some more time with this, and feel I learned a little > bit more. I have now tested this on several machines with several > compiler versions (more or less all of them) and serveral cmake versions > - all with Windows 7. > > I can actually reproduce the successful build you linked to, but this > can only be done if you do not include any of the language wrappings, > like in the build you linked to. Enable any of them, and the build will > break. (see attachment) > > I suspect it must have been working in the past, but since none of them > are included in your test there have been a breaking change, and none of > them work anymore. > > I am still trying to tweak then projects manually to build SimpleRTK > with some sort of language support, but still without any luck. > > best > > Arvid > > On Tue, Sep 20, 2016 at 4:19 PM, Simon Rit > > > wrote: > > Hi, > Sorry, I won't be able to help but I'd advise to tick on WRAP_PYTHON > only at first in cmake, not the other languages (i.e., tick off > WRAP_LUA). > I can't solve your problem but Kitware is going to look into an > upgrade of SimpleRTK in the coming days, I'll ask them if they know > what is the issue. If you look here: > http://my.cdash.org/viewNotes.php?buildid=1052065 > > this is a nightly build of SimpleRTK on Windows and it seems to > work. I don't see why it wouldn't work for you. > Simon > > On Tue, Sep 20, 2016 at 2:17 PM, Arvid Piehl Lauritsen B?ttiger > > wrote: > > Hi again. > > I understand, but could you please help me get in contact with > the person who knows something about the windows build (if any), > I think there is something wrong. > > I have been investigating the build problems I had and found > that in the sub folder "SimpleRTK-build" there is a solutions > file with SimpleRTK. I opened it up and found the projects which > I had problems building: "SimpleRTKCommon", > "SimpleRTKBasicFilters0", "SimpleRTKBasicFilters1" etc. > > When I then tried to build SimpleRTKCommon manually it just > compiled without any problems. However, when I followed up by > building "SimpleRTKBasicFilters0" it gave me an error which > stated that it couldn't find "SimpleRTKCommon-0.9.lib" - which I > just build. > > After some more investigation I realized that the > SimpleRTKCommon is set to build a dynamic linked library (DLL), > and SimpleRTKBasicFilters0 expects it to be a static linked > library (LIB). After changing SimpleRTKCommon to be build as a > static library - and changing the output location - I could > build SimpleRTKBasicFilters0. > > However, SimpleRTKBasicFilters0 is also build as an DLL, but > changing that to a LIB as well I could build > SimpleRTKBasicFilters1, then SimpleRTKBasicFilters2 and then > SimpleRTKBasicFilters3. You get the point. > > I'm unsure if the intention is to build them as static or > dynamic libraries, but in any case the current build > configuration doesn't work - on my setup at least. > > However, I should note than for some reason the "lua5" project > did build successfully out of the box. Whatever it does > differently works. > > best > > Arvid > > > > On Tue, Sep 20, 2016 at 7:33 AM, Simon Rit > > wrote: > > I'm not an msvc specialist but your first line suggests that > you have pasted only part of the log: > > 20> Done Building Project > "C:\Users\aplb\Work\RTK\RTK1.2-bin-vs13\SimpleRTK-build\ALL_BUILD.vcxproj" > (default targets) -- FAILED. > > What you need to find out is why this build failed. If the > build fails, the linking cannot work. > Cheers, > Simon > > > On 19/09/2016 19:44, Arvid Piehl Lauritsen B?ttiger wrote: >> I did a complete rebuild, and here is the end of the >> output: http://pastebin.com/hvQ33WWg >> >> I have to admit I'm not sure what to make of it. I should >> note that I'm trying to compile the version I just pulled >> from git earlier today, since the other version I normally >> work with is really old. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 6:50 PM, Simon Rit >> > > wrote: >> >> SimpleRTKCommon is a library generated when compiling. >> Don't you have another error before that which >> explains why it did not compile? >> Simon >> >> On Mon, Sep 19, 2016 at 2:30 PM, Arvid Piehl Lauritsen >> B?ttiger > > wrote: >> >> Hi again. >> >> I've been trying to get it working. However, I did >> run into some problems compiling SimpleRTK. The >> main issue seems to be that it depends on >> SimpleRTKCommon - which I do not have. >> >> Here is the last few lines from VS2013 >> >> > 5>LINK : fatal error LNK1181: cannot open input >> file '..\..\..\lib\Debug\SimpleRTKCommon-0.9.lib' >> [C:\Users\aplb\Work\RTK\RTK1.2- >> > >> bin-vs13\SimpleRTK-build\Code\IO\src\SimpleRTKIO.vcxproj] >> > 5> >> > 5> 0 Warning(s) >> > 5> 2 Error(s) >> > 5> >> > 5> Time Elapsed 00:00:25.26 >> > ========== Build: 4 succeeded, 1 failed, 0 >> up-to-date, 0 skipped ========== >> >> I'm not quite sure what is going on, because the >> only reference I can find to SimpleRTKCommon is >> the CMakeLists.txt on github: >> https://github.com/SimonRit/RTK/blob/master/utilities/SimpleRTK/CMakeLists.txt >> >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:19 AM, Simon Rit >> > > wrote: >> >> The latest MacOS. It's nice if you can test it >> on other platforms, I'll try to run it on >> Linux but I have to upgrade matlab first (I >> think python calls are available starting with >> Matlab 2014). >> Simon >> >> On Mon, Sep 19, 2016 at 11:14 AM, Arvid Piehl >> Lauritsen B?ttiger > > wrote: >> >> Dear Simon >> >> This look very interesting! Which platform >> did you successfully execute this on? >> I will give it a try at once (on windows) >> and let you know if I run into any problems. >> >> best >> >> Arvid >> >> On Mon, Sep 19, 2016 at 11:05 AM, Simon >> Rit > > >> wrote: >> >> Dear RTK users, >> I have quickly tested calling the >> SimpleRTK python lib from Matlab and >> it seems to work well: >> http://wiki.openrtk.org/index.php/SimpleRTK#Matlab >> >> Therefore, I don't think we have to >> work on Matlab wrappings but let us >> know if you think otherwise. >> Future works include a simple >> installation mechanism for >> pre-compiled SimpleRTK libraries. >> We'll keep you posted! >> Simon >> >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> >> http://public.kitware.com/mailman/listinfo/rtk-users >> >> >> >> >> >> >> > > > > > > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > From w_ettehadi at yahoo.com Mon Nov 7 16:53:54 2016 From: w_ettehadi at yahoo.com (vahid ettehadi) Date: Mon, 7 Nov 2016 21:53:54 +0000 (UTC) Subject: [Rtk-users] Model-based image reconstruction based on the RTK modules In-Reply-To: <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> References: <1400014065.1872614.1478019012480.ref@mail.yahoo.com> <1400014065.1872614.1478019012480@mail.yahoo.com> <817623b9-b3a7-be46-d814-d05bb66658f1@creatis.insa-lyon.fr> <24189134.77160.1478140718379@mail.yahoo.com> <7618fb83-02d2-dd39-f892-beb74fa20063@creatis.insa-lyon.fr> <1775591917.651990.1478203831679@mail.yahoo.com> <6e5f8b05-b85f-53f2-a3c1-7dd7bd522fef@creatis.insa-lyon.fr> Message-ID: <1477848112.17731.1478555634307@mail.yahoo.com> Thanks Cyril for your time and advises. Vahid On Friday, November 4, 2016 2:31 AM, Cyril Mory wrote: Hi Vahid, It's becoming unclear to me, but I don't think you want to perform a dot product between a matrix and a vector. My advice: do the math, turn the equations into a pipeline (that's the tricky part) and try to copy some pieces of existing pipelines in RTK filters. And I don't recommend the rtkConjugateGradientFilter for this. Then run your pipeline with known data, and at every step where you have a known reference (e.g. from python code), compare the intermediate image you get with that reference. As for the python wrapping: I personally have no experience with writing python wrappings for RTK. It is supposed to be easily done, but only for full RTK filters. You cannot wrap part of a filter. So you will have to create your own filter, and only then wrap it in python. If I'm mistaken, please, RTK users, do correct me :) Regards, Cyril On 11/03/2016 09:10 PM, vahid ettehadi wrote: OK. good. Thank Cyril to clarify it to me. ?To implement the Newton's methods instead of multiplication of R with R^T, we need the multiplication of Jacobian/Sensitivity (R here) matrix with vector variable (here x) and the gradient vector (here multiplication of R with -r). I think it is possible to implement the Newton optimization methods with the current modules as I think we could extract the R and f dot product and R and r dot product. Am I right? About the displayed algorithms, I think the gradient vector is dot product of matrix A (Jacobian) with the minus residual vector (-r). ? One more question: I already developed my codes in python. Do you think it is easy to wrap your modules in python? I don't have experience in these subject. Regards, Vahid On Thursday, November 3, 2016 2:23 AM, Cyril Mory wrote: Hello Vahid, Thank you for this insight on Newton's methods. Yes, the output of the backprojection filter, in SART, is the gradient of the cost function. You may have noticed that the pipeline performs a division of the forward projection by something coming from "RayBoxIntersectionFilter". This is to normalize the forward projection, so that R^T R f ~= blurry f. If you don't do it, you'll have R^T R f ~= alpha * blurry f, with alpha that can reach 200 or so, and your algorithm will quickly diverge. You could try to extract the gradient from the conjugate gradient filter as well, but it is significantly more tricky: first, the CG filter was implemented from the following algorithm, taken from wikipedia (which embeds the normalization I was mentioning earlier): In this algorithm, it is not clear to me what exactly is the gradient of the cost function. I would say it is something like "- r_k", but I'm not sure. Second, as you see, the CG filter needs an operator A, which may differ from one problem to another, so this operator is implemented in a separate filter, which in your case would be rtkReconstructionConjugateGradientOperator, with the laplacian regularization parameter gamma set to 0. Note that we never actually store the system matrix R. Instead, the interpolation coefficient it contains are re-computed on the fly everytime we forward project. And the same holds for backprojection, i.e the matrix R^T. Best, Cyril On 11/03/2016 03:38 AM, vahid ettehadi wrote: Hello Simon and Cyril, Thanks for the reply. You are right Simon. I did not notice it too in the literature. The main problem as you said is the storage. Actually I developed ?the conjugate gradient (CG), quasi-Newton and Newton optimization methods for optical tomography and I intended to apply them to the CT reconstruction as well. I implemented the Newton's methods (Gauss-Newton and Levenberg-Marquardt) in a Jacobian-Free-Newton-Krylov approaches to avoid the matrix multiplication of Jacobians (sensitivity). It means we only need to store the Jacobian matrix for the these methods (the matrix R that Cyril was mentioned), that is still a big matrix for practical problems in CT reconstruction. For the quasi-Newton I adapted an L-BFGS algorithm that only need the 3 or 8 last iterations of the gradient vector to calculate the Hessian matrix. In my case, the L-BFGS and Newton's methods was much faster than?the CG as you know because of using the second order derivative (hessian matrix). I saw in your last paper you implement the conjugate gradient method, so I thought it might be easy to extract the gradient vector from CG modules and solve the cost function within the quasi-Newton/Newton methods. I will look at the codes to see what I can do. Thanks again for the reply. @Cyril: Please correct me if I am wrong. you mean the output of backProjectionFilter is the gradient of defined cost function? Regards, Vahid On Wednesday, November 2, 2016 2:53 AM, Cyril Mory wrote: Hi Vahid, Welcome to RTK :) Indeed, there are several iterative methods already implemented in RTK, but none of the filters allows you to easily extract the gradient of the least squares function there are minimizing. If you need to minimize the classical non-regularized tomographic cost function, ie || R f - p ||?, with R the forward projection operator, f the volume you are looking for, and p the measured projections, my best advice would be to copy some part of the pipeline of rtkSARTConeBeamReconstructionFilter to get the job done, ie the following part (copy-paste this into webgraphviz.com) digraph SARTConeBeamReconstructionFilter { Input0 [ label="Input 0 (Volume)"]; Input0 [shape=Mdiamond]; Input1 [label="Input 1 (Projections)"]; Input1 [shape=Mdiamond]; node [shape=box]; ForwardProject [ label="rtk::ForwardProjectionImageFilter" URL="\ref rtk::ForwardProjectionImageFilter"]; Extract [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; MultiplyByZero [ label="itk::MultiplyImageFilter (by zero)" URL="\ref itk::MultiplyImageFilter"]; AfterExtract [label="", fixedsize="false", width=0, height=0, shape=none]; Subtract [ label="itk::SubtractImageFilter" URL="\ref itk::SubtractImageFilter"]; MultiplyByLambda [ label="itk::MultiplyImageFilter (by lambda)" URL="\ref itk::MultiplyImageFilter"]; Divide [ label="itk::DivideOrZeroOutImageFilter" URL="\ref itk::DivideOrZeroOutImageFilter"]; GatingWeight [ label="itk::MultiplyImageFilter (by gating weight)" URL="\ref itk::MultiplyImageFilter", style=dashed]; Displaced [ label="rtk::DisplacedDetectorImageFilter" URL="\ref rtk::DisplacedDetectorImageFilter"]; ConstantProjectionStack [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; ExtractConstantProjection [ label="itk::ExtractImageFilter" URL="\ref itk::ExtractImageFilter"]; RayBox [ label="rtk::RayBoxIntersectionImageFilter" URL="\ref rtk::RayBoxIntersectionImageFilter"]; ConstantVolume [ label="rtk::ConstantImageSource" URL="\ref rtk::ConstantImageSource"]; BackProjection [ label="rtk::BackProjectionImageFilter" URL="\ref rtk::BackProjectionImageFilter"]; OutofInput0 [label="", fixedsize="false", width=0, height=0, shape=none]; OutofBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeBP [label="", fixedsize="false", width=0, height=0, shape=none]; BeforeAdd [label="", fixedsize="false", width=0, height=0, shape=none]; Input0 -> OutofInput0 [arrowhead=none]; OutofInput0 -> ForwardProject; ConstantVolume -> BeforeBP [arrowhead=none]; BeforeBP -> BackProjection; Extract -> AfterExtract[arrowhead=none]; AfterExtract -> MultiplyByZero; AfterExtract -> Subtract; MultiplyByZero -> ForwardProject; Input1 -> Extract; ForwardProject -> Subtract; Subtract -> MultiplyByLambda; MultiplyByLambda -> Divide; Divide -> GatingWeight; GatingWeight -> Displaced; ConstantProjectionStack -> ExtractConstantProjection; ExtractConstantProjection -> RayBox; RayBox -> Divide; Displaced -> BackProjection; BackProjection -> OutofBP [arrowhead=none]; } As you can see, it is a very large part of the SART reconstruction filter, so yoiu might be better off just copying the whole SARTConeBeamReconstructionFilter and modifying it. Of course, you could also look into ITK's cost function class, and see if one of the classes inherited from it suits your needs, implement your cost function this way, and use ITK's off-the-shelf solvers to minimize it. See the inheritance diagram in https://itk.org/Doxygen/html/classitk_1_1CostFunctionTemplate.html if you want to try this approach. Best regards, Cyril On 11/01/2016 05:50 PM, vahid ettehadi via Rtk-users wrote: Hello RTK users and developers, I already implemented the RTK and reconstructed some images with the FDK algorithm implemented in RTK. It works well. Thanks to RTK developers. Now, I am trying to develop a model-based image reconstruction for our cone-beam micro-CT. I see already that some iterative algorithms like ART and its modifications and conjugate-gradient (CG) method are implemented in the RTK. I want to develop a model-based reconstruction through the Newton/quasi-Newton optimizations methods. I was wondering is it possible to extract the gradient of least square function from implemented algorithms like CG module? Any recommendation will be appreciated.? Best Regards, Vahid _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Philipp.Freislederer at med.uni-muenchen.de Thu Nov 17 05:08:09 2016 From: Philipp.Freislederer at med.uni-muenchen.de (Freislederer, Philipp) Date: Thu, 17 Nov 2016 10:08:09 +0000 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac Message-ID: Dear all, I currently have some issues in generating off-plane projections where I think rtk might be helpful. I am trying to generate projections from an Brainlab ExacTrac geometry. What I am getting is a projection matrix generated by the system itself. Using only this information I am able to project any voxel value in a CT onto a panel. Now, in order to speed everything up a little and not re-implement everything that has been done sufficiently already I am hoping to use 'rtkforwardprojections'. The problem is I am not able to reproduce the Brainlab geometry using 'rtksimulatedgeometry' from the projection matrix directly. I could calculate the room angle of the source to the panel from the projection matrix but I am getting weird results when applying these on something like plastimatch, so I think I have an error in there. Is there a way of creating a geometry simply from the projection matrix or do I have to work around and calculate every parameter needed specifically? Maybe someone has some experience with this type of issue. Thanks in advance! Philipp -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 17 05:27:14 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 17 Nov 2016 11:27:14 +0100 Subject: [Rtk-users] RTK simulated geometry BrainLab ExacTrac In-Reply-To: References: Message-ID: Hi, Yes ! I have actually added that functionality recently from Thibault Notargiacomo's code see bool rtk::ThreeDCircularProjectionGeometry::AddProjection ( const HomogeneousProjectionMatrixType & pMat) Note that the projection matrix must be for a 3D position in mm to a 2D position in mm. You can add pre-/post-matrices to go from mm to voxel. There is no command line tool to do it but you can easily create your command line tool to do it. This is tested in testing/rtkgeometryfrommatrixtest.cxx. Let me know if you need more info, Simon On Thu, Nov 17, 2016 at 11:08 AM, Freislederer, Philipp < Philipp.Freislederer at med.uni-muenchen.de> wrote: > Dear all, > > > > I currently have some issues in generating off-plane projections where I > think rtk might be helpful. > > I am trying to generate projections from an Brainlab ExacTrac geometry. > > What I am getting is a projection matrix generated by the system itself. > Using only this information I am able to project any voxel value in a CT > onto a panel. > > Now, in order to speed everything up a little and not re-implement > everything that has been done sufficiently already I am hoping to use > ?rtkforwardprojections?. > > The problem is I am not able to reproduce the Brainlab geometry using > ?rtksimulatedgeometry? from the projection matrix directly. > > I could calculate the room angle of the source to the panel from the > projection matrix but I am getting weird results when applying these on > something like plastimatch, so I think I have an error in there. > > > > Is there a way of creating a geometry simply from the projection matrix or > do I have to work around and calculate every parameter needed specifically? > > Maybe someone has some experience with this type of issue. > > > > Thanks in advance! > > > > Philipp > > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Sat Nov 19 14:51:24 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Sat, 19 Nov 2016 19:51:24 +0000 Subject: [Rtk-users] Geometric calibration Message-ID: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ From simon.rit at creatis.insa-lyon.fr Tue Nov 22 02:01:19 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Tue, 22 Nov 2016 08:01:19 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: Message-ID: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper ). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > Hi RTK users, > > I'm interested in reconstructing images acquired by a fluoroscopy system > rotating around a knee phantom. Unfortunately, I've been unsuccessful so > far. I recognize some of the phantom in the reconstructed image, but it > contains double contours and the shape is deformed. > > I think the issue might be incorrect geometry specification. I have images > also including a phantom containing markers for which we know the > coordinates, which should allow us to calibrate the system. On the wiki on > image quality, I saw that some users had developed scripts to do the > calibration? Would someone be willing to share it? > > Kind regards, > Sepp > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > _______________________________________________ > Rtk-users mailing list > Rtk-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/rtk-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: after.pdf Type: application/pdf Size: 5974 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: before.pdf Type: application/pdf Size: 5678 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: calib.py Type: text/x-python Size: 2488 bytes Desc: not available URL: From simon.rit at creatis.insa-lyon.fr Wed Nov 23 12:44:11 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Wed, 23 Nov 2016 18:44:11 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Andreas, Today we had the RTK training and some users were looking for a XIM file reader. I pointed to your contributions but any chance to have it put in RTK soon? Thanks in advance, Simon On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit wrote: > Hi, > Thanks for sharing. There still seems to be some streak artefacts, do you > see the same in the Varian reconstruction? > I'm looking forward to the pull-request, I think we should try to make the > bzip2 optional. > Simon > > On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < > andreasg at phys.au.dk> wrote: > >> Thanks for the fast response Simon! >> >> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >> right all along! >> I just didn't get why it makes a difference. I think I do now, as the >> resulting image was flipped upside down and not left/right as I expected. >> [attached] >> >> The reconstruction is significantly better, I'll look into what should be >> included in the reader and what I should keep in my program to keep >> conformity with the other readers. Then I'll create a pull request. >> >> Just for the purpose of others hitting the same or a similar bug, I also >> attempted: >> I did the SART reconstruction with 10 iterations, lambda=0.3, and Joseph >> back/forward projection, *but with no* significant improvement [attached] >> >> And: >> If you want you can download the data set from: [Dropbox link to 460MB >> zip (I'll >> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >> is used along with the Scan.xml (Calibrations folder may be used in the >> future in my program, but I'm not sure if you can rely on the existence of >> the content). >> >> A MatLab XimReader is available: link >> (also >> available from Varian bitbucket along a with a python version and a >> C#->matlab plugin >> ). >> Otherwise my fork with the RTK-style reader is available from the same >> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >> so bzip2 is a new dependancy). >> >> Best regards >> Andreas >> >> >> __________________________________ >> >> Andreas Gravgaard Andersen >> >> Department of Oncology, >> >> Aarhus University Hospital >> >> N?rrebrogade 44, >> >> 8000, Aarhus C >> >> Mail: andreasg at phys.au.dk >> >> Cell: +45 3165 8140 >> >> >> >> 2016-09-16 16:13 GMT+02:00 Simon Rit : >> >>> Hi, >>> You can try any iterative reconstruction, they can also handle short >>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>> However, the nature of the artifacts indicate more a problem in the >>> geometry in my opinion. I have seen such errors when, for example, rotating >>> in the wrong direction. I can have a look if you share the dataset. >>> Cheers, >>> Simon >>> >>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>> andreasg at phys.au.dk> wrote: >>> >>>> Thanks for the suggestions, Simon and Cyril! >>>> >>>> I have been carefully looking though the geometry and from what I >>>> understand of the transformations matrices, the geometry looks correct/(as >>>> expected). >>>> >>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>> were because had used half-fan scans (full-arc). >>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>> artifacts occurs! >>>> >>>> Are there other (built-in) means of improving half-arc scans, than the >>>> parker short scan filter? >>>> >>>> Parker short scan does a decent job, but the result is still far from >>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>> >>>> Best regards >>>> Andreas >>>> >>>> >>>> __________________________________ >>>> >>>> Andreas Gravgaard Andersen >>>> >>>> Department of Oncology, >>>> >>>> Aarhus University Hospital >>>> >>>> N?rrebrogade 44, >>>> >>>> 8000, Aarhus C >>>> >>>> Mail: andreasg at phys.au.dk >>>> >>>> Cell: +45 3165 8140 >>>> >>>> >>>> >>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory : >>>> >>>>> One suggestion since it works with the Hnd projections: >>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>> Xim projections) and output two projection stack files and two geometry >>>>> files, then compare the projection stack files by subtracting one to the >>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>> are identical, then I do not see any reason why the reconstructions should >>>>> be different, so my guess is that you will find differences. >>>>> >>>>> >>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>> >>>>>> Hi, >>>>>> I have almost never worked with Varian data but it looks like a >>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>> projections which results in assigning a bad geometry to each >>>>>> projection. How did you name your projections? Maybe check that the >>>>>> order matches that of the RTK geometry file. Otherwise, there might be >>>>>> an issue in the creation of the geometry file itself. >>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>> code when you feel it's ready. >>>>>> Simon >>>>>> >>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>> wrote: >>>>>> >>>>>>> Dear RTK experts, >>>>>>> >>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>> format. I >>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>> available with RTK. >>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>> >>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>> in UI), >>>>>>> however when reconstructing with a regular FDK I get a reconstructed >>>>>>> image >>>>>>> that is smeared out around the high and low density areas [see >>>>>>> attached >>>>>>> image] >>>>>>> >>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>> Scripps >>>>>>> (~520 projections). Fixed detector and source (offset=0) with SID=2m, >>>>>>> SDD=3m. >>>>>>> >>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>> algorithm). >>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>> software works >>>>>>> perfectly. >>>>>>> >>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>> creates >>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>> If the first few projections are excluded, the following projection >>>>>>> will act >>>>>>> the same way. >>>>>>> >>>>>>> The projections are corrected for beam hardening and all the >>>>>>> projections >>>>>>> have the expected attenuation. >>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>> reconstruction >>>>>>> makes the same artifacts. >>>>>>> >>>>>>> Setting the value of the first and last projection to zero has the >>>>>>> same >>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>> not the >>>>>>> artifacts. >>>>>>> >>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>> >>>>>>> Best regards >>>>>>> Andreas >>>>>>> >>>>>>> __________________________________ >>>>>>> >>>>>>> Andreas Gravgaard Andersen >>>>>>> >>>>>>> Department of Oncology, >>>>>>> >>>>>>> Aarhus University Hospital >>>>>>> >>>>>>> N?rrebrogade 44, >>>>>>> >>>>>>> 8000, Aarhus C >>>>>>> >>>>>>> Mail: andreasg at phys.au.dk >>>>>>> >>>>>>> Cell: +45 3165 8140 >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> _______________________________________________ >>>>>> Rtk-users mailing list >>>>>> Rtk-users at public.kitware.com >>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at nrtxray.com Thu Nov 24 01:34:58 2016 From: sdr at nrtxray.com (Sepp de Raedt) Date: Thu, 24 Nov 2016 06:34:58 +0000 Subject: [Rtk-users] Geometric calibration In-Reply-To: References: , Message-ID: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Hi Simon, Thanks for the script. I was wondering if you could also share the csv or a dummy file? I'm unsure of what the second column contains. An offset distance to the rotation axis? Or the height? Which distance was known in your example? From the code it looks like the distance to the rotation axis? Sepp On 22 Nov 2016, at 08.01, Simon Rit > wrote: Hi Sepp, I did do a calibration script on a micro CT platform. The idea was that I had a bb taken from 4 different view points at 4 different heights with a known distance. Their projected position was segmented beforehand on the projections and I tried to match the projections by optimizing the calibration (which we see in before.pdf and after.pdf). I don't think it's a good script, e.g., because I tried to find 8 parameters when 7 are sufficient for my system (see, e.g., this paper). But this gives you a starting point to develop your own script which will hopefully be better. Please share if you do something from it! Thanks, Simon On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt > wrote: Hi RTK users, I'm interested in reconstructing images acquired by a fluoroscopy system rotating around a knee phantom. Unfortunately, I've been unsuccessful so far. I recognize some of the phantom in the reconstructed image, but it contains double contours and the shape is deformed. I think the issue might be incorrect geometry specification. I have images also including a phantom containing markers for which we know the coordinates, which should allow us to calibrate the system. On the wiki on image quality, I saw that some users had developed scripts to do the calibration? Would someone be willing to share it? Kind regards, Sepp ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ _______________________________________________ Rtk-users mailing list Rtk-users at public.kitware.com http://public.kitware.com/mailman/listinfo/rtk-users ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 24 01:44:42 2016 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 24 Nov 2016 07:44:42 +0100 Subject: [Rtk-users] Geometric calibration In-Reply-To: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> References: <78E5AE34-1DC6-4634-A5CC-CB46B7EF4398@nrtxray.com> Message-ID: Hi, Enclosed. Column 1 is platform angle, 2 is bb height, 3 is the u coordinate (in pixel) and 4 is the v coordinate (in pixel too). I had approximately measured the source-to-detector (270) and source-to-isocenter (210) distances but they were still optimized to have a better assessment. Simon On Thu, Nov 24, 2016 at 7:34 AM, Sepp de Raedt wrote: > Hi Simon, > > Thanks for the script. I was wondering if you could also share the csv or > a dummy file? I'm unsure of what the second column contains. An offset > distance to the rotation axis? Or the height? > > Which distance was known in your example? From the code it looks like the > distance to the rotation axis? > > Sepp > > On 22 Nov 2016, at 08.01, Simon Rit > wrote: > > Hi Sepp, > I did do a calibration script on a micro CT platform. The idea was that I > had a bb taken from 4 different view points at 4 different heights with a > known distance. Their projected position was segmented beforehand on the > projections and I tried to match the projections by optimizing the > calibration (which we see in before.pdf and after.pdf). I don't think it's > a good script, e.g., because I tried to find 8 parameters when 7 are > sufficient for my system (see, e.g., this paper > ). > But this gives you a starting point to develop your own script which will > hopefully be better. Please share if you do something from it! > Thanks, > Simon > > On Sat, Nov 19, 2016 at 8:51 PM, Sepp de Raedt wrote: > >> Hi RTK users, >> >> I'm interested in reconstructing images acquired by a fluoroscopy system >> rotating around a knee phantom. Unfortunately, I've been unsuccessful so >> far. I recognize some of the phantom in the reconstructed image, but it >> contains double contours and the shape is deformed. >> >> I think the issue might be incorrect geometry specification. I have >> images also including a phantom containing markers for which we know the >> coordinates, which should allow us to calibrate the system. On the wiki on >> image quality, I saw that some users had developed scripts to do the >> calibration? Would someone be willing to share it? >> >> Kind regards, >> Sepp >> >> ______________________________________________________________________ >> This email has been scanned by the Symantec Email Security.cloud service. >> For more information please visit http://www.symanteccloud.com >> ______________________________________________________________________ >> _______________________________________________ >> Rtk-users mailing list >> Rtk-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/rtk-users >> > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > > > > > > > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CentroidPositions_H5_to_H25_90degstep.csv Type: text/csv Size: 321 bytes Desc: not available URL: From andreasg at phys.au.dk Fri Nov 25 10:25:55 2016 From: andreasg at phys.au.dk (Andreas Gravgaard Andersen) Date: Fri, 25 Nov 2016 16:25:55 +0100 Subject: [Rtk-users] Fwd: Have you encountered this artifact? In-Reply-To: References: Message-ID: Dear Simon, I have created a pull-request with the XIM file reader. I'm sorry for being late with the promised pull-request (there were a lot of merge conflicts, so it got postponed). I have cleaned it up, but it is still not flawless as mentioned in the pull-request-message. I have tried to keep the RTK coding-style by creating it as a modified HND file reader, but I have only a year of experience with C++, so I apologize if I've left some ugly code in there.. Best regards Andreas __________________________________ Andreas Gravgaard Andersen Department of Oncology, Aarhus University Hospital N?rrebrogade 44, 8000, Aarhus C Mail: andreasg at phys.au.dk Cell: +45 3165 8140 2016-11-23 18:44 GMT+01:00 Simon Rit : > Dear Andreas, > Today we had the RTK training and some users were looking for a XIM file > reader. I pointed to your contributions but any chance to have it put in > RTK soon? > Thanks in advance, > Simon > > On Mon, Sep 19, 2016 at 9:26 AM, Simon Rit > wrote: > >> Hi, >> Thanks for sharing. There still seems to be some streak artefacts, do you >> see the same in the Varian reconstruction? >> I'm looking forward to the pull-request, I think we should try to make >> the bzip2 optional. >> Simon >> >> On Fri, Sep 16, 2016 at 10:37 PM, Andreas Gravgaard Andersen < >> andreasg at phys.au.dk> wrote: >> >>> Thanks for the fast response Simon! >>> >>> I flipped the angles (360 - angle[deg]) and it worked! Thanks, you were >>> right all along! >>> I just didn't get why it makes a difference. I think I do now, as the >>> resulting image was flipped upside down and not left/right as I expected. >>> [attached] >>> >>> The reconstruction is significantly better, I'll look into what should >>> be included in the reader and what I should keep in my program to keep >>> conformity with the other readers. Then I'll create a pull request. >>> >>> Just for the purpose of others hitting the same or a similar bug, I also >>> attempted: >>> I did the SART reconstruction with 10 iterations, lambda=0.3, and >>> Joseph back/forward projection, *but with no* significant improvement >>> [attached] >>> >>> And: >>> If you want you can download the data set from: [Dropbox link to 460MB >>> zip (I'll >>> keep it up as long as Dropbox allows me)] Only the Acquisitions/subfolder >>> is used along with the Scan.xml (Calibrations folder may be used in the >>> future in my program, but I'm not sure if you can rely on the existence of >>> the content). >>> >>> A MatLab XimReader is available: link >>> (also >>> available from Varian bitbucket along a with a python version and a >>> C#->matlab plugin >>> ). >>> Otherwise my fork with the RTK-style reader is available from the same >>> repository (I have also added Hnc support, thanks to the Geoff Hugo fork, >>> so bzip2 is a new dependancy). >>> >>> Best regards >>> Andreas >>> >>> >>> __________________________________ >>> >>> Andreas Gravgaard Andersen >>> >>> Department of Oncology, >>> >>> Aarhus University Hospital >>> >>> N?rrebrogade 44, >>> >>> 8000, Aarhus C >>> >>> Mail: andreasg at phys.au.dk >>> >>> Cell: +45 3165 8140 >>> >>> >>> >>> 2016-09-16 16:13 GMT+02:00 Simon Rit : >>> >>>> Hi, >>>> You can try any iterative reconstruction, they can also handle short >>>> scans. Start with a few iterations of rtksart or rtkconjugategradient. >>>> However, the nature of the artifacts indicate more a problem in the >>>> geometry in my opinion. I have seen such errors when, for example, rotating >>>> in the wrong direction. I can have a look if you share the dataset. >>>> Cheers, >>>> Simon >>>> >>>> On Fri, Sep 16, 2016 at 2:56 PM, Andreas Gravgaard Andersen < >>>> andreasg at phys.au.dk> wrote: >>>> >>>>> Thanks for the suggestions, Simon and Cyril! >>>>> >>>>> I have been carefully looking though the geometry and from what I >>>>> understand of the transformations matrices, the geometry looks correct/(as >>>>> expected). >>>>> >>>>> HOWEVER: I found out that the reason for the Hnd to behave differently >>>>> were because had used half-fan scans (full-arc). >>>>> When I used a full-fan (half-arc) scan of Hnd projections the same >>>>> artifacts occurs! >>>>> >>>>> Are there other (built-in) means of improving half-arc scans, than the >>>>> parker short scan filter? >>>>> >>>>> Parker short scan does a decent job, but the result is still far from >>>>> the quality of the Varian software reconstruction at least for the CatPhan. >>>>> >>>>> Best regards >>>>> Andreas >>>>> >>>>> >>>>> __________________________________ >>>>> >>>>> Andreas Gravgaard Andersen >>>>> >>>>> Department of Oncology, >>>>> >>>>> Aarhus University Hospital >>>>> >>>>> N?rrebrogade 44, >>>>> >>>>> 8000, Aarhus C >>>>> >>>>> Mail: andreasg at phys.au.dk >>>>> >>>>> Cell: +45 3165 8140 >>>>> >>>>> >>>>> >>>>> 2016-09-14 9:10 GMT+02:00 Cyril Mory >>>>> : >>>>> >>>>>> One suggestion since it works with the Hnd projections: >>>>>> You can run rtkprojections twice (with the Hnd projections, then with >>>>>> Xim projections) and output two projection stack files and two geometry >>>>>> files, then compare the projection stack files by subtracting one to the >>>>>> other (with SimpleRTK or clitk) and the geometry files with diff. If they >>>>>> are identical, then I do not see any reason why the reconstructions should >>>>>> be different, so my guess is that you will find differences. >>>>>> >>>>>> >>>>>> On 09/13/2016 10:18 PM, Simon Rit wrote: >>>>>> >>>>>>> Hi, >>>>>>> I have almost never worked with Varian data but it looks like a >>>>>>> geometry problem. Maybe the problem comes from a bad ordering of the >>>>>>> projections which results in assigning a bad geometry to each >>>>>>> projection. How did you name your projections? Maybe check that the >>>>>>> order matches that of the RTK geometry file. Otherwise, there might >>>>>>> be >>>>>>> an issue in the creation of the geometry file itself. >>>>>>> All this sounds good, happy bug hunt and don't hesitate to share your >>>>>>> code when you feel it's ready. >>>>>>> Simon >>>>>>> >>>>>>> On Tue, Sep 13, 2016 at 7:06 PM, Andreas Gravgaard Andersen >>>>>>> wrote: >>>>>>> >>>>>>>> Dear RTK experts, >>>>>>>> >>>>>>>> I am reconstructing Varian ProBeam projections of the Xim image >>>>>>>> format. I >>>>>>>> have written the reader myself - very similar to the Hnd one already >>>>>>>> available with RTK. >>>>>>>> Links to my fork: [XimReader, XMLReader, GeometryReader] >>>>>>>> >>>>>>>> The reader apparently works (Images and angles displays as expected >>>>>>>> in UI), >>>>>>>> however when reconstructing with a regular FDK I get a >>>>>>>> reconstructed image >>>>>>>> that is smeared out around the high and low density areas [see >>>>>>>> attached >>>>>>>> image] >>>>>>>> >>>>>>>> I'm using half arc, full fan images with no bow-tie filter from >>>>>>>> Scripps >>>>>>>> (~520 projections). Fixed detector and source (offset=0) with >>>>>>>> SID=2m, >>>>>>>> SDD=3m. >>>>>>>> >>>>>>>> For the Hnd projections the reconstruction works perfectly (Same >>>>>>>> algorithm). >>>>>>>> The reconstruction of the Xim projections performed on Varian >>>>>>>> software works >>>>>>>> perfectly. >>>>>>>> >>>>>>>> Without the Parker Short Scan Filter the first and last projections >>>>>>>> creates >>>>>>>> streaks across the reconstruction as if they were way too bright. >>>>>>>> If the first few projections are excluded, the following projection >>>>>>>> will act >>>>>>>> the same way. >>>>>>>> >>>>>>>> The projections are corrected for beam hardening and all the >>>>>>>> projections >>>>>>>> have the expected attenuation. >>>>>>>> No "smearing" filters (like median) is used, and iterative >>>>>>>> reconstruction >>>>>>>> makes the same artifacts. >>>>>>>> >>>>>>>> Setting the value of the first and last projection to zero has the >>>>>>>> same >>>>>>>> effect as excluding. Changing the ramp filter only changes noise, >>>>>>>> not the >>>>>>>> artifacts. >>>>>>>> >>>>>>>> Have any of you had a similar problem? Am I missing something? >>>>>>>> Any suggestions are welcome I'm running out of ideas. >>>>>>>> >>>>>>>> Best regards >>>>>>>> Andreas >>>>>>>> >>>>>>>> __________________________________ >>>>>>>> >>>>>>>> Andreas Gravgaard Andersen >>>>>>>> >>>>>>>> Department of Oncology, >>>>>>>> >>>>>>>> Aarhus University Hospital >>>>>>>> >>>>>>>> N?rrebrogade 44, >>>>>>>> >>>>>>>> 8000, Aarhus C >>>>>>>> >>>>>>>> Mail: andreasg at phys.au.dk >>>>>>>> >>>>>>>> Cell: +45 3165 8140 >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rtk-users mailing list >>>>>>>> Rtk-users at public.kitware.com >>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>> Rtk-users mailing list >>>>>>> Rtk-users at public.kitware.com >>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: