Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Conversion from the attenuated to exponential Radon transform #629

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions applications/rtkforwardprojections/rtkforwardprojections.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#ifdef RTK_USE_CUDA
# include "rtkCudaForwardProjectionImageFilter.h"
#endif
#include "rtkAttenuatedToExponentialCorrectionImageFilter.h"

#include <itkImageFileReader.h>
#include <itkImageFileWriter.h>
Expand Down Expand Up @@ -81,6 +82,14 @@ main(int argc, char * argv[])
attenuationMap = itk::ReadImage<OutputImageType>(args_info.attenuationmap_arg);
}

OutputImageType::Pointer KRegion;
if (args_info.kregion_given)
{
if (args_info.verbose_flag)
std::cout << "Reading K region " << args_info.kregion_arg << "..." << std::endl;
KRegion = itk::ReadImage<OutputImageType>(args_info.kregion_arg);
}

using ClipImageType = itk::Image<double, Dimension>;
ClipImageType::Pointer inferiorClipImage, superiorClipImage;
if (args_info.inferiorclipimage_given)
Expand Down Expand Up @@ -109,6 +118,10 @@ main(int argc, char * argv[])
case (fp_arg_Joseph):
forwardProjection = rtk::JosephForwardProjectionImageFilter<OutputImageType, OutputImageType>::New();
break;
case (fp_arg_AttToExp):
forwardProjection = rtk::AttenuatedToExponentialCorrectionImageFilter<OutputImageType, OutputImageType>::New();
constantImageSource->SetConstant(1.);
break;
case (fp_arg_JosephAttenuated):
forwardProjection = rtk::JosephForwardAttenuatedProjectionImageFilter<OutputImageType, OutputImageType>::New();
break;
Expand Down Expand Up @@ -137,6 +150,8 @@ main(int argc, char * argv[])
forwardProjection->SetInput(1, inputVolume);
if (args_info.attenuationmap_given)
forwardProjection->SetInput(2, attenuationMap);
if (args_info.kregion_arg)
forwardProjection->SetInput(2, KRegion);
if (args_info.inferiorclipimage_given)
{
if (args_info.fp_arg == fp_arg_Joseph)
Expand Down
9 changes: 5 additions & 4 deletions applications/rtkforwardprojections/rtkforwardprojections.ggo
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ option "step" s "Step size along ray (for CudaRayCast only)"
option "lowmem" l "Compute only one projection at a time" flag off

section "Projectors"
option "fp" f "Forward projection method" values="Joseph","JosephAttenuated","CudaRayCast","Zeng","MIP" enum no default="Joseph"
option "attenuationmap" - "Attenuation map relative to the volume to perfom the attenuation correction" string no
option "sigmazero" - "PSF value at a distance of 0 meter of the detector" double no
option "alphapsf" - "Slope of the PSF against the detector distance" double no
option "fp" f "Forward projection method" values="Joseph","JosephAttenuated","CudaRayCast","Zeng","MIP","AttToExp" enum no default="Joseph"
option "attenuationmap" - "Attenuation map relative to the volume to perfom the attenuation correction" string no
option "sigmazero" - "PSF value at a distance of 0 meter of the detector" double no
option "alphapsf" - "Slope of the PSF against the detector distance" double no
option "inferiorclipimage" - "Value of the inferior clip of the ray for each pixel of the projections (only with Joseph-based projector)" string no
option "superiorclipimage" - "Value of the superior clip of the ray for each pixel of the projections (only with Joseph-based projector)" string no
option "kregion" - "K region file name for AttToExp, the correction from attenuated to exponential Radon transform" string no
Loading
Loading