@Test public void testShortToAllTypesROIAccessor() { boolean roiUsed = true; boolean noDataPresent = false; boolean useRoiAccessor = true; int dataType = DataBuffer.TYPE_SHORT; TestSelection selector = TestSelection.ROI_ACCESSOR_ONLY_DATA; testOperation(testImageShort, shortToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
int noDataI = -100; testImageByte = createTestImage(DataBuffer.TYPE_BYTE, DEFAULT_WIDTH, DEFAULT_HEIGHT, noDataB, false); testImageUShort = createTestImage(DataBuffer.TYPE_USHORT, DEFAULT_WIDTH, DEFAULT_HEIGHT, noDataUS, false); testImageShort = createTestImage(DataBuffer.TYPE_SHORT, DEFAULT_WIDTH, DEFAULT_HEIGHT, noDataS, false); testImageInt = createTestImage(DataBuffer.TYPE_INT, DEFAULT_WIDTH, DEFAULT_HEIGHT, noDataI, false);
@Test public void testUshortToAllTypesROIAccessor() { boolean roiUsed = true; boolean noDataPresent = false; boolean useRoiAccessor = true; int dataType = DataBuffer.TYPE_USHORT; TestSelection selector = TestSelection.ROI_ACCESSOR_ONLY_DATA; testOperation(testImageUShort, ushortToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testUshortToAllTypesNoData() { boolean roiUsed = false; boolean noDataPresent = true; boolean useRoiAccessor = false; int dataType = DataBuffer.TYPE_USHORT; TestSelection selector = TestSelection.NO_ROI_NO_DATA; testOperation(testImageUShort, ushortToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testIntToAllTypesNoData() { boolean roiUsed = false; boolean noDataPresent = true; boolean useRoiAccessor = false; int dataType = DataBuffer.TYPE_INT; TestSelection selector = TestSelection.NO_ROI_NO_DATA; testOperation(testImageInt, intToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testUshortToAllTypesFull() { boolean roiUsed = true; boolean noDataPresent = true; boolean useRoiAccessor = true; int dataType = DataBuffer.TYPE_USHORT; TestSelection selector = TestSelection.ROI_ACCESSOR_NO_DATA; testOperation(testImageUShort, ushortToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testShortToAllTypes() { boolean roiUsed = false; boolean noDataPresent = false; boolean useRoiAccessor = false; int dataType = DataBuffer.TYPE_SHORT; TestSelection selector = TestSelection.NO_ROI_ONLY_DATA; testOperation(testImageShort, shortToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testIntToAllTypes() { boolean roiUsed = false; boolean noDataPresent = false; boolean useRoiAccessor = false; int dataType = DataBuffer.TYPE_INT; TestSelection selector = TestSelection.NO_ROI_ONLY_DATA; testOperation(testImageInt, intToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testByteToAllTypesROIAccessor() { boolean roiUsed = true; boolean noDataPresent = false; boolean useRoiAccessor = true; int dataType = DataBuffer.TYPE_BYTE; TestSelection selector = TestSelection.ROI_ACCESSOR_ONLY_DATA; testOperation(testImageByte, byteToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testByteToAllTypesNoData() { boolean roiUsed = false; boolean noDataPresent = true; boolean useRoiAccessor = false; int dataType = DataBuffer.TYPE_BYTE; TestSelection selector = TestSelection.NO_ROI_NO_DATA; testOperation(testImageByte, byteToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testByteToAllTypes() { boolean roiUsed = false; boolean noDataPresent = false; boolean useRoiAccessor = false; int dataType = DataBuffer.TYPE_BYTE; TestSelection selector = TestSelection.NO_ROI_ONLY_DATA; testOperation(testImageByte, byteToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testByteToAllTypesROIBounds() { boolean roiUsed = true; boolean noDataPresent = false; boolean useRoiAccessor = false; int dataType = DataBuffer.TYPE_BYTE; TestSelection selector = TestSelection.ROI_ONLY_DATA; testOperation(testImageByte, byteToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testShortToAllTypesNoData() { boolean roiUsed = false; boolean noDataPresent = true; boolean useRoiAccessor = false; int dataType = DataBuffer.TYPE_SHORT; TestSelection selector = TestSelection.NO_ROI_NO_DATA; testOperation(testImageShort, shortToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testShortToAllTypesFull() { boolean roiUsed = true; boolean noDataPresent = true; boolean useRoiAccessor = true; int dataType = DataBuffer.TYPE_SHORT; TestSelection selector = TestSelection.ROI_ACCESSOR_NO_DATA; testOperation(testImageShort, shortToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testUshortToAllTypes() { boolean roiUsed = false; boolean noDataPresent = false; boolean useRoiAccessor = false; int dataType = DataBuffer.TYPE_USHORT; TestSelection selector = TestSelection.NO_ROI_ONLY_DATA; testOperation(testImageUShort, ushortToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testUshortToAllTypesROIBounds() { boolean roiUsed = true; boolean noDataPresent = false; boolean useRoiAccessor = false; int dataType = DataBuffer.TYPE_USHORT; TestSelection selector = TestSelection.ROI_ONLY_DATA; testOperation(testImageUShort, ushortToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageUShort, ushortToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testShortToAllTypesROIBounds() { boolean roiUsed = true; boolean noDataPresent = false; boolean useRoiAccessor = false; int dataType = DataBuffer.TYPE_SHORT; TestSelection selector = TestSelection.ROI_ONLY_DATA; testOperation(testImageShort, shortToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageShort, shortToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testIntToAllTypesROIBounds() { boolean roiUsed = true; boolean noDataPresent = false; boolean useRoiAccessor = false; int dataType = DataBuffer.TYPE_INT; TestSelection selector = TestSelection.ROI_ONLY_DATA; testOperation(testImageInt, intToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testIntToAllTypesROIAccessor() { boolean roiUsed = true; boolean noDataPresent = false; boolean useRoiAccessor = true; int dataType = DataBuffer.TYPE_INT; TestSelection selector = TestSelection.ROI_ACCESSOR_ONLY_DATA; testOperation(testImageInt, intToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageInt, intToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }
@Test public void testByteToAllTypesFull() { boolean roiUsed = true; boolean noDataPresent = true; boolean useRoiAccessor = true; int dataType = DataBuffer.TYPE_BYTE; TestSelection selector = TestSelection.ROI_ACCESSOR_NO_DATA; testOperation(testImageByte, byteToByteTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToUshortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToShortTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToIntTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToFloatTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); testOperation(testImageByte, byteToDoubleTable, roiUsed, noDataPresent, useRoiAccessor, dataType, selector); }