Skip to content

Commit 2becc06

Browse files
committed
Fix typo and clarify method comment
1 parent fe4388c commit 2becc06

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/java/omero/gateway/facility/RenderFacility.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ public RenderingEnginePrx getRenderingEngine(SecurityContext ctx, long imageId,
7474
}
7575

7676
/**
77-
* Checks if an image is an RGB(A) image.
77+
* Tries to determine if an image is an RGB(A) image.
78+
* (Note: This does not necessarily give the same results as Bioformats isRGB()!)
7879
*
7980
* @param ctx The security context.
8081
* @param imageId The image ID
@@ -86,12 +87,12 @@ public RenderingEnginePrx getRenderingEngine(SecurityContext ctx, long imageId,
8687
public boolean isRGB(SecurityContext ctx, long imageId) throws DSOutOfServiceException, DSAccessException {
8788
try {
8889
ImageData img = gateway.getFacility(LoadFacility.class).getImage(ctx, imageId);
89-
int nChannles = img.getDefaultPixels().getSizeC();
90-
if (nChannles < 3 || nChannles > 4)
90+
int nChannels = img.getDefaultPixels().getSizeC();
91+
if (nChannels < 3 || nChannels > 4)
9192
return false;
9293
boolean r = false, g = false, b = false;
9394
RenderingEnginePrx re = getRenderingEngine(ctx, imageId, true);
94-
for (int i=0; i<nChannles; i++) {
95+
for (int i=0; i<nChannels; i++) {
9596
int[] ch = re.getRGBA(i);
9697
if (!r && ch[0] == 255 && ch[1] == 0 && ch[2] == 0)
9798
r = true;

0 commit comments

Comments
 (0)