<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=142041518-21082003>Sorry to bother you
all, but I am new to vtk and I have a few questions that I can't find answers to
in the FAQs and I haven't had much luck searching the archives. Well here are my
questions:</SPAN></FONT></DIV>
<OL>
<LI><FONT face=Arial size=2><SPAN class=142041518-21082003>What is the deal
with this New() and Delete() functions and hiding the constructors? Why not
simply overload the <EM>standard</EM> new and delete (and new[] and delete[])
for the class? Doesn't this New() and Delete() break the normal C++ allocation
and free mechanisim? Consider this vtkActor* actors = new vtkActor[100];. This
is not an unreasonable thing to do, I suspect, but can't be done with the
current design. Is there a compelling reason why custom method "New()" whas
chosen over the standard native "operator new()"?</SPAN></FONT></LI>
<LI><FONT face=Arial size=2><SPAN class=142041518-21082003>There appears to be
a few bugs in the smart pointer architecture, or am I missing something? Why
does the reference count start at 1? This causes the smart pointer clean up to
fail; consider the trivial case of: {<FONT size=3><EM><FONT
size=2>vtkSmartPointer<vtkConeSource> cone =
vtkConeSource::New();</FONT></EM></FONT><FONT size=2>}. The operator =()
increments the reference count to 2 so than when cone goes out of scope at
} the reference count is only decremented to 1 and the object is leaked.
</FONT></SPAN></FONT></LI>
<LI><FONT face=Arial size=2><SPAN class=142041518-21082003>The assignment
operator for smart pointers calls Swap on a const reference. Swap() is not a
const member. Is it not poor style to modify your const
arguments?</SPAN></FONT></LI>
<LI><FONT face=Arial size=2><SPAN class=142041518-21082003>There is no <FONT
size=2>vtkSmartPointer& </FONT><FONT color=#0000ff
size=2>operator</FONT><FONT size=2>=(const vtkSmartPointer& r)
defined so assignments between vtkSmartPointers will not reference count
properly (Register is not called on the RHS and the LHS is not
UnRegister()ed).</FONT></SPAN></FONT></LI>
<LI><FONT face=Arial size=2><SPAN class=142041518-21082003>Why isn't the
type bool used in the library? I've seen a few functions that appear to
be "yes/no" kinds of functions but they return int. This makes it impossible
to overload or specialize for bool types. Is there a good reason for not using
bool?</SPAN></FONT></LI>
<LI><FONT face=Arial size=2><SPAN class=142041518-21082003>Is there a bug in
<FONT size=2>SetNthOutput? I seems to cause a Register() call to "this"
(itself) - the object effectively references itself so it can never be
deleted. In the tests I did the object was in fact leaked (with a
reference count of 2 - one for the reference count initialization and one for
the self-reference).</FONT></SPAN></FONT></LI></OL>
<DIV><FONT face=Arial size=2><SPAN class=142041518-21082003>Any help with this
would be appreciated.</SPAN></FONT></DIV>
<P><I><FONT face="Times New Roman" color=#000080 size=4><IMG alt="GE logo"
src="cid:142041518@21082003-2b52">GE Medical Systems</FONT></I> <BR><FONT
face="Times New Roman" color=#ff0000
size=2>_______________________________________________</FONT> <BR></P><B><FONT
face=Arial color=#ff6600 size=2>
<P>
<MARQUEE scrollAmount=1 scrollDelay=400 direction=down behavior=alternate loop=0
height=20>John Dubois</MARQUEE></P></FONT></B>
<P><BR></P><FONT face=Arial color=#ff6600 size=2>
<P>
<MARQUEE scrollAmount=10 scrollDelay=20 behavior=alternate width=350
loops="0">Software Programmer</MARQUEE></P></FONT>
<P><FONT face=Arial color=#ff6600 size=2>Functional and Molecular Imaging</FONT>
<BR><FONT face=Arial color=#ff6600 size=2>Phone: 519-858-5009</FONT>
<BR><FONT face=Arial color=#ff6600 size=2>E-mail: <A
title="Click to send John an e-mail!"
href="mailto:John.Dubois@med.ge.com?subject=e-mail reply">John.Dubois@med.ge.com</A></FONT>
</P>
<DIV> </DIV></BODY></HTML>