<div>Are you sure that your ImageChangeInformation is connected to the Volume16Reader?</div>
<div>&nbsp;</div>
<div>Bill<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 2/27/07, <b class="gmail_sendername">Michael Knopke</b> &lt;<a href="mailto:Michael.Knopke@gmx.de">Michael.Knopke@gmx.de</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br><br>I just noticed that using vtkImageChangeInformation in my pipeline always<br>changes the ScalarType to double, before the type was unsigned_short
<br><br>even when calling vtkImageCast-&gt;SetOutputScalarTypeToUnsignedShort();<br><br>the scalartype is still double. Very Strange.<br><br>Code:<br><br>v16 = vtkVolume16Reader::New();<br><br>v16...extend and spacing<br>
<br>v16-&gt;GetOutput()-&gt;GetScalarTypeAsString(); // returns unsigned_short<br><br>image_Change = vtkImageChangeInformation::New();<br>image_Change-&gt;CenterImageOn();<br><br>image_Change-&gt;GetOutput()-&gt;GetScalarTypeAsString(); // returns double
<br><br>image_Cast = vtkImageCast::New();<br>image_Cast-&gt;SetOutputScalarTypeToUnsignedShort();<br><br>image_Cast-&gt;GetOutput()-&gt;GetScalarTypeAsString(); //returns double???<br><br>The reason I use GetOutput() and not as proposed for new standard GetOutputPort() is that some classes (like vtkImagePlaneWidget) don&#39;t support setting a port but use direct access to imageData ( via -&gt;SetInput())
<br><br>So using vtkImageChangeInformation with vtkImagePlaneWidget as input will give a wrong reslice (white output) because the datatype changed. Using v16 directly works.<br><br>Regards<br><br>Michael<br><br><br><br>--
<br>&quot;Feel free&quot; - 5 GB Mailbox, 50 FreeSMS/Monat ...<br>Jetzt GMX ProMail testen: <a href="http://www.gmx.net/de/go/mailfooter/promail-out">www.gmx.net/de/go/mailfooter/promail-out</a><br>_______________________________________________
<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br>