<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div>Hi,<br><br>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.<br><br>So instead of:<br><br><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; vtkTrivialProducer *tp = vtkTrivialProducer::New();</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; tp-&gt;SetOutput(volume-&gt;GetMapper()-&gt;GetDataSetInput());</span><br style="font-family: Courier
 New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; imageReslice-&gt;SetInputConnection(tp-&gt;GetOutputPort());</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><br>I solve my problem with this code:<br><br><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; imageReslice-&gt;SetInput(volume-&gt;GetMapper()-&gt;GetDataSetInput());</span><br><br>but as stated in vtkImageAlgorithm:<br><br><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; // Description:</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; // Set an input of this algorithm. You should not override these</span><br style="font-family: Courier
 New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; // methods because they are not the only way to connect a pipeline.</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; // Note that these methods support old-style pipeline connections.</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; // When writing new code you should use the more general</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; // vtkAlgorithm::SetInputConnection().&nbsp; These methods transform the</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span
 style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; // input index to the input port index, not an index of a connection</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; // within a single port.</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; void SetInput(vtkDataObject *);</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">&nbsp; void SetInput(int, vtkDataObject*);</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><br>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).<br><br>Thanks in advance,<br><br>- AGPX<br></div></div><br>



      <hr size=1><font face="Arial" size="2">Scopri la community di Io fotografo e video<br>
<a href=http://us.rd.yahoo.com/SIG=11ud6kror/**http%3A%2F%2Fwww.flickr.com%2Fgroups%2Fiofotografoevideo%2F>Il nuovo corso</a> di Gazzetta dello sport per diventare veri fotografi!</font></body></html>