Hi David,<br>In your vtkImageCamera.h, the line<br><br> vtkTypeRevisionMacro(vtkImageCamera,vtkObject);<br><br>effectively tells that vtkImageCamera "is a" vtkObject!<br><br>You should use<br> vtkTypeRevisionMacro(vtkImageCamera,vtkPhysicalCamera)<br>
instead<br><br>HTH,<br>Jerome<br><br><br><div class="gmail_quote">2009/12/2 David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have 2 classes, vtkImageCamera that inherits from vtkPhysicalCamera -<br>
<br>
class vtkImageCamera : public vtkPhysicalCamera<br>
<br>
The PrintSelf function of the derived class is:<br>
<br>
void vtkImageCamera::PrintSelf(ostream& os, vtkIndent indent)<br>
{<br>
this->Superclass::PrintSelf(os,indent);<br>
os << "new info here.";<br>
}<br>
<br>
When I output the derived class, I'd expect it to first call PrintSelf<br>
of vtkPhysicalCamera. However, the vtkImageCamera::PrintSelf thinks<br>
the Superclass is vtkObject and it never calls<br>
vtkPhysicalCamera::PrintSelf.<br>
<br>
The output of:<br>
vtkstd::cout << "ImageCamera Superclass: " <<<br>
this->Superclass::GetClassName() << vtkstd::endl;<br>
<br>
is<br>
ImageCamera Superclass: vtkImageCamera<br>
<br>
Is there something that needs to be done manually to set the<br>
SuperClass variable to vtkPhysicalCamera?<br>
The vtkObject::PrintSelf function is called, but it skips the<br>
vtkPhysicalCamera::PrintSelf.<br>
<br>
Here is an extracted example of the problem:<br>
<a href="http://www.rpi.edu/%7Edoriad/VTK_List/SuperClass/" target="_blank">http://www.rpi.edu/~doriad/VTK_List/SuperClass/</a><br>
<br>
Thanks,<br>
<br>
David<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br>