/** * Constructs an image panel group for all three axes. * @param s1 sampling of 1st dimension (Z axis). * @param s2 sampling of 2nd dimension (Y axis). * @param s3 sampling of 3rd dimension (X axis). * @param f 3D array of floats. */ public ImagePanelGroup(Sampling s1, Sampling s2, Sampling s3, float[][][] f) { this(s1,s2,s3,new SimpleFloat3(f)); }
private static Float3[] toFloat3(float[][][][] f) { Float3[] f3 = new Float3[f.length]; for (int i=0; i<f.length; ++i) f3[i] = new SimpleFloat3(f[i]); return f3; }
/** * Constructs an image panel for specified sampling and 3D array. * @param s1 sampling of 1st dimension (Z axis). * @param s2 sampling of 2nd dimension (Y axis). * @param s3 sampling of 3rd dimension (X axis). * @param f 3D array of floats. */ public ImagePanel(Sampling s1, Sampling s2, Sampling s3, float[][][] f) { this(s1,s2,s3,new SimpleFloat3(f)); }
/** * Constructs an image panel group for all three axes. * Both 3D arrays of floats much be consistent with the specified sampling. * @param s1 sampling of 1st dimension (Z axis). * @param s2 sampling of 2nd dimension (Y axis). * @param s3 sampling of 3rd dimension (X axis). * @param f1 1st 3D array of floats. * @param f2 2nd 3D array of floats. */ public ImagePanelGroup2( Sampling s1, Sampling s2, Sampling s3, float[][][] f1, float[][][] f2) { this(s1,s2,s3,new SimpleFloat3(f1),new SimpleFloat3(f2)); }
/** * Constructs image panel group for specified axes. * @param s1 sampling of 1st dimension (Z axis). * @param s2 sampling of 2nd dimension (Y axis). * @param s3 sampling of 3rd dimension (X axis). * @param f 3D array of floats. * @param axes array of axes, one for each image panel. */ public ImagePanelGroup( Sampling s1, Sampling s2, Sampling s3, float[][][] f, Axis[] axes) { this(s1,s2,s3,new SimpleFloat3(f),axes); }
/** * Constructs a plot panel with three pixels views. * @param orientation the orientation of views. * @param axesPlacement the placement of axes. * @param s1 sampling of the 1st dimension. * @param s2 sampling of the 2nd dimension. * @param s3 sampling of the 3rd dimension. * @param f 3-D array of floats. */ public PlotPanelPixels3( Orientation orientation, AxesPlacement axesPlacement, Sampling s1, Sampling s2, Sampling s3, float[][][] f) { this(orientation,axesPlacement,s1,s2,s3,new SimpleFloat3(f)); }
/** * Constructs an image panel group for specified axes. * Both 3D arrays of floats much be consistent with the specified sampling. * @param s1 sampling of 1st dimension (Z axis). * @param s2 sampling of 2nd dimension (Y axis). * @param s3 sampling of 3rd dimension (X axis). * @param f1 1st 3D array of floats. * @param f2 2nd 3D array of floats. * @param axes array of axes, one for each image panel. */ public ImagePanelGroup2( Sampling s1, Sampling s2, Sampling s3, float[][][] f1, float[][][] f2, Axis[] axes) { this(s1,s2,s3,new SimpleFloat3(f1),new SimpleFloat3(f2),axes); }
public void testRandom() { int n1 = 10; int n2 = 11; int n3 = 12; float[][][] a = randfloat(n1,n2,n3); SimpleFloat3 sf3 = new SimpleFloat3(a); float[][][] c = copy(a); testRandom1(sf3,c); testRandom2(sf3,c); testRandom3(sf3,c); }
public void test123() { int n1 = 10; int n2 = 11; int n3 = 12; float[][][] a = randfloat(n1,n2,n3); SimpleFloat3 sf3 = new SimpleFloat3(a); float[][][] c = copy(a); test1(sf3,c); test2(sf3,c); test3(sf3,c); }
Float3 f3 = new SimpleFloat3(a); ImagePanel iop = new ImagePanel(sz,sy,sx,f3); aaf.addChild(iop);