[Rtk-users] Back Projection

Adarsh S Sunil adarshto3 at gmail.com
Fri Aug 12 06:56:57 UTC 2022


Hi all,

      I'm a beginner in rtk. I want to use the forward and backward
projection in CT images.  For that I defined the RTK geometry object and
seriesIdContainer.

Then I read CT data and assign it to a reader and set it as inputImage.


*  while (seriesItr != seriesUID.end())*














*  {    seriesIdentifier = seriesItr->c_str();    seriesItr++;    std::cout
<< "\nReading: ";    std::cout << seriesIdentifier << std::endl;    using
FileNamesContainer = std::vector<std::string>;    FileNamesContainer
fileNames = nameGenerator->GetFileNames(seriesIdentifier);    using
ImageIOType = itk::GDCMImageIO;    auto dicomIO = ImageIOType::New();
reader->SetImageIO(dicomIO);    reader->SetFileNames(fileNames);
reader->ForceOrthogonalDirectionOff(); // properly read CTs with gantry
tilt    TRY_AND_EXIT_ON_ITK_EXCEPTION(reader->Update())  }*



*  using RegionType =   itk::ImageRegion<3>;  ImageType::Pointer inputImage
= reader->GetOutput();  RegionType inputRegion =
inputImage->GetLargestPossibleRegion();  ImageType::Pointer outputImage =
ImageType::New();*

Then I created Imageregion and imageFilter for outputImage.
Then I set the regions, spacing, origin etc.

Then I get the Forward Projection like the following:






*  rtk::ForwardProjectionImageFilter<ImageType, ImageType>::Pointer
ForwardProj = rtk::CudaForwardProjectionImageFilter<ImageType,
ImageType>::New();
dynamic_cast<rtk::CudaForwardProjectionImageFilter<ImageType, ImageType>
*>(ForwardProj.GetPointer()) ->SetStepSize( 1 );  ForwardProj->SetInput( 0,
outputImage );  ForwardProj->SetInput( 1, changeFilter->GetOutput());
ForwardProj->SetGeometry( geometry );  ForwardProj->Update();*

Then I wrote the ForwardProj to an mha file.

Then I put the output from Forward Projection as input of Back Projection.
Now I am trying to get the back projection like the following:












*  using ReaderType1 = rtk::ProjectionsReader<ImageType>;
ReaderType1::Pointer reader1 = ReaderType1::New();  reader1->SetFileNames(
fileNames );  reader1->Update();  using BackFilter =
rtk::CudaFDKConeBeamReconstructionFilter;  auto BackProjFilter =
BackFilter::New();  // FDK reconstruction  BackProjFilter->SetInput( 0,
outputImage );  BackProjFilter->SetInput( 1, reader1->GetOutput() );
BackProjFilter->SetGeometry( geometry );  BackProjFilter->Update();
BackProjFilter->UpdateOutputInformation();*

But I'm not getting the back projection. Are there any additional options I
have to set??
Is there anything I have missed??

Thanks & Regards
Adarsh S S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20220812/0b351691/attachment.htm>


More information about the Rtk-users mailing list