I’m not sure how ITK implements their resampling for medical images, but if you would like to apply it as a preprocessing step, you could probably just use the Python ITK library to do so.
However, if you need to implement this transformation as part of your model, could you post an example of the original and resampled data?