@Override public void getF(int index, float[] value) { for( int i = 0; i < image.getNumBands(); i++ ) { value[i] = image.data[index++]; } }
@Override public void setF(int index, float[] value) { for( int i = 0; i < image.getNumBands(); i++ ) { image.data[index++] = (long)value[i]; } }
public static void convert( InterleavedS64 from, InterleavedF32 to ) { if (from.isSubimage() || to.isSubimage()) { final int N = from.width * from.getNumBands(); for (int y = 0; y < from.height; y++) { int indexFrom = from.getIndex(0, y); int indexTo = to.getIndex(0, y); for (int x = 0; x < N; x++) { to.data[indexTo++] = ( float )( from.data[indexFrom++] ); } } } else { final int N = from.width * from.height * from.getNumBands(); for (int i = 0; i < N; i++) { to.data[i] = ( float )( from.data[i] ); } } }
public static void convert( InterleavedS64 from, InterleavedS32 to ) { if (from.isSubimage() || to.isSubimage()) { final int N = from.width * from.getNumBands(); for (int y = 0; y < from.height; y++) { int indexFrom = from.getIndex(0, y); int indexTo = to.getIndex(0, y); for (int x = 0; x < N; x++) { to.data[indexTo++] = ( int )( from.data[indexFrom++] ); } } } else { final int N = from.width * from.height * from.getNumBands(); for (int i = 0; i < N; i++) { to.data[i] = ( int )( from.data[i] ); } } }
public static void convert( InterleavedS64 from, InterleavedI8 to ) { if (from.isSubimage() || to.isSubimage()) { final int N = from.width * from.getNumBands(); for (int y = 0; y < from.height; y++) { int indexFrom = from.getIndex(0, y); int indexTo = to.getIndex(0, y); for (int x = 0; x < N; x++) { to.data[indexTo++] = ( byte )( from.data[indexFrom++] ); } } } else { final int N = from.width * from.height * from.getNumBands(); for (int i = 0; i < N; i++) { to.data[i] = ( byte )( from.data[i] ); } } }
public static void convert( InterleavedS64 from, InterleavedI16 to ) { if (from.isSubimage() || to.isSubimage()) { final int N = from.width * from.getNumBands(); for (int y = 0; y < from.height; y++) { int indexFrom = from.getIndex(0, y); int indexTo = to.getIndex(0, y); for (int x = 0; x < N; x++) { to.data[indexTo++] = ( short )( from.data[indexFrom++] ); } } } else { final int N = from.width * from.height * from.getNumBands(); for (int i = 0; i < N; i++) { to.data[i] = ( short )( from.data[i] ); } } }
public static void convert( InterleavedS64 from, InterleavedF64 to ) { if (from.isSubimage() || to.isSubimage()) { final int N = from.width * from.getNumBands(); for (int y = 0; y < from.height; y++) { int indexFrom = from.getIndex(0, y); int indexTo = to.getIndex(0, y); for (int x = 0; x < N; x++) { to.data[indexTo++] = ( double )( from.data[indexFrom++] ); } } } else { final int N = from.width * from.height * from.getNumBands(); for (int i = 0; i < N; i++) { to.data[i] = ( double )( from.data[i] ); } } }
public static void average( InterleavedS64 from , GrayS64 to ) { final int numBands = from.getNumBands();