[vtkusers] filters, SetInputConnection vs SetInput

dean.inglis at camris.ca dean.inglis at camris.ca
Thu Feb 22 16:51:11 EST 2007


Hi,

I have a vtkImageData that I create on
the fly: not as output from a filter or reader
object.   I want to use vtkImageClip to extract
a slice for processing, but I get the error:

ERROR: In d:\Developer\Sources\STABLE\VTK_5.0.2\Filtering\vtkDemandDrivenPipeline.cxx, line 710
vtkStreamingDemandDrivenPipeline (0E30D820): Input port 0 of algorithm vtkImageClip(0E30DB00) has 0 connections but is not optional.

since I initialize the vtkImageClip using:

  vtkImageClip* clip = vtkImageClip::New();
  int* ext = this->ImageViewer->GetImageActor()->GetDisplayExtent();
  clip->SetOutputWholeExtent(ext[0],ext[1],ext[2],ext[3],ext[4],ext[5]);
  clip->ClipDataOn();
  clip->SetInput(this->ImageData);
  clip->Update();


without using the 
SetInputConnection(some_filter-GetOutputPort()) paradigm. Is there a way around this???

thanks,
Dean






More information about the vtkusers mailing list