UCL / UCL/STIR

remove obsolete functions in ProjDataInfoCylindrical and ProjDataInfoCylindricalNoArcCorr

Open
#105 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
160
Forks
113
Avg merge
12d 15h
Merged PRs (30d)
1

Description

There's overlap between old and new (safer) functions. We should get rid of the old ones. Let's try to document here what needs to be done.

Functions that handle only rings or only tang_pos/view (these should become either private or protected)

  • get_det_num_pair_for_view_tangential_pos_num (replace with get_det_pos_pair_for_bin). Used in a few places including ProjMatrixByBinUsingRayTracing and some normalisation code.

  • get_view_tangential_pos_num_for_det_num_pair (make private). Used in

    • get_bin_for_det_pair
  • get_segment_axial_pos_num_for_ring_pair (make private?)

    • CListEventCylindricalScannerWithViewTangRingRingEncoding (used there to save some computation)
    • get_bin_for_det_pair
  • get_num_ring_pairs_for_segment_axial_pos_num (use get_num_det_pos_pairs_for_bin). Used in

    • LmToProjData::get_compression_count
    • get_num_det_pos_pairs_for_bin
  • get_ring_pair_for_segment_axial_pos_num (make protected). Used in

    • get_det_pair_for_bin
  • get_all_ring_pairs_for_segment_axial_pos_num (make protected). Used in

    • get_all_det_pos_pairs_for_bin

Functions that use 4 coordinates (these should be removed)

  • get_bin_for_det_pair (replace with get_bin_for_det_pos_pair). Made private in https://github.com/NikEfth/STIR/pull/63 and hence https://github.com/UCL/STIR/pull/304

  • find_bin_given_cartesian_coordinates_of_detection (replace with get_bin(LOR&)). Used in

  • find_scanner_coordinates_given_cartesian_coordinates (replace with get_LOR or get_LOR_as_2_points). Used in

    • find_bin_given_cartesian_coordinates_of_detection
  • get_det_pair_for_bin (replace with get_det_pos_pair_for_bin). Used in

    • find_cartesian_coordinates_of_detection
    • get_det_pos_pair_for_bin
    • construct_randoms_from_singles.cxx
    • MLnorm.cxx
  • find_cartesian_coordinates_of_detection (replace with get_LOR or get_LOR_as_2_points). Used in

    • ScatterEstimationByBin::find_detectors
  • find_cartesian_coordinates_given_scanner_coordinates_of_the_front_surface. This is not used.

  • find_cartesian_coordinates_given_scanner_coordinates (replace with get_LOR or get_LOR_as_2_points). Used in

    • CListEventCylindricalScannerWithDiscreteDetectors::get_LOR
    • find_cartesian_coordinates_of_detection

Of course, many of these are also used in test_proj_data_info.cxx

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the listed functions in ProjDataInfoCylindrical and ProjDataInfoCylindricalNoArcCorr, then inspect their callers in the named source files, including RigidObject3DTransformation.cxx, construct_randoms_from_singles.cxx, MLnorm.cxx, and test_proj_data_info.cxx. Done means obsolete functions are removed or given the stated access level, callers use the replacement APIs, and the affected tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.