<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;"> 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;"> 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;"> 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;"> renWin->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;"> renWin->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;"> </span><br
style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"> </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;"> imageReader->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;"> imageReader->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;"> 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;"> actor->SetInput(imageReader->GetOutput());</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"> ren->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;"> </span><br style="font-family: Courier
New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"> iren->Initialize();</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"> iren->Start();</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;"> imageReader->Delete();</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"> actor->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. 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>