RTK v3 migration guide¶

Python application options use hyphens¶

Multi-word options in Python applications now use hyphens to match the C++ applications and the GNU coding standards: --outputevery →--output-every, --iterationfilename → --iteration-file-name, --hide_volume → --hide-volume.

Use --size instead of --dimension¶

As of RTK 3.0, the --dimension argument in applications is deprecated and will be removed in a future release. Please use the --size argument instead. This update aligns RTK with upstream ITK’s member name, where --size more accurately reflects the expected parameter (e.g., image size) and avoids confusion with spatial dimensions (e.g., 2D vs 3D).

Python: version() replaced by __version__¶

In the Python wrappers the previous version() call has been replaced by the module attribute __version__.

Forbild phantom file format only¶

The legacy rtk::GeometricPhantomFileReader has been removed starting with RTK 3.0. This handcrafted file format was not documented and everything it could do is also achievable with the only file format for geometric phantoms accepted in RTK 3.0, the Forbild phantom file format. The flag --forbild has also been removed from command line tools as it is now the default and only option.

Remove config option from c++ applications¶

The --config command-line option has been removed from all RTK ggo-based applications as it was not known to be used in practice.

Default branch renamed from master to main¶

The InsightSoftwareConsortium has decided to rename its default branches from master to main (https://github.com/InsightSoftwareConsortium/ITK/issues/4732) following GitHub’s move. RTK’s default branch has been renamed from master to main too. Here is what to do:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

Python class instantiations: required explicit template arguments¶

RTK requires callers to provide the full template argument list in Python. You must explicitly supply every template parameter the wrapped C++ class expects (for example Filter[InputImageType, OutputImageType]). The single-argument shorthand Filter[InputImageType] is no longer supported in RTK and should not be used.

Affected classes:

  • ADMMTotalVariationConeBeamReconstructionFilter

  • AmsterdamShroudImageFilter

  • BoellaardScatterCorrectionImageFilter

  • ConjugateGradientConeBeamReconstructionFilter

  • CudaForwardProjectionImageFilter

  • DisplacedDetectorForOffsetFieldOfViewImageFilter

  • DisplacedDetectorImageFilter

  • FDKConeBeamReconstructionFilter

  • FDKVarianceReconstructionFilter

  • FDKWeightProjectionFilter

  • IterativeConeBeamReconstructionFilter

  • ParkerShortScanImageFilter

  • PhaseGatingImageFilter

Removed m_Normalize from rtk::CudaRayCastBackProjectionImageFilter¶

Most users intuitively expect this for the backprojector matched to rtk::CudaForwardProjectionFilter. The filter was originally implemented with the normalization for SART and OSEM reconstruction but the normalization is now done in the reconstruction filters so it can be removed.

CUDA forward / ray-cast step size default¶

The CUDA forward projector and the CUDA ray-cast backprojector now use the minimum voxel spacing of the input volume as the ray step when StepSize is not set. The previous default value was 1.

rtkdualenergy applications and associated code removed¶

Historically, several applications had been developed to handle material decomposition of specific dual-energy spectral CT acquisitions with fast switching. rtkdualenergysimplexdecomposition and rtkdualenergyforwardmodel and the associated code in DualEnergyNegativeLogLikelihood and SpectralForwardModelImageFilter have been removed as one can do the same with rtkspectralsimplexdecomposition and rtkdualenergysimplexdecomposition.

rtkmcrooster and rtkmotioncompensatedfourdconjugategradient have been removed¶

Motion-compensated 4D reconstruction potentially avoids some interpolations during reconstruction but the benefit was too small for publication. The code was found to be unusable 10 years after its development and it was decided to remove it as it had not been used in the past 10 years.

Positions now use itk::Point instead of itk::Vector¶

APIs that represent physical positions were changed from itk::Vector<double,3> to itk::Point<double,3>. This makes a clear distinction between points (locations) and vectors (directions or offsets). Projection iterators (rtkProjectionsRegionConstIteratorRayBased*), Joseph forward/back projectors, ray-box filters, convex/quadric shapes, Ora geometry readers, Forbild phantom readers, and test/phantom helpers now expect PointType for positions (source, pixel, box corners, shape centers).