Skip to content
Snippets Groups Projects
Commit d3ef6dc9 authored by anttil's avatar anttil
Browse files

BIS-338 / SP-522: Fix flipped coordinates

SVN: 28462
parent eafc5028
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,7 @@ public class IntensityRescaling ...@@ -35,7 +35,7 @@ public class IntensityRescaling
public static enum Channel public static enum Channel
{ {
RED(0, 16), GREEN(1, 8), BLUE(2, 0); RED(0, 16), GREEN(1, 8), BLUE(2, 0);
private int band; private int band;
private int shift; private int shift;
...@@ -193,11 +193,11 @@ public class IntensityRescaling ...@@ -193,11 +193,11 @@ public class IntensityRescaling
return channels; return channels;
} }
for (int i = 0; i < image.getHeight(); i++) for (int y = 0; y < image.getHeight(); y++)
{ {
for (int j = 0; j < image.getWidth(); j++) for (int x = 0; x < image.getWidth(); x++)
{ {
int rgb = image.getRGB(i, j); int rgb = image.getRGB(x, y);
if (((rgb >> 16) & 0xff) > 0) if (((rgb >> 16) & 0xff) > 0)
{ {
channels.add(Channel.RED); channels.add(Channel.RED);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment