Exemplo n.º 1
0
        public bool CheckInputSize(int SpreadMax)
        {
            if (!FInput.CheckInputSize() && FOutput.SliceCount == SpreadMax)
            {
                return(false);
            }

            lock (FLockProcess)
            {
                if (FInput[0] == null)
                {
                    SpreadMax = 0;
                }

                for (int i = FProcess.SliceCount; i < SpreadMax; i++)
                {
                    Add(FInput[i]);
                }

                if (FProcess.SliceCount > SpreadMax)
                {
                    for (int i = SpreadMax; i < FProcess.SliceCount; i++)
                    {
                        Dispose(i);
                    }

                    FProcess.SliceCount = SpreadMax;
                    FOutput.SliceCount  = SpreadMax;
                }

                FOutput.AlignOutputPins();
            }

            return(true);
        }
Exemplo n.º 2
0
        //called when data for any output pin is requested
        public void Evaluate(int SpreadMax)
        {
            if (!FInitialised)
            {
                FInputs      = new CVImageInputSpread(FPinInImage);
                FInitialised = true;
            }

            FInputs.CheckInputSize();

            Output(FInputs.SliceCount);
        }
Exemplo n.º 3
0
        public bool CheckInputSize()
        {
            bool changed = FInput.CheckInputSize();

            for (int i = FProcess.SliceCount; i < FInput.SliceCount; i++)
            {
                Add(FInput[i]);
            }

            if (FProcess.SliceCount > FInput.SliceCount)
            {
                for (int i = FInput.SliceCount; i < FProcess.SliceCount; i++)
                {
                    FProcess[i].Dispose();
                }
                FProcess.SliceCount = FInput.SliceCount;
            }

            return(changed);
        }