/** * Constructs a tensors panel for the specified tensor field. * Assumes default unit samplings. * @param et the eigentensors; by reference, not by copy. */ public TensorsPanel(EigenTensors3 et) { this(new Sampling(et.getN1()), new Sampling(et.getN2()), new Sampling(et.getN3()), et); }
/** * Finds the largest eigenvalue to be used for scaling. */ private float findMaxEigenvalue() { int n1 = _et.getN1(); int n2 = _et.getN2(); int n3 = _et.getN3(); float[] e = new float[3]; float emax = 0.0f; for (int i3=0; i3<n3; ++i3) { for (int i2=0; i2<n2; ++i2) { for (int i1=0; i1<n1; ++i1) { _et.getEigenvalues(i1,i2,i3,e); float emaxi = max(e[0],e[1],e[2]); if (emax<emaxi) emax = emaxi; } } } return emax; } }