use of org.codice.imaging.nitf.core.image.ImageBand in project alliance by codice.
the class TreUtilityTest method createImageBand.
public static ImageBand createImageBand() {
ImageBand imageBand = mock(ImageBand.class);
when(imageBand.getImageRepresentation()).thenReturn("RGB");
when(imageBand.getSubCategory()).thenReturn("XXX");
return imageBand;
}
use of org.codice.imaging.nitf.core.image.ImageBand in project alliance by codice.
the class TreUtilityTest method createImageSegment.
public static ImageSegment createImageSegment(DateTime imageDateTime) {
SecurityMetadata securityMetadata = createSecurityMetadata();
ImageBand imageBand = createImageBand();
ImageSegment imageSegment = mock(ImageSegment.class);
TreCollection treCollection = new TreCollectionImpl();
when(imageSegment.getFileType()).thenReturn(FileType.NITF_TWO_ONE);
when(imageSegment.getNumBands()).thenReturn(3);
when(imageSegment.getActualBitsPerPixelPerBand()).thenReturn(8);
when(imageSegment.getIdentifier()).thenReturn("12345");
when(imageSegment.getImageDateTime()).thenReturn(imageDateTime);
when(imageSegment.getImageTargetId()).thenReturn(new TargetIdImpl());
when(imageSegment.getImageIdentifier2()).thenReturn("");
when(imageSegment.getSecurityMetadata()).thenReturn(securityMetadata);
when(imageSegment.getImageSource()).thenReturn("");
when(imageSegment.getNumberOfRows()).thenReturn(2048L);
when(imageSegment.getNumberOfColumns()).thenReturn(2048L);
when(imageSegment.getPixelValueType()).thenReturn(PixelValueType.INTEGER);
when(imageSegment.getImageRepresentation()).thenReturn(ImageRepresentation.RGBTRUECOLOUR);
when(imageSegment.getImageCategory()).thenReturn(ImageCategory.MULTISPECTRAL);
when(imageSegment.getActualBitsPerPixelPerBand()).thenReturn(8);
when(imageSegment.getPixelJustification()).thenReturn(PixelJustification.LEFT);
when(imageSegment.getImageCoordinatesRepresentation()).thenReturn(ImageCoordinatesRepresentation.NONE);
when(imageSegment.getImageCompression()).thenReturn(ImageCompression.NOTCOMPRESSED);
when(imageSegment.getImageBandZeroBase(anyInt())).thenReturn(imageBand);
when(imageSegment.getImageMode()).thenReturn(ImageMode.BANDSEQUENTIAL);
when(imageSegment.getNumberOfBlocksPerRow()).thenReturn(4);
when(imageSegment.getNumberOfBlocksPerColumn()).thenReturn(4);
when(imageSegment.getNumberOfPixelsPerBlockHorizontal()).thenReturn(512L);
when(imageSegment.getNumberOfPixelsPerBlockVertical()).thenReturn(512L);
when(imageSegment.getImageDisplayLevel()).thenReturn(1);
when(imageSegment.getAttachmentLevel()).thenReturn(2);
when(imageSegment.getImageLocationRow()).thenReturn(0);
when(imageSegment.getImageLocationColumn()).thenReturn(0);
when(imageSegment.getImageMagnification()).thenReturn("1.00");
when(imageSegment.getTREsRawStructure()).thenReturn(treCollection);
return imageSegment;
}
Aggregations