[Insight-users] problem of number copies of my data: ReleaseDataFlagOn

Renaud Isabelle renauisa at yahoo.fr
Fri Jul 8 11:21:46 EDT 2005


Hi,
 
I'm dealing with large data of medical images: 1296*128*201 of short type, so each copie of my data requires 66MB! 
 
That's why it is important to release my data and limit the number of my copies. To do so, I try to use ReleaseDataFlagOn() on each filter of my pipeline.
 
I checked the size of my process while execution of my program. At the end, my program occupes 238MB, so I can deduce that I have at least 3 copies of my data. However, all that I need to keep in memory is my reader's output. So just one copy!
 
What can I other else release. I can't see where are the other copies....
 
BTW, sometimes in litterature, I can see:
- filter->ReleaseDataFlagOn();
- filter->GetOutput()->ReleaseDataFlagOn();
What is best to use?
 
Here is my code:
 
 //release data
 absFilter->GetOutput()    ->ReleaseDataFlagOn(); //AbsImageFilterType
 logFilter->GetOutput()    ->ReleaseDataFlagOn(); //LogImageFilterType
 rescaleFilter->GetOutput()->ReleaseDataFlagOn(); //RescaleFilterType
 connector->GetImporter()  ->ReleaseDataFlagOn(); //filter ITK-->VTK
 connector->GetExporter()  ->ReleaseDataFlagOn(); 
 shiftscale->GetOutput()   ->ReleaseDataFlagOn(); //vtkImageShiftScale
 
//pipeline
 absFilter->SetInput( imageInitiale ); //imageinitiale is the only copy that I need
 rescaleFilter->SetInput( absFilter->GetOutput() );
 connector->SetInput( rescaleFilter->GetOutput() );  
 shiftscale->SetInput( connector->GetOutput() );
 shiftscale->UpdateWholeExtent(); 
 viewer.SetInput(shiftscale->GetOutput());
 
 viewer.Render();

Thanks for helping,

Isabelle



		
---------------------------------
 Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
 Téléchargez le ici !  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050708/47eb7cd2/attachment.htm


More information about the Insight-users mailing list