/** * Sets the sampled function f(x1,x2) for this view. * Function values are converted to colors using an index color model. * @param s1 the sampling of the variable x1; must be uniform. * @param s2 the sampling of the variable x2; must be uniform. * @param f array[n2][n1] of sampled function values f(x1,x2). */ public void set(Sampling s1, Sampling s2, float[][] f) { set(s1,s2,new float[][][]{f}); }
pv0.setClips(1,0.0f,2.0f); pv0.setClips(2,0.0f,2.0f); pv0.set(new float[][][]{f0,f1,f2}); // should have no effect!
Sampling s1 = new Sampling(1); Sampling s2 = vs; _pixels.set(s1,s2,va);
/** * Sets the sampled function f(x1,x2) for this view. * If compatible samplings for x1 and x2 have already been specified, * then this method uses them. Otherwise, this method assumes zero * first sample values and unit sampling intervals. * Function values are converted to colors using an index color model. * @param f array[n2][n1] of sampled function values f(x1,x2). */ public void set(float[][] f) { set(new float[][][]{f}); }
/** * Constructs a pixels view of the specified sampled functions f(x1,x2). * Assumes zero first sample values and unit sampling intervals. * Function values are converted to colors using a direct color model. * @param f array[nc][n2][n1] of sampled function values f(x1,x2), * where nc is the number (three or four) of color components. */ public PixelsView(float[][][] f) { set(f); }
/** * Constructs a pixels view of the specified sampled functions f(x1,x2). * Assumes zero first sample values and unit sampling intervals. * Function values are converted to colors using a direct color model. * @param s1 the sampling of the variable x1; must be uniform. * @param s2 the sampling of the variable x2; must be uniform. * @param f array[nc][n2][n1] of sampled function values f(x1,x2), * where nc is the number (three or four) of color components. */ public PixelsView(Sampling s1, Sampling s2, float[][][] f) { set(s1,s2,f); }
/** * Sets the sampled functions f(x1,x2) for this view. * If compatible samplings for x1 and x2 have already been specified, * then this method uses them. Otherwise, this method assumes zero * first sample values and unit sampling intervals. * Function values are converted to colors using a direct color model. * @param f array[nc][n2][n1] of sampled function values f(x1,x2), * where nc is the number (three or four) of color components. */ public void set(float[][][] f) { if (_s1!=null && _s1.getCount()==f[0][0].length && _s2!=null && _s2.getCount()==f[0].length) { set(_s1,_s2,f); } else { set(new Sampling(f[0][0].length),new Sampling(f[0].length),f); } }
/** * Sets sample indices for all slices. * @param k1 sample index for 1st dimension. * @param k2 sample index for 2nd dimension. * @param k3 sample index for 3rd dimension. */ public void setSlices(int k1, int k2, int k3) { if (_k1!=k1) { _k1 = k1; if (_transpose23) { _p23.set(_s3,_s2,slice23()); } else { _p23.set(_s2,_s3,slice23()); } _l12.set(lines12a(),lines12b()); _l13.set(lines13a(),lines13b()); } if (_k2!=k2) { _k2 = k2; _p13.set(_s1,_s3,slice13()); _l12.set(lines12a(),lines12b()); _l23.set(lines23a(),lines23b()); } if (_k3!=k3) { _k3 = k3; _p12.set(_s1,_s2,slice12()); _l13.set(lines13a(),lines13b()); _l23.set(lines23a(),lines23b()); } }