Examples of RectangularArea


Examples of net.algart.math.RectangularArea

        private ShiftWeighedStitchingFunc(List<? extends Frame<P>> frames) {
            this.areas = new RectangularArea[frames.size()];
            int n = 0;
            Point shiftMinus05 = null;
            for (Frame<P> frame : frames) {
                RectangularArea area = ShiftFramePosition.area(
                    frame.position().area().min(), frame.matrix().dimensions());
                // important: we should not use frame.position().area() here, because it can be too large
                if (shiftMinus05 == null) {
                    double[] shift = new double[area.coordCount()];
                    JArrays.fillDoubleArray(shift, -0.5);
                    shiftMinus05 = Point.valueOf(shift);
                }
                this.areas[n] = area.shift(shiftMinus05);
                n++;
            }
        }
View Full Code Here

Examples of net.algart.math.RectangularArea

        if (shiftPositions) {
            // optimization: instead of shifting results by area.min(), we just subtract area.min() from all positions
            List<Frame<P>> shiftedFrames = new ArrayList<Frame<P>>();
            for (Frame<P> frame : actualFrames) {
                Matrix<? extends PArray> m = frame.matrix();
                RectangularArea shiftedArea = frame.position().area().shift(area.min().symmetric());
                P position = castPosition(ShiftFramePosition.valueOf(shiftedArea));
                // here we are sure that P is ShiftFramePosition, in other case shiftPosition(...) cannot return true
                shiftedFrames.add(DefaultFrame.valueOf(m, position));
            }
            actualFrames = shiftedFrames;
View Full Code Here

Examples of net.algart.math.RectangularArea

                assert subPos[k] < dim[k];
                subDim[k] = Math.min(tileDim[k], dim[k] - subPos[k]);
                subMin[k] = offset.coord(k) + subPos[k];
                subMax[k] = subMin[k] + subDim[k];
            }
            final RectangularArea subArea = RectangularArea.valueOf(Point.valueOf(subMin), Point.valueOf(subMax));
            final Matrix<? extends UpdatablePArray> subResult = result.subMatr(subPos, subDim);
            final List<Frame<P>> localFrames = actualFrames(subArea);
            Stitcher<P> localStitcher = frames(localFrames);
            // reduce the number of frames in stitcher as early as possible
            final double requiredMemory = sizeOfFrames(localFrames);
View Full Code Here

Examples of net.algart.math.RectangularArea

            this.inverseTransforms = new CoordinateTransformationOperator[frames.size()];
            int n = 0;
            Point shiftMinus05 = null;
            for (Frame<P> frame : frames) {
                UniversalFramePosition p = frame.position();
                RectangularArea area = ShiftFramePosition.area(
                    Point.origin(frame.dimCount()), frame.matrix().dimensions());
                if (shiftMinus05 == null) {
                    double[] shift = new double[area.coordCount()];
                    JArrays.fillDoubleArray(shift, -0.5);
                    shiftMinus05 = Point.valueOf(shift);
                }
                this.areasInMatrices[n] = area.shift(shiftMinus05);
                this.inverseTransforms[n] = p.inverseTransform();
                n++;
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.