NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 87 - patches do not paint properly when:
patches do not paint properly when:
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: TrakEM2
unspecified
PC Linux
: P2 normal
Assigned To: Albert Cardona
Depends on:
Blocks:
 
Reported: 2009-10-02 17:01 CDT by Stephan Saalfeld
Modified: 2010-08-10 10:11 CDT
0 users

See Also:

Description Stephan Saalfeld 2009-10-02 17:01:45 CDT
1. they have a composite mode other than `normal'
2. they do have an affine transform that is purely translation
3. they have no coordinatetransform
4. the display has an `even' magnification (100%,50%,25% but not 75%,33%...)

this affects the painting in browsing mode (it uses the normal composite) and also in nonlinear transform mode (patch does not deform).  Looking at the very special conditions for this bug, it sounds very much like an `optimization' for this very specific case that didn't track the latest changes regarding composites and deformations.
Comment 1 Albert Cardona 2009-10-07 21:42:16 CDT
I confirm the bug esists for uneven magnification below 150%.
But after looking at the code for a while, I remain clueless:
- the DefaultMode doesn't care about magnification
- the DefaultGraphicsSource doesn't care either
- the Patch.paint doesn't do anything special regarding magnification
   when the composite is not the normal one.

The only possibility that occurs to me is that the image to paint
for odd magnifications is not directly a mipmap but a mipmap
scaled on the fly via drawImage with an affine.

This on-the-fly scaling could be interfering with the composite mode,
but I don't know how. Perhaps the function (in any Composite class):

public void compose( Raster src, Raster dstIn, WritableRaster dstOut ) ..

... is receiving rasters of different dimensions? I doubt it.
Comment 2 Albert Cardona 2009-10-31 21:39:11 CDT
I've pushed a workaround, after Stephan Saalfeld figured out that the bug occurs only on Patch with an identity or translation only affine transform.
The real cause of the bug is unknown.
Comment 3 Stephan Saalfeld 2010-08-10 10:11:43 CDT
Fixed the bug tracking a change in behavior of Graphics2D with Java5.