You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Discussion: GDCMSeriesFileNames ordering edge cases (duplicate IPP, gantry tilt) and whether SerieHelper's permissive strategy is correct #6468
#6467 migrates itk::GDCMSeriesFileNames off the deprecated gdcm::SerieHelper onto gdcm::Scanner + gdcm::IPPSorter. The two backends differ in how tolerant they are of awkward series, so this issue is to decide the intended behavior before we lock it in.
gdcm::IPPSorter (by design, per its own header docs) is strict:
Fails on duplicate ImagePositionPatient — Sort() returns false (there is an opt-in SetDropDuplicatePositions, but dropping changes the returned slice count).
Gantry tilt is treated as an error (documented \bug).
Assumes sortable image SOP classes (e.g. CT/MR/PET); other datasets are out of scope.
gdcm::SerieHelper::OrderFileList was more permissive: IPP-projected-on-normal first, with an ImageNumber / file-name fallback chain, and it did not hard-fail on the cases above.
The initial backend swap lets duplicate-IPP, oblique-edge, and gantry-tilt cases fail (IPPSorter's native behavior), with a code note pointing here. This issue tracks whether that is acceptable long-term.
Questions for discussion
Do these cases need first-class support in ITK? Which real-world acquisitions actually produce them?
Gantry-tilt CT (older head CT) is the classic real case.
Duplicate IPP usually indicates bad data (repeated/duplicated slices) — should ITK order it or reject it?
Oblique / non-axis-aligned series are common and should sort fine via IPP-on-normal; confirm IPPSorter handles them (it should — it projects on the orientation normal).
Was SerieHelper's strategy correct? Its fallback chain silently produced an ordering even for degenerate input, which can mask bad data. Is "fail loudly" (IPPSorter) actually the better contract?
If we do need the permissive path, the plan (see Modernize itk::GDCMSeriesFileNames onto gdcm::IPPSorter/Scanner (drop deprecated gdcm::SerieHelper) #6467 follow-on commits) is to port the SerieHelper ordering logic into ITK as a documented, opt-in fallback (e.g. gated behind an IO option for gantry tilt), rather than keep depending on a class GDCM says "DO NOT USE." A motivating benefit: ITK owning this lets upstream GDCM finally remove the SerieHelper stopgap (and the various Applications/ workarounds built around its IPPSort-failure cases), completing the "temporary solution for ITK migration from GDCM 1.x to 2.x" that has lived for ~15 years.
Gantry-tilt CTs should continue to be supported. I encountered this with pediatric patients - technicians were trying hard to avoid the eyes while scanning.
The concrete deliverable this discussion gated has landed on main: 50dfb136658 reimplemented GDCMSeriesFileNames on gdcm::Scanner + gdcm::IPPSorter, and 7cb3bbec23d added the opt-in permissive fallback (FailOnAmbiguousOrdering, throwing by default). The gating migration issue #6467 is closed.
One request from the thread remains open: @dzenanz asked that gantry-tilt CTs continue to be supported, and today they are only handled via the legacy fallback, which is off by default and which the code comment itself calls untrustworthy. That is a maintainer judgment call about intended behavior rather than missing migration work, so I've split it into its own tracking issue: #6656.
Activity
ENH: Reimplement GDCMSeriesFileNames on gdcm::Scanner + gdcm::IPPSorter
ENH: Reimplement GDCMSeriesFileNames on gdcm::Scanner + gdcm::IPPSorter
dzenanz commentedon Jun 30, 2026
Gantry-tilt CTs should continue to be supported. I encountered this with pediatric patients - technicians were trying hard to avoid the eyes while scanning.
hjmjohnson commentedon Jul 17, 2026
The concrete deliverable this discussion gated has landed on
main:50dfb136658reimplementedGDCMSeriesFileNamesongdcm::Scanner+gdcm::IPPSorter, and7cb3bbec23dadded the opt-in permissive fallback (FailOnAmbiguousOrdering, throwing by default). The gating migration issue #6467 is closed.One request from the thread remains open: @dzenanz asked that gantry-tilt CTs continue to be supported, and today they are only handled via the legacy fallback, which is off by default and which the code comment itself calls untrustworthy. That is a maintainer judgment call about intended behavior rather than missing migration work, so I've split it into its own tracking issue: #6656.
Closing this discussion in favor of #6656.