[Insight-users] Problem with C++ fuctions
Daniela Sacchetto
danysunflower at hotmail.it
Tue Sep 21 04:55:40 EDT 2010
Hi everyone,
I have a problem. I'm not expert in C++ but now I would like to improve my code using functions.
I have a code that runs very well, but that code write every image and so, I have too much memory leak every times that I run it.
I would like to save only two image, but the code uses 3 images to work.
My code was:
function1(argv[1],argv[2]);
function2(argv[2],argv[3]);
function3(argv[3],argv[4]);
where argv[] are the ImageFileNames. Now I would like to do something similar to:
void fuction1(char inIM[],char outDT[]);
OutputImageType fuction2(char outDT[]);
void fuction3(char outClean[], char outSkel[]);
[...]
OutputImageType::Pointer outClean = OutputImageType::New();
outClean->SetBufferedRegion( outClean->GetRequestedRegion() );
outClean->Allocate();
fuction1(argv[1],argv[2]);
out2=function2(argv[2]);
fuction3(out2,argv[3]);
My problem is that: I don't know how to obtain an image as a result of a fuction and then how to pass it to an other fuction.....
Sorry for this banal question....
Thanks
Daniela
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100921/34005dcc/attachment.htm>
More information about the Insight-users
mailing list