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 1118 - ij.plugin.ChannelSplitter.getChannel(ImagePlus imp, int c) should throw an exception when c = 0
ij.plugin.ChannelSplitter.getChannel(ImagePlus imp, int c) should throw an ex...
Status: RESOLVED FIXED
Product: ImageJ
Classification: Unclassified
Component: Common
unspecified
All All
: P5 trivial
Assigned To: Curtis Rueden
Depends on:
Blocks:
 
Reported: 2015-07-17 16:24 CDT by Radoslaw Ejsmont
Modified: 2015-07-17 22:45 CDT
2 users (show)

See Also:

Description Radoslaw Ejsmont 2015-07-17 16:24:29 CDT
ij.plugin.ChannelSplitter.getChannel(ImagePlus imp, int c) should throw an exception (something like ArrayIndexOutOfBoundsException) when c = 0

Currently it proceeds like if c = 1. This makes debugging difficult if someone mistakenly assumes c is 0-based.
Comment 1 Wayne Rasband 2015-07-17 22:45:44 CDT
With the latest ImageJ daily build (1.50a19), the ChannelSplitter.getChannel() method throws an IllegalArgument exception if the channel argument is out of range. It also now works with RGB images and stacks.