Example #1
0
		public void Evaluate(int SpreadMax)
		{
			if (FFirstRun)
			{
				FOutImage[0] = new CVImageLink();
				FFirstRun = false;
			}

			if (FInDevices[0] != FCamera || FInEnabled.IsChanged)
			{
				try
				{
					throw (new Exception("Actually, this node doesn't work yet, sorry"));
					if (FCamera != null)
					{
						Disconnect();
					}
					if (FInEnabled[0])
					{
						FCamera = FInDevices[0];
						if (FCamera != null)
						{
							Connect();
						}
					}
					FOutStatus[0] = "OK";
				}
				catch (Exception e)
				{
					FOutStatus[0] = e.Message;
				}
			}
		}
        public void Connect(CVImageLink input)
        {
            Disconnect();

            FLink = input;

            if (FLink.Allocated)
            {
                FImageAttributesFresh = true;
                FImageFresh           = true;
            }

            AddListeners();
        }
Example #3
0
        void SetupOutput(int count)
		{
			FOutImage.SliceCount = count;
			for (int i = 0; i < count; i++)
			{
				FOutImage[i] = new CVImageLink();
			}
		}
		public AsImageDX11Instance()
		{
			Output = new CVImageLink();
		}
Example #5
0
		public bool ConnectedTo(CVImageLink input)
		{
			return (input == FLink);
		}
Example #6
0
		public void Disconnect()
		{
			RemoveListeners();
			FLink = null;
		}
Example #7
0
		public void Connect(CVImageLink input)
		{
			Disconnect();

			FLink = input;

			if (FLink.Allocated)
			{
				FImageAttributesFresh = true;
				FImageFresh = true;
			}

			AddListeners();
		}
		//called when data for any output pin is requested
		public void Evaluate(int SpreadMax)
		{
			if (SpreadMax == 0)
			{
				RemoveListeners();
				return;
			}

			int slice = FPinInSlice[0];
			if (FInput != FPinInInput[slice])
			{
				FInput = FPinInInput[slice];
				AddListeners();
				if (FInput.Allocated)
				{
					UpdateAttributes(FInput.ImageAttributes);
					UpdateImage();
				}
			}
		}
 public bool ConnectedTo(CVImageLink input)
 {
     return(input == FLink);
 }
 public void Disconnect()
 {
     RemoveListeners();
     FLink = null;
 }