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

WIP: Add scalar op vector operations. #63

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

blowekamp
Copy link
Member

Add support for multiplying a vector image by a constant scalar. This
patch changes the itk filter instantiated for all filters which use
the BinaryFunctorFilter template, from just the same binary type
for both images and scalars, to using a "ValueType" scalar image and
image type. This is the same as the pixel type for scalar images. For
VectorImages it is the same as the component type and for complex
images it is the same as the value_type.

WIP: This has caused some problems for the complex pixel type with
the pow and add image filters. Specifically, the Add functor type use
the NumericTraits::AccumulatorType for std::complex this is
std::complex, but complex+complex is not
supported!!!

WIP: This now instantiates the BinaryOperator filters with the
combination of ScalarImages and VectorImages. The creates bigger
object files and libraries. But it does not exposed being able to
multiply scalar images with vector images.

Restores features that were provided by the MultipleByConstanst and
similarly named filters, before they were deprecated and removed.

Change-Id: I68143cf2a03d160136c030d5c7781d1f4db47308

@blowekamp
Copy link
Member Author

@hjmjohnson This is what I have do far on this. I was working on getting the CircleCi working before this ( that is almost there ). Please let me know if this would meet your needs.

@hjmjohnson
Copy link
Contributor

@blowekamp I won't be able to test until next week. I'm preparing for a very heavy teaching load this fall right now, and I have no free time to investigate this.

I do GREATLY appreciate all you assistance with this and the other requests.

Hans

@blowekamp blowekamp mentioned this pull request Apr 3, 2017
@bradking bradking added temp and removed temp labels May 1, 2019
Add support for multiplying a vector image by a constant scalar. This
patch changes the itk filter instantiated for all filters which use
the BinaryFunctorFilter template, from just the same binary type
for both images and scalars, to using a "ValueType" scalar image and
image type. This is the same as the pixel type for scalar images. For
VectorImages it is the same as the component type and for complex
images it is the same as the value_type.

WIP:  This has caused some problems for the complex pixel type with
the pow and add image filters. Specifically, the Add functor type use
the NumericTraits::AccumulatorType for std::complex<float> this is
std::complex<double>, but complex<double>+complex<float> is not
supported!!!

WIP: This now instantiates the BinaryOperator filters with the
combination of ScalarImages and VectorImages. The creates bigger
object files and libraries. But it does not exposed being able to
multiply scalar images with vector images.

Restores features that were provided by the MultipleByConstanst and
similarly named filters, before they were deprecated and removed.

Change-Id: I68143cf2a03d160136c030d5c7781d1f4db47308
@blowekamp blowekamp force-pushed the AddScalarVectorMathWithFilters branch from 31675dc to d64003a Compare December 18, 2019 15:37
@blowekamp blowekamp added this to the v2.2 milestone Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants