public void InitialiseImage(ImageL16 imgIn)
        {
            lock (Lock)
            {
                if (imgIn == null || !imgIn.HasAllocatedImage)
                {
                    Image       = null;
                    Initialised = false;
                    return;
                }
                imgIn.ImageUpdate           += new EventHandler(imgIn_ImageUpdate);
                imgIn.ImageAttributesUpdate += new EventHandler <ImageAttributesChangedEventArgs>(imgIn_ImageAttributesUpdate);

                Allocate(imgIn.ImageAttributes);
            }
        }
Ejemplo n.º 2
0
        //called when data for any output pin is requested
        public void Evaluate(int SpreadMax)
        {
            if (FPinInInput[0] != FInput)
            {
                FInput              = FPinInInput[0];
                FInput.ImageUpdate += new EventHandler(FImage_ImageUpdate);
                FOutput             = new ImageL16();
                FThresholded        = new Image <Gray, ushort>(new Size(FInput.Width, FInput.Height));
            }

            lock (FLock)
            {
                FHold      = FPinInHold[0];
                FThreshold = (int)FPinInThreshold[0];
            }
        }
Ejemplo n.º 3
0
		public void InitialiseImage(ImageL16 imgIn)
		{
			lock (Lock)
			{
				if (imgIn == null || !imgIn.HasAllocatedImage)
				{
					Image = null;
					Initialised = false;
					return;
				}
				imgIn.ImageUpdate += new EventHandler(imgIn_ImageUpdate);
				imgIn.ImageAttributesUpdate += new EventHandler<ImageAttributesChangedEventArgs>(imgIn_ImageAttributesUpdate);

				Allocate(imgIn.ImageAttributes);
			}
		}
		//called when data for any output pin is requested
		public void Evaluate(int SpreadMax)
		{
			if (FPinInInput[0] != FInput)
			{
				FInput = FPinInInput[0];
				FInput.ImageUpdate += new EventHandler(FImage_ImageUpdate);
				FOutput = new ImageL16();
				FThresholded = new Image<Gray, ushort>(new Size(FInput.Width, FInput.Height));
			}

			lock (FLock)
			{
				FHold = FPinInHold[0];
				FThreshold = (int) FPinInThreshold[0];
			}

		}