Besides the comment lines, can someone tell me what is the difference between these 2? Thanks.
# Here we specify the filter input explicitly
median = itk.MedianImageFilter.New(reader.GetOutput())
# Same as above but shortened. Input does not have to be specified.
median = itk.MedianImageFilter.New(reader.GetOutput())
This comes from the (Quick start guide)[Quick start guide — ITKPythonPackage documentation]
For what is worth, I just realised that there is a repo for the Python interface of ITK (separate from the base repo). The corresponding lines are here: ITKPythonPackage/ImplicitInstantiation.py at 9414dc73f8ca9f29fb607c1f1317901a27d55ae6 · InsightSoftwareConsortium/ITKPythonPackage · GitHub