Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform Type in ResampleImageFilter forces Input and Output dimensions to be same. #1512

Open
HaaPut opened this issue Dec 23, 2019 · 3 comments · May be fixed by #1519
Open

Transform Type in ResampleImageFilter forces Input and Output dimensions to be same. #1512

HaaPut opened this issue Dec 23, 2019 · 3 comments · May be fixed by #1519
Labels

Comments

@HaaPut
Copy link

@HaaPut HaaPut commented Dec 23, 2019

Description

Why does transform type here force both input and output dimension to be same?

I have a custom transform which maps images to to a higher dimensional feature space and I would like to use ResampleImageFilter. I understand that I can defined my own ResampleFilter, but is there a reason why this is defined as it is?

Expected behavior

  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension; 
  using TransformType = Transform<TTransformPrecisionType, Self::OutputImageDimension, Self::InputImageDimension>;

Actual behavior

  using TransformType = Transform<TTransformPrecisionType, Self::ImageDimension, Self::ImageDimension>;
@HaaPut HaaPut added the type:Bug label Dec 23, 2019
@dzenanz

This comment has been minimized.

Copy link
Member

@dzenanz dzenanz commented Dec 23, 2019

Option: try changing it to fit your expectation and see what errors you encounter.

@HaaPut

This comment has been minimized.

Copy link
Author

@HaaPut HaaPut commented Dec 24, 2019

@dzenanz Well.. one runs into quite a few errors.. here is a working example after taking care of them!
If you guys think that this should be the default behavior I can make a PR. Apart from the changes required in ResampleImageFilter. I think assumption of square transform in EnlargeRegionOverBox is a separate (but very similar) bug. This could be a separate PR?

@dzenanz

This comment has been minimized.

Copy link
Member

@dzenanz dzenanz commented Dec 25, 2019

PRs are very welcome! "assumption of square transform" can be a different commit, or a different PR - it is up to you.

@HaaPut HaaPut linked a pull request that will close this issue Dec 26, 2019
2 of 2 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.