<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;"> 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;"> tp->SetOutput(volume->GetMapper()->GetDataSetInput());</span><br style="font-family: Courier
New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"> imageReslice->SetInputConnection(tp->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;"> imageReslice->SetInput(volume->GetMapper()->GetDataSetInput());</span><br><br>but as stated in vtkImageAlgorithm:<br><br><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"> // Description:</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"> // 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;"> // 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;"> // 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;"> // 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;"> // vtkAlgorithm::SetInputConnection(). 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;"> // 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;"> // 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;"> 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;"> 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>