[vtkusers] vtkTrivialProducer issue
AGPX
agpxnet at yahoo.it
Tue Nov 4 06:57:03 EST 2008
Hi,
I need to create two renderers and show the same dataset (two slices (axial and coronal) of a manually loaded volume) in both, but (as stated in previous post) I can't use vtkTrivialProducer to vtkImageReslice because we can have only one vtkDataObject per vtkTrivialProducer.
So instead of:
vtkTrivialProducer *tp = vtkTrivialProducer::New();
tp->SetOutput(volume->GetMapper()->GetDataSetInput());
imageReslice->SetInputConnection(tp->GetOutputPort());
I solve my problem with this code:
imageReslice->SetInput(volume->GetMapper()->GetDataSetInput());
but as stated in vtkImageAlgorithm:
// Description:
// Set an input of this algorithm. You should not override these
// methods because they are not the only way to connect a pipeline.
// Note that these methods support old-style pipeline connections.
// When writing new code you should use the more general
// vtkAlgorithm::SetInputConnection(). These methods transform the
// input index to the input port index, not an index of a connection
// within a single port.
void SetInput(vtkDataObject *);
void SetInput(int, vtkDataObject*);
So, to avoid problem in future, SetInput should not be used. But, how I can use SetInputConnection instead of SetInput, if vtkTrivialProducer cannot be used in this scenario? (Volume is loaded by an external DICOM library and stored in a vtkStructuredPoints object).
Thanks in advance,
- AGPX
Unisciti alla community di Io fotografo e video, il nuovo corso di fotografia di Gazzetta dello sport:
http://www.flickr.com/groups/iofotografoevideo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081104/ef377694/attachment.htm>
More information about the vtkusers
mailing list