Thanks, Jothy.<div>I will check if this does what I intend to get done.</div><div><br></div><div>best regards,</div><div>Divya</div><div><br><div>
<br><br><div class="gmail_quote">On Mon, Oct 31, 2011 at 2:36 PM, Jothybasu Selvaraj <span dir="ltr"><<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div dir="ltr">May be you should use vtkImageChangeInformation(changer) and then<br><br>this->imageData=changer->GetOutput().<br><br><br>Jothy <br><br><div class="gmail_quote"><div><div></div><div class="h5">On Mon, Oct 31, 2011 at 2:32 PM, Divya Rathore <span dir="ltr"><<a href="mailto:divyarathore@gmail.com" target="_blank">divyarathore@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">Hi All,
<div><br></div><div>I have a vtkSmartPointer of vtkImageData:</div><div><br></div><div>// declaration in header //</div><div>vtkSmartPointer<vtkImageData> imageData;</div><div><br></div><div>// implementation in .cpp //</div>
<div>// get values from elsewhere and feed into this //</div><div><div>imageData->SetDimensions(width, height, depth);</div><div>imageData->SetNumberOfScalarComponents(1);</div><div>imageData->SetScalarTypeToUnsignedShort();</div>
<div>imageData->SetSpacing(spacingX, spacingY, spacingZ);</div><div>imageData->SetOrigin(originX, originY, originZ);</div></div><div><br></div><div><br></div><div>During the overall lifecycle of the application, I need to NULL check and feed values into imageData multiple times. It being a smart pointer, I can't call:</div>
<div><br></div><div>imageData->Delete(); // WRONG! Its a smart pointer.</div><div><br></div><div>what's the way to reinitialize the dimensions, spacing, origin etc (emptying this pointer back to its initial state)?</div>
<div><br></div><div><br></div><div>best regards,</div><div>Divya</div>
<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br><div dir="ltr">Jothybasu K Selvaraj<br>PhD Student<br>University of Liverpool<br>Liverpool,UK<br></div><br>
</font></div>
</blockquote></div><br></div></div>