-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
change default pading for RandomAffine to minimum #344
Comments
Sometimes the minimum is very different from the border, so it creates a gradient. I feel like using the Otsu threshold of the values at the border is the most robust option. But I can't think of an obvious counterexample at the moment...
Yes! I added the padding stuff to RandomAffine as an experiment, but it should also be added to Resample and RandomElasticInformation. Actually, it would be nice to merge these 3 one day. |
adding the mean value (of the otsu mask) will also add gradient in the image borders When talking of the same default I was thinking of changing Not sure what you have in mind for merging those 3 transforms, but a first step would be to homogenize them, by adding the |
I guess.
Hmm you can always use
I agree, this needs to be changed. The idea of merging is avoiding loss of information due to multiple interpolations. |
then I do not understand what you add ? |
Maybe "padding" (used by e.g. NiftyReg) is not the right nomenclature. I meant that I added logic to compute the "default pixel value" (used by ITK) when no information is available for that voxel during resampling. Does that make sense? |
sorry, but not sure to follow
this is already handel (in RandomAfinne)
do you mean you add other logic than minimum, mean otsu, or constant value ?, which logic then ? |
I don't know what the question is anymore haha. When you apply e.g. a rotation to an image, you need to pad the result with some values. For example, in this image, the value is 0: The minimum could have been chosen instead, or some other value. That's all. I'm not proposing any new technique to compute the padding value. I agree the method should be the same for RandomAffine, RandomElasticDeformation and Resample. |
it is just this sentence I did not understand (since it is already there, in random Affine), but ok, no matter, I think we do agree (and it is not a very important point) |
I meant that back then I added that to RandomAffine and forgot to add it to the other transforms as well. |
Closing as this was fixed in #353. Next step should be adding padding options to Resample and RandomElasticDeformation. |
馃殌 Feature
I notice that by default you choose the minimum as default_pad_value for elastic deformation
whereas the default method is otsu for randomAffine
Motivation
it seems to me more natural to take the min, as noise is expected in the image border (at least for brain, in 5 of the 6 border slices )
no ?
and it makes more sense to have the same default for both transform
Pitch
by the way we should may be add a default_pad_value as argument in the randomElastic too (but minimum is fine, so may be latter ...)
Alternatives
Additional context
The text was updated successfully, but these errors were encountered: