COMP: IO modules publicly depend on ImageIOBase#6070
COMP: IO modules publicly depend on ImageIOBase#6070hjmjohnson wants to merge 1 commit intoInsightSoftwareConsortium:mainfrom
Conversation
DCMTK, GE, LSM, and PhilipsREC have public headers that #include itkImageIOBase.h or inherit from ImageIOBase, making ITKIOImageBase a genuine public dependency. Move it from PRIVATE_DEPENDS to DEPENDS so downstream consumers receive the transitive include paths and link targets. Follows the same pattern as the VTK fix in PR InsightSoftwareConsortium#5850.
|
| Filename | Overview |
|---|---|
| Modules/IO/DCMTK/itk-module.cmake | Moves ITKIOImageBase from PRIVATE_DEPENDS to DEPENDS; correct because itkDCMTKImageIO.h publicly includes itkImageIOBase.h. |
| Modules/IO/GE/itk-module.cmake | Moves ITKIOImageBase from PRIVATE_DEPENDS to DEPENDS and removes the now-empty PRIVATE_DEPENDS block; correct because all three GE factory headers publicly include itkImageIOBase.h. |
| Modules/IO/LSM/itk-module.cmake | Moves ITKIOImageBase to DEPENDS while keeping ITKTIFF in PRIVATE_DEPENDS; correct because itkLSMImageIOFactory.h publicly includes itkImageIOBase.h. |
| Modules/IO/PhilipsREC/itk-module.cmake | Moves ITKIOImageBase to DEPENDS while keeping ITKZLIB in PRIVATE_DEPENDS; correct because itkPhilipsRECImageIO.h publicly includes itkImageIOBase.h and inherits ImageIOBase. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph Before["Before (PRIVATE_DEPENDS)"]
D1[ITKIODCMTK] -.->|private| B[ITKIOImageBase]
G1[ITKIOGE] -.->|private| B
L1[ITKIOLSM] -.->|private| B
P1[ITKIOPhilipsREC] -.->|private| B
end
subgraph After["After (DEPENDS)"]
D2[ITKIODCMTK] -->|public| B2[ITKIOImageBase]
G2[ITKIOGE] -->|public| B2
L2[ITKIOLSM] -->|public| B2
P2[ITKIOPhilipsREC] -->|public| B2
end
subgraph Impact
C[Downstream consumers] -->|now receive transitive| B2
note["Public headers include itkImageIOBase.h\nor inherit from ImageIOBase"]
end
Reviews (2): Last reviewed commit: "COMP: IO modules publicly depend on Imag..." | Re-trigger Greptile
|
/azp run ITK.Windows |
Move
ITKIOImageBasefromPRIVATE_DEPENDStoDEPENDSfor 4 IO modules whose public headers#include "itkImageIOBase.h"or inherit fromImageIOBase: DCMTK, GE, LSM, and the Philips REC module.Follows the same fix applied to VTK in #5850. With
PRIVATE_DEPENDS, downstream projects that consume these modules' public headers may not receive the transitive include paths and link targets forITKIOImageBase.Header analysis confirming public dependency
Each module was verified to have public headers that directly reference ITKIOImageBase types:
itkDCMTKImageIO.hincludesitkImageIOBase.h,DCMTKImageIOinherits fromImageIOBaseitkGE4ImageIOFactory.h,itkGE5ImageIOFactory.h,itkGEAdwImageIOFactory.hincludeitkImageIOBase.hitkLSMImageIOFactory.hincludesitkImageIOBase.hitkPhilipsRECImageIO.hincludesitkImageIOBase.h, inherits fromImageIOBaseNot included: ITKIOCSV — its public headers do not reference any IOImageBase types. Its
PRIVATE_DEPENDS ITKIOImageBasemay be vestigial or only needed for module infrastructure, and warrants separate investigation.Local build verification
EXCLUDE_FROM_DEFAULT)ITKIOImageBaseappears inPUBLIC_DEPENDSandTRANSITIVE_DEPENDS