Increase maximum group attribute for ROI from 255 to MAX_INTEGER
#289
+5
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a proposal to lift the maximum value for the
groupattribute of ROIs, from currently 255 toInteger.MAX_VALUEThis attribute is used for instance to group ROIs into categories, ROIs with the same group number would belong to the same category and will be depicted with the same color.
Currently, the group is limited to a max value of 255, I think because the original implementation was using a 8-bit LUT to get the color for a given ROI group. It turns out the Glasbey LUT used to depict the ROI can yield distinct color beyond this range (see (
glasbeyLut.getRGB(group)inRoi.getGroupColor).The rest of the code seems to also deal with the higher range without any issue.
The current implementation also allows storing corresponding names for the group. Those are stored in a
String[]. The maximum size of an array is alsoInteger.MAX_VALUE, right ?This proposal was motivated by people I had a chat with, who had the idea to use the group attribute to group ROIs across multiples Z-planes into pseudo 3D Rois.
But I think there could be other valid use cases where the current limitation of 255 might be problematic.