Dear All,<br><br>I have a small problem in vtk: I have a class (not derived from any VTK object) that has methods for dealing with vtkImageData in various ways. For example, I am extracting one scalar component from a multi-component vtkImageData object using this function<br>
<br>vtkStructuredPoints* GetField (int index)<br>{<br> vtkImageExtractComponents *extr = vtkImageExtractComponents::New ();<br> extr->SetInput (this->GetInputField ());<br> extr->SetComponents (index);<br>
extr->Update ();<br> return (vtkStructuredPoints*) (extr->GetOutput ());<br>}<br clear="all"><br>I am wondering if there is a problem with deallocating the <i>extr</i> object in the above function. I obviously cannot manually call Delete () on it, since I must use it for returning my output. Is the Delete () method automatically called when returning from the function to the calling routine? How 'big' is the extr object? Is it of the same size as the input to the vtkImageExtractComponents filter?<br>
<br>Thanks for taking the pain in reading this!<br>Adrian<br>-- <br>---------------------------------------------------<br>Adrian Albert<br>School of Engineering and Science<br>Jacobs University Bremen<br>Germany<br>Tel.: 00494212003258