imglib / imglib2-realtransform

Spatial transformations for ImgLib2
Other
7 stars 7 forks source link

Is applyInverse required to work when the same object is passed to both args? #13

Closed bogovicj closed 7 years ago

bogovicj commented 7 years ago

@axtimwalde Is it a requirement that every InvertibleRealTransform work correctly when called like this (for example):

double[] tmp = ...
invertibleTransform.applyInverse( tmp, tmp );

?

If so, let's add it to the doc (possibly also for RealTransforms)

If not, then this line in InvertibleRealTransformSequence will cause problems for any implementation that does not meet this requirement.

axtimwalde commented 7 years ago

Yes, this is a requirement. Please add to the doc.

bogovicj commented 7 years ago

See the PR. I think the one sentence is sufficient:

Implementations must support an in-place applyInverse (i.e., passing the same object as both source and target).

What do you think?

axtimwalde commented 7 years ago

Perfect. Thanks!