Login  Register

Changing the pixel values of a stack

Posted by fbhello on Jun 25, 2015; 11:57am
URL: http://imagej.273.s1.nabble.com/Changing-the-pixel-values-of-a-stack-tp5013284.html

Dear all,

I'm using FIJI and would like to convert the pixel values between 0 and 25 to 30. I have created the following code but when the stack contains more than a certain number of slices it fails to cover the whole pixels. Could you please assist me with this problem? Is there a faster way available?

This is the code:

v1=0;

v2=25;

v3=30;

O=getWidth();

Y=getWidth();

Z=getSliceNumber();

for (k = 1; k <= Z; k++){

for (i = 0; i <= O; i++){

for (j = 0; j <= Y; j++){

changeValues(v1, v2, v3);

}

}


Thank you very much.