[Insight-users] Functions vs classes
Radhika Sivaramakrishna
Radhika Sivaramakrishna" <radshashi at earthlink . net
Tue, 23 Dec 2003 07:57:30 -0800
This is a multi-part message in MIME format.
------=_NextPart_000_0006_01C3C92A.6A2058A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Luis,
I agree with you that going with classes is a better way and I will =
ultimately do that as I get deeper and deeper into this.=20
I have another question regarding functions and the Execute() function =
in a class.
In my previous example, if I had wanted to return an image pointer of =
the same type as one of the inputs, is there a way to do it? The only =
way I can think of is to pass a imagetype pointer (with space allocated) =
to the function and copying the result into it in my function. Is there =
a better way to do this?
Even if I were to write it using classes, and I want my Execute() method =
to finally produce an image type, how do I return this?
How is this done with GetOutput() member functions for the various =
filters?
Thanks
Radhika
------=_NextPart_000_0006_01C3C92A.6A2058A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Luis,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I agree with you that going with =
classes is a=20
better way and I will ultimately do that as I get deeper and deeper into =
this.=20
</FONT><FONT face=3DArial size=3D2></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I have another question regarding =
functions and the=20
Execute() function in a class.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>In my previous example, if I had wanted =
to return=20
an image pointer of the same type as one of the inputs, is there a way =
to do it?=20
The only way I can think of is to pass a imagetype pointer (with space=20
allocated) to the function and copying the result into it in my =
function. Is=20
there a better way to do this?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Even if I were to write it using =
classes, and I=20
want my Execute() method to finally produce an image type, how do I =
return=20
this?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>How is this done with GetOutput() =
member functions=20
for the various filters?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Radhika</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0006_01C3C92A.6A2058A0--