/** * Checks if transforms are compatibles with this implementation. */ @Override boolean isValid() { return super.isValid() && (getSourceDimensions() == 2) && (getTargetDimensions() == 2); }
/** * Delegates to {@link ContextualParameters#completeTransform(MathTransformFactory, MathTransform)} * for this transformation and for its dependencies as well. */ private MathTransform completeTransform(final MathTransformFactory factory, final boolean create) throws FactoryException { ellipsoidToCentric.getContextualParameters().completeTransform(factory, null); centricToEllipsoid.getContextualParameters().completeTransform(factory, null); return context.completeTransform(factory, create ? this : null); }
/** * Returns the concatenation of this transform by the given scale and offset. * This method does not check if a simplification is possible. */ private MathTransform1D concatenate(final double scale, final double offset) { final LinearTransform1D t = LinearTransform1D.create(scale, offset); return t.isIdentity() ? this : new ConcatenatedTransformDirect1D(this, t); }
/** * Implementation of {@link #testAffineConcatenations()} for the given base. */ private void testAffineConcatenations(final double base) throws TransformException { final MathTransform1D linear = LinearTransform1D.create(C1, C0); transform = MathTransforms.concatenate(linear, LogarithmicTransform1D.create(base, OFFSET), linear); run(ConcatenatedTransformDirect1D.class, base, OFFSET, true, true); }
/** * Implementation of {@link #testAffineConcatenations()} for the given base. */ private void testAffineConcatenations(final double base) throws TransformException { final LinearTransform1D linear = LinearTransform1D.create(C1, C0); transform = MathTransforms.concatenate(linear, ExponentialTransform1D.create(base, SCALE), linear); run(ConcatenatedTransformDirect1D.class, base, SCALE, true, true); }
/** * Checks if transforms are compatibles with this implementation. */ @Override boolean isValid() { return super.isValid() && (getSourceDimensions() == 2) && (getTargetDimensions() == 2); }
/** * Checks if transforms are compatibles with this implementation. */ @Override boolean isValid() { return super.isValid() && getSourceDimensions() == 1 && getTargetDimensions() == 1; }
/** * Checks if transforms are compatibles with this implementation. */ @Override boolean isValid() { return super.isValid() && (getSourceDimensions() == 1) && (getTargetDimensions() == 1); }
/** * Same work than {@link AbstractMathTransform#beforeFormat(List, int, boolean)} * but with the knowledge that this transform is an inverse transform. */ @Override int beforeFormat(final List<Object> transforms, final int index, final boolean inverse) { final ContextualParameters parameters = getContextualParameters(); if (parameters != null) { return parameters.beforeFormat(transforms, index, inverse); } else { return AbstractMathTransform.this.beforeFormat(transforms, index, !inverse); } }
/** * Implementation of {@link #testSingle()} and {@link #testSingleWithScale()} for the given base. */ private void testSingle(final double base, final double scale) throws TransformException { transform = ExponentialTransform1D.create(base, scale); run(ExponentialTransform1D.class, base, scale, false, false); }
/** * Replaces the current {@link CopyTransform} by an instance of {@link ProjectiveTransform}. */ private void makeProjectiveTransform() { transform = new ProjectiveTransform(((CopyTransform) transform).getMatrix()); }
/** * Implementation of {@link #testAffinePreConcatenation()} for the given base. */ private void testAffinePreConcatenation(final double base) throws TransformException { transform = MathTransforms.concatenate(LinearTransform1D.create(C1, C0), LogarithmicTransform1D.create(base, OFFSET)); run(ConcatenatedTransformDirect1D.class, base, OFFSET, true, false); }
/** * Implementation of {@link #testAffinePostConcatenation()} for the given base. */ private void testAffinePostConcatenation(final double base) throws TransformException { transform = MathTransforms.concatenate(ExponentialTransform1D.create(base, SCALE), LinearTransform1D.create(C1, C0)); run(ConcatenatedTransformDirect1D.class, base, SCALE, false, true); }
/** * Returns the concatenation of this transform by the given scale and offset. * This method does not check if a simplification is possible. */ private MathTransform1D concatenate(final double scale, final double offset) { final LinearTransform1D t = LinearTransform1D.create(scale, offset); return t.isIdentity() ? this : new ConcatenatedTransformDirect1D(this, t); }
/** * Checks if transforms are compatibles with this implementation. */ @Override boolean isValid() { return super.isValid() && (getSourceDimensions() == 2) && (getTargetDimensions() == 2); }
/** * Delegates to {@link ContextualParameters#completeTransform(MathTransformFactory, MathTransform)} * for this transformation and for its dependencies as well. */ private MathTransform completeTransform(final MathTransformFactory factory, final boolean create) throws FactoryException { ellipsoidToCentric.getContextualParameters().completeTransform(factory, null); centricToEllipsoid.getContextualParameters().completeTransform(factory, null); return context.completeTransform(factory, create ? this : null); }
/** * Checks if transforms are compatibles with this implementation. */ @Override boolean isValid() { return super.isValid() && (getSourceDimensions() == 2) && (getTargetDimensions() == 2); }
/** * Checks if transforms are compatibles with this implementation. */ @Override boolean isValid() { return super.isValid() && getSourceDimensions() == 1 && getTargetDimensions() == 1; }
/** * Checks if transforms are compatibles with this implementation. */ @Override boolean isValid() { return super.isValid() && (getSourceDimensions() == 1) && (getTargetDimensions() == 1); }
/** * Implementation of {@link #testAffinePostConcatenation()} for the given base. */ private void testAffinePostConcatenation(final double base) throws TransformException { transform = MathTransforms.concatenate(LogarithmicTransform1D.create(base, OFFSET), LinearTransform1D.create(C1, C0)); run(ConcatenatedTransformDirect1D.class, base, OFFSET, false, true); }