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 436 - Composition broken for illegal alpha values?
Composition broken for illegal alpha values?
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: TrakEM2
unspecified
PC Linux
: P2 normal
Assigned To: Albert Cardona
Depends on:
Blocks:
 
Reported: 2012-06-11 11:11 CDT by Stephan Saalfeld
Modified: 2014-06-16 13:36 CDT
1 user (show)

See Also:

Description Stephan Saalfeld 2012-06-11 11:11:39 CDT
I import two single channel 16bit stacks from individual tif files as patch series.
I then select the patch series of stack 1 by name (Selection->Select all the match...).  I set the LUTMagenta image filter for the selected images.  Mipmaps are re-generated and look correct.  Then, I choose Properties... and set the composition mode to "Add".  Now everything goes wild, the display looks oversaturated regardless of the min/max-settings of hte patch series and the Log window is filled with

Cannot paint Patch with composite type Normal
Reason:
java.lang.IllegalArgumentException: alpha value out of range

What does that mean?
Comment 1 Albert Cardona 2012-06-11 15:28:45 CDT
(In reply to comment #0)
> I import two single channel 16bit stacks from individual tif files as patch
> series.
> I then select the patch series of stack 1 by name (Selection->Select all the
> match...).  I set the LUTMagenta image filter for the selected images.  Mipmaps
> are re-generated and look correct.  Then, I choose Properties... and set the
> composition mode to "Add".  Now everything goes wild, the display looks
> oversaturated regardless of the min/max-settings of hte patch series and the
> Log window is filled with
> 
> Cannot paint Patch with composite type Normal
> Reason:
> java.lang.IllegalArgumentException: alpha value out of range
> 
> What does that mean?


It means that, in the code line that fails, the alpha value is out of the 0-1 range. Perhaps there is a floating point issue somewhere.

Comment 2 Albert Cardona 2012-06-11 15:41:54 CDT
(In reply to comment #0)
> I import two single channel 16bit stacks from individual tif files as patch
> series.
> I then select the patch series of stack 1 by name (Selection->Select all the
> match...).  I set the LUTMagenta image filter for the selected images.  Mipmaps
> are re-generated and look correct.  Then, I choose Properties... and set the
> composition mode to "Add".  Now everything goes wild, the display looks
> oversaturated regardless of the min/max-settings of hte patch series and the
> Log window is filled with
> 
> Cannot paint Patch with composite type Normal
> Reason:
> java.lang.IllegalArgumentException: alpha value out of range
> 
> What does that mean?
>


I just tried it and it works for me. The magenta 16-bit image overlays the underlying images without any issue.

Comment 3 Albert Cardona 2012-06-27 18:29:22 CDT
(In reply to comment #1)
> (In reply to comment #0)
> > I import two single channel 16bit stacks from individual tif files as patch
> > series.
> > I then select the patch series of stack 1 by name (Selection->Select all the
> > match...).  I set the LUTMagenta image filter for the selected images.  Mipmaps
> > are re-generated and look correct.  Then, I choose Properties... and set the
> > composition mode to "Add".  Now everything goes wild, the display looks
> > oversaturated regardless of the min/max-settings of hte patch series and the
> > Log window is filled with
> > 
> > Cannot paint Patch with composite type Normal
> > Reason:
> > java.lang.IllegalArgumentException: alpha value out of range
> > 
> > What does that mean?
> 
> 
> It means that, in the code line that fails, the alpha value is out of the 0-1
> range. Perhaps there is a floating point issue somewhere.
> 


Did you save the stack trace somewhere?
Comment 4 Stephan Saalfeld 2012-06-27 18:44:07 CDT
No---there was no stack trace.  Just the line as posted.  Have you tested with a stack instead of a single image by now?
Comment 5 Albert Cardona 2012-07-03 17:16:02 CDT
(In reply to comment #4)
> No---there was no stack trace.  Just the line as posted.  Have you tested with
> a stack instead of a single image by now?
> 

I have tried with two 16-bit stacks. The second one is on top of the first, and the second one has the LUTMagenta filter and the "Add" overlay mode. All looks as expected.

All I could think of is a floating point issue where alpha ends up being slightly above 1.0 or below 0.0.
Comment 6 Albert Cardona 2012-07-03 18:46:20 CDT
(In reply to comment #5)
> (In reply to comment #4)
> > No---there was no stack trace.  Just the line as posted.  Have you tested with
> > a stack instead of a single image by now?
> > 
> 
> I have tried with two 16-bit stacks. The second one is on top of the first, and
> the second one has the LUTMagenta filter and the "Add" overlay mode. All looks
> as expected.
> 
> All I could think of is a floating point issue where alpha ends up being
> slightly above 1.0 or below 0.0.
> 


Your recipe for reproducing it doesn't do it here for me. Is this still an issue for you?
Comment 7 Curtis Rueden 2014-06-16 13:36:23 CDT
No follow-up in 2 years. Please open with instructions to reproduce if still an issue.