public ColorDeconvolutionStains(String name, StainVector stain1, StainVector stain2, StainVector stain3, double maxRed, double maxGreen, double maxBlue) { this.name = name; this.stain1 = stain1; this.stain2 = stain2; if (stain3 == null && stain1 != null && stain2 != null) this.stain3 = StainVector.makeResidualStainVector(stain1, stain2); else this.stain3 = stain3; this.maxRed = maxRed; this.maxGreen = maxGreen; this.maxBlue = maxBlue; }
StainVector stainNorm = StainVector.makeResidualStainVector(stainBase1, stainBase2); stainBase2 = StainVector.makeOrthogonalStainVector("Basis 2", stainBase1, stainNorm, false);