<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:verdana,helvetica,sans-serif;font-size:10pt;color:#000000;"><div>Hi Guys/Girls,<br><br>Please take a look at the simple code snippet below:<br><br><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">int main ()</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">{</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; vtkRenderer *ren = vtkRenderer::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; vtkRenderWindow *renWin = vtkRenderWindow::New();</span><br style="font-family:
 Courier New,courier,monaco,monospace,sans-serif;"><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; vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::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; renWin-&gt;SetInteractor(iren);</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><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; renWin-&gt;AddRenderer (ren);</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; </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; </span><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">vtkPNGReader</span><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"> *imageReader = vtkPNGReader::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; imageReader-&gt;SetFileName("image.png");</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; imageReader-&gt;Update();</span><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"></span><br style="font-family:
 Courier New,courier,monaco,monospace,sans-serif;"><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; vtkImageActor *actor = vtkImageActor::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; actor-&gt;SetInput(imageReader-&gt;GetOutput());</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; ren-&gt;AddActor(actor);</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; </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; iren-&gt;Initialize();</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; iren-&gt;Start();</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; </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; imageReader-&gt;Delete();</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; actor-&gt;Delete();</span><br style="font-family: Courier
 New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">}</span><br><br>It simply loads an image (image.png) and displays it.&nbsp; In memory, it takes up about 16MB of memory. When I strip away the image loading part and just leave in the render window, interactor, and renderer.. the program uses about 6.5MB of memory.<br><br>The image I had used is about 3.2MB in size. So from my calculations, just loading and displaying the image used just over 9MB, which is about three times he original image size!!<br><br>Is this accurate? Am I doing something wrong? Is there a more efficient way to do this?<br><br>Any help is much appreciated.<br><br>Thanks,<br><br>John E<br></div></div><br>



      </body></html>