Homec4science

Fix some image data type variable initializations

Authored by Tom Kazimiers <tom@voodoo-arts.net> on Jan 25 2015, 02:14.

Description

Fix some image data type variable initializations

New image type variables from image references should always create with
createType() if the original image value is not required. In some
situations, new image data type variables were created with get() and
used as completely new reference. This, however, is unfortunately a
wrong assumption: get() returns a pixel reference. At most locations
changed in this commit, this is not what was wanted. Others (were
RandomAccessibleInterval instances are created) are not expected to
change the passed in value, but a new variable ensures that this would
not be a problem. Let alone the potential modification of the image,
variables are shared, if the random access is not moved to another
position between get() calls.

It is very likely, though, that this was never a problem when the plugin
was used: the same RandomAccessibleInterval instances (!) for both
images would have to be re-used with different AutoThresholdRegression
instances.

Details

Committed
Tom Kazimiers <tom@voodoo-arts.net>Jan 25 2015, 03:06
Pushed
oburriMar 8 2018, 18:06
Parents
R6269:d6d44740f15c: Merge pull request #3 from tomka/refactor-data-type-range-checks
Branches
Unknown
Tags
Unknown

Event Timeline

Tom Kazimiers <tom@voodoo-arts.net> committed R6269:52fb5c96d019: Fix some image data type variable initializations (authored by Tom Kazimiers <tom@voodoo-arts.net>).Jan 25 2015, 03:06