Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 13, 2024
1 parent 629e106 commit da122b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/clesperanto/imagej/ImageJConverters.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ private static ImagePlus fromBuffer(ByteBuffer byteBuffer, ImageJDataType type,
byte bb = byteBuffer.get();
return bb < 0 ? 256 + bb : bb;
};


switch (type) {
case FLOAT32:
FloatBuffer floatBuff = byteBuffer.asFloatBuffer();
Expand Down
12 changes: 6 additions & 6 deletions src/test/java/TestImagePlusPushAndPull.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
import java.util.concurrent.ThreadLocalRandom;

public class TestImagePlusPushAndPull {

public final static int MAX_UINT16 = 65536;

public final static int MAX_INT16 = 65536 / 2 - 1;

public final static int MAX_UINT8 = 256;

public final static int MAX_INT8 = 256 / 2 - 1;

@Test
Expand Down Expand Up @@ -88,11 +88,11 @@ public void testPullFloat() {
@Test
public void testImagePlusPushAndPullInt() {
ImagePlus inputImp = IJ.createImage("input", 3, 3, 2, 32);

int[] flatVals = new int[18];
for (int i = 0; i < flatVals.length; i++)
flatVals[i] = ThreadLocalRandom.current().nextInt(100);

int c = 0;
for (int z = 0; z < 2; z ++) {
inputImp.setPositionWithoutUpdate(1, 1 + z, 1);
Expand Down

0 comments on commit da122b6

Please sign in to comment.