private void Add(CVImageInput input) { T addition = new T(); addition.SetInput(input); FProcess.Add(addition); }
public bool CheckInputSize() { bool noInput = false; if (FInputPin.SliceCount == 0) noInput = true; else if (FInputPin[0] == null) noInput = true; if (noInput) { if (FInput.SliceCount == 0) return false; else { FInput.SliceCount = 0; return true; } } bool changed = false; if (FInput.SliceCount != FInputPin.SliceCount) { changed = true; //add for (int iAdd = FInput.SliceCount; iAdd < FInputPin.SliceCount; iAdd++) { CVImageInput add = new CVImageInput(); if (FInputPin[iAdd] != null) add.Connect(FInputPin[iAdd]); FInput.Add(add); } //remove if (FInput.SliceCount != FInputPin.SliceCount) { for (int iDispose = FInputPin.SliceCount; iDispose < FInput.SliceCount; iDispose++) { FInput[iDispose].Dispose(); } FInput.SliceCount = FInputPin.SliceCount; } } for (int i = 0; i < FInput.SliceCount; i++) if (!FInput[i].ConnectedTo(FInputPin[i])) { changed = true; FInput[i].Connect(FInputPin[i]); } return changed; }
private void Add(CVImageInput input) { CVImageOutput output = new CVImageOutput(); T addition = new T(); addition.SetInput(input); addition.SetOutput(output); FProcess.Add(addition); FOutput.Add(output); }
public bool HasInput(CVImageInput input) { return(FInput == input); }
public void SetInput(CVImageInput input) { FInput = input; ReAllocate(); }
public bool CheckInputSize() { bool noInput = false; if (FInputPin.SliceCount == 0) { noInput = true; } else if (FInputPin[0] == null) { noInput = true; } if (noInput) { if (FInput.SliceCount == 0) { return(false); } else { FInput.SliceCount = 0; return(true); } } bool changed = false; if (FInput.SliceCount != FInputPin.SliceCount) { changed = true; //add for (int iAdd = FInput.SliceCount; iAdd < FInputPin.SliceCount; iAdd++) { CVImageInput add = new CVImageInput(); if (FInputPin[iAdd] != null) { add.Connect(FInputPin[iAdd]); } FInput.Add(add); } //remove if (FInput.SliceCount != FInputPin.SliceCount) { for (int iDispose = FInputPin.SliceCount; iDispose < FInput.SliceCount; iDispose++) { FInput[iDispose].Dispose(); } FInput.SliceCount = FInputPin.SliceCount; } } for (int i = 0; i < FInput.SliceCount; i++) { if (!FInput[i].ConnectedTo(FInputPin[i])) { changed = true; FInput[i].Connect(FInputPin[i]); } } return(changed); }
public bool HasInput(CVImageInput input) { return FInput == input; }